软件版本: libosip2-3.3.0.tar.gz libeXosip2-3.3.0.tar.gz ./configure --prefix=/opt/sip/target --disable-static make make install 测试代码: 代码来源:http://blog.csdn.net/bat603/archive/2006/11/15/1386277.aspx 1、UAS //*******************U
软件版本:
libosip2-3.3.0.tar.gz
libeXosip2-3.3.0.tar.gz
./configure --prefix=/opt/sip/target --disable-static
make
make install
测试代码:
代码来源:http://blog.csdn.net/bat603/archive/2006/11/15/1386277.aspx
1、UAS
>> gcc uastest.c -o uastest -L/opt/sip/target/lib/ -I/opt/sip/target/include/ -leXosip2
问题及其解决:
编译问题:
uastest.c: In function `main':
uastest.c:118: incompatible type for argument 1 of `osip_list_eol'
uastest.c:122: incompatible type for argument 1 of `osip_list_get'
解决方法:
The osip_list_* interface has been changed in latest versions of
osip and osip_list_t in structures are not pointer any more.
I think Updating is just a matter of adding "&" in front of
remote_sdp->m_medias and to other list accessed.
运行问题:
[root@localhost linphonenew]# ./uastest
./uastest: error while loading shared libraries: libosipparser2.so.4: cannot open shared object file: No such file or directory
解决方法:
#libosipparser2相关库文件复制到usr、lib目录下面
cp /opt/sip/target/lib/libosipp* /usr/lib
2、uac
>> gcc uastest.c -o uastest -L/opt/sip/target/lib/ -I/opt/sip/target/include/ -leXosip2
3/ 单机测试指导
本机ip:192.168.3.168
uac修改:
line23-26改为:
char *identity="sip:140@192.168.3.168"; //UAC1,端口是5060
char *registar="sip:133@192.168.3.168:5061"; //UAS,端口是5061
char *source_call="sip:140@192.168.3.168";
char *dest_call="sip:133@192.168.3.168:5061";
uas修改:
line44改为: i = eXosip_listen_addr (IPPROTO_UDP, NULL, 5061, AF_INET, 0);
其他:
http://hi.baidu.com/yangkaiii/blog/item/e2946f44ecdeaa86b3b7dc5d.html
http://hi.baidu.com/yangkaiii/blog/item/e46a59dde1ad5e305882dd5c.html
4/ 呼叫彩E
本机ip:192.168.3.168
彩E:192.168.3.167
line80到85改为:
line26:
char *dest_call="sip:111@192.168.3.167:5060";
注意:111的用户名不能就是该彩E的账号,不能随便换成其他的121之类,否则得到busy之类的应答信息。
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com