资源简介
基于exosip的语音电话聊天,有助于exosip的开发

代码片段和文件信息
/* This source has been formatted by an unregistered SourceFormatX */
/* If you want to remove this info please register this shareware */
/* Please visit http://www.textrush.com to get more information */
/*
* josua - Jack‘s open sip User Agent
*
* Copyright (C) 20022003 Aymeric Moizard
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2
* or (at your option) any later version.
*
* This is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with dpkg; if not write to the Free Software
* Foundation Inc. 675 Mass Ave Cambridge MA 02139 USA.
*/
#include “stdafx.h“
#include “sdptools.h“
#include “commands.h“
main_config_t cfg =
{
“\0“ “\0“ “\0“ “\0“ 1 5060 “\0“ “\0“ “\0“ “\0“ 0 “\0“
};
static int _check_url(char *url);
static int _check_url(char *url)
{
int i;
osip_from_t *to;
i = osip_from_init(&to);
if (i != 0)
return - 1;
i = osip_from_parse(to url);
osip_from_free(to);
if (i != 0)
return - 1;
return 0;
}
int _josua_start_call(char *from char *to char *subject char *route char
*port void *reference)
{
osip_message_t *invite;
int i;
osip_clrspace(to);
osip_clrspace(subject);
osip_clrspace(from);
osip_clrspace(route);
OSIP_TRACE(osip_trace(__FILE__ __LINE__ OSIP_INFO2 NULL “To: |%s|\n“
to));
if (0 != _check_url(from))
return - 1;
if (0 != _check_url(to))
return - 1;
i = eXosip_call_build_initial_invite(&invite to from route subject);
if (i != 0)
{
return - 1;
}
osip_message_set_supported(invite “100rel“);
/* add sdp body */
{
char tmp[4096];
char localip[128];
eXosip_guess_localip(AF_INET localip 128);
_snprintf(tmp 4096 “v=0\r\n“
“o=josua 0 0 IN IP4 %s\r\n“
“s=conversation\r\n“
“c=IN IP4 %s\r\n“
“t=0 0\r\n“
“m=audio %s RTP/AVP 0 8 101\r\n“
“a=rtpmap:4 G729/8000\r\n“
“a=rtpmap:3 PCMU/8000\r\n“
“a=rtpmap:3 PCMA/8000\r\n“
“a=fmtp:101 0-11\r\n“ localip localip port);
osip_message_set_body(invite tmp strlen(tmp));
osip_message_set_content_type(invite “application/sdp“);
}
if (cfg.service_route[0] != ‘\0‘)
{
char *header = osip_strdup(“route“);
osip_message_set_multiple_header(invite header cfg.service_route);
osip_free(header);
OSIP_TRACE(osip_trace(__FILE__ __LINE__ OS
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15683 2007-01-12 15:47 exosip\commands.cpp
文件 2508 2007-01-11 17:36 exosip\commands.h
文件 22058 2007-01-04 15:56 exosip\exosip.lib
文件 154298 2007-01-11 18:41 exosip\exosip2.lib
文件 96396 2007-01-11 17:36 exosip\G729a.lib
文件 14828 2007-01-16 13:42 exosip\gui.c
文件 2342 2007-01-16 13:42 exosip\gui.h
文件 9823 2007-01-16 13:36 exosip\gui_new_call.c
文件 1124 2007-01-16 13:39 exosip\gui_new_call.h
文件 6425 2007-01-16 13:48 exosip\gui_new_identity.c
文件 1062 2007-01-16 13:48 exosip\gui_new_identity.h
文件 3964 2007-01-16 13:47 exosip\gui_online.c
文件 1115 2007-01-16 13:47 exosip\gui_online.h
文件 11726 2007-01-16 13:41 exosip\gui_sessions_list.c
文件 1070 2007-01-16 13:41 exosip\gui_sessions_list.h
文件 1453 2007-01-16 13:52 exosip\gui_topline.c
文件 952 2007-01-16 13:52 exosip\gui_topline.h
文件 41185 2007-01-16 13:27 exosip\jcalls.c
文件 40148 2007-01-15 17:31 exosip\jcalls.cpp
文件 4469 2007-01-11 17:36 exosip\jcalls.h
文件 19530 2007-01-11 17:36 exosip\jinsubsc
文件 2071 2007-01-11 17:36 exosip\jinsubsc
文件 14718 2007-01-11 17:36 exosip\jsubsc
文件 2197 2007-01-11 17:36 exosip\jsubsc
文件 27793 2007-01-16 13:31 exosip\main_ncurses.c
文件 33096 2007-01-04 09:08 exosip\ortp.lib
文件 35866 2007-01-06 14:04 exosip\osip2.lib
文件 104382 2007-01-06 13:57 exosip\osipparser2.lib
文件 1197 2007-01-11 17:36 exosip\ReadMe.txt
文件 9520 2007-01-12 15:52 exosip\sdptools.cpp
............此处省略21个文件信息
- 上一篇:LabVIEW 开头动画渐变制作
- 下一篇:基于VHDL的太阳能热水器智能控制系统
相关资源
- 语音信号处理 赵力
- labview语音输入输出
- 语音分帧,短时能量,过零率
- mp重构一维信号(可运行)
- wifi局域网内双向语音实时通话
- 利用语音信号的短时能量与短时过零
- DSP 语音识别程序 DTW MFCC
- scratch3.0 朗读语音文本
- 语音邮件“嫁”给电子邮件
- wav语音文件裁剪 截取工具
- 通过IBM WebSphere技术Intrix解决方案中已
- CX20921_原理设计.pdf
- 基于ZigBee技术的矿井智能头盔
- Unity 声音播放插件,支持将字符串转
- 特定人语音识别技术在汽车控制上的
- 奥科网关M1000B配置手册.docx
- 语音回示在GSM-R手持终端中的实现
- unity 3D 百度语音合成 并播放
- NOIZEUS实验室纯净语音库
- labview语音识别程序
- 朗读女语音软件v8.0中文免费版(附朗
- 中文语音播报音频文件[阿拉伯数字
- WT588D开发超完整资料包
- 免费激活华为E1750无线网卡语音功能
- 科大讯飞语音开发SDK及VCdemo
- 科大讯飞语音朗读
- 图灵机器人+讯飞语音
- 文字转语音播报
- 百度语音播报合成工具,可以无限制
- 文本转语音工具
评论
共有 条评论