资源简介
基于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的太阳能热水器智能控制系统
相关资源
- 基于简单IO口的显示语音播放器
- Boll的语音增强的经典论文-谱减法
- 语音播报 简单(源码)
- 语音播放WT588D一线串口
- 基于TMS320VC5509芯片的语音采集系统
- 易语言语音报时模块1.3
- speech-recognition
- 隐马尔科夫模型HMM自学最好范例 pd
- 基于隐马尔可夫模型的语音识别算法
- 语音识别中DTW算法的改进
- 语音信号滤波去噪使用 汉宁窗设计的
- 科大讯飞XFS5152语音合成SPI驱动的C51源
- ld3320语音模块原理图
- 语音控制小车
- 语音提示音MP3包.rar
- 介绍了一种基于DSP芯片TMS320VC5509A 并采
- 树莓派语音对话机器人源码
- Neospeech语音引擎破解
- 电子药盒吃药提醒器定时吃药语音提
- exosip2-5.0.0及手冊
- 录音程序(带有端点检测的语音录音
- 基于生成对抗网络的语音增强代码及
- 基于DSP的语音录放实验程序
- dsp实验报告-语音信号处理
- Labview实现语音播报与识别
- Labview实现语音识别
- 语音质量测试
- LD3320语音识别模块stm32例程调试
- 凌阳SPCE061A 语音遥控小车 源程序
- MELP 2.4标准
评论
共有 条评论