SIP学习

更新时间:2024-04-13 01:07:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

使用eyebeam注册9901和9902这两个SIP用户到Asterisk上去,并且使其互相呼叫并通话。 1.首次注册成功

—————————————————————

[Oct 25 10:39:47] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9902 这里表示接收到SIP用户9902的注册信息。

[Oct 25 10:40:26] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9902

[Oct 25 10:41:35] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9901 这里表示接收到SIP用户9901的注册信息。

[Oct 25 10:41:44] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9902

[Oct 25 10:43:32] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9901 ————————————————————— 2.检查注册状况:

asterisk-test1*CLI> sip show peers —————————————————————

Name/username Host Dyn Nat ACL Port Status

9902/9902 192.168.0.20 D N 17900 Unmonitored 用户9902已经注册上来,并且主机地址为192.168.0.20,发起端口是17900,非监视。

9901/9901 192.168.0.199 D N 35028 Unmonitored 用户9901已经注册上来,并且主机地址为192.168.0.199,发起端口是35028,非监视。

2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]

提示2个SIP对端在线,处于非监视状态。 asterisk-test1*CLI>

————————————————————— 3.从控制台中察看该2个用户的正常注册信息: —————————————————————

[Oct 25 11:13:50] NOTICE[2490]: chan_sip.c:14586 handle_request_subscribe:

– Unregistered SIP ’9901′

– Registered SIP ’9901′ at 192.168.0.199 port 57090 expires 60 用户9901从地址192.168.0.199端口57090登入,超时时间为60秒。 – Saved useragent ‖eyeBeam release 1004p stamp 31962″ for peer 9901

用户代理程序是eyeBeam。 – Unregistered SIP ’9902′

– Registered SIP ’9902′ at 192.168.0.20 port 59236 expires 60 用户9902从地址192.168.0.20端口59236登入,超时时间为60秒。 – Saved useragent ‖eyeBeam release 1004p stamp 31962″ for peer 9902

用户代理程序是eyeBeam。

————————————————————— 4.成功呼叫接通:

从9901呼叫9902,并且我这里做一些简单的信息分析。 —————————————————————

– Executing [9902@demo:1] Dial(‖SIP/9901-09a56000″, ‖SIP/9902|20|r‖) in new stack

执行呼叫,拨打9902。 – Called 9902 被叫方9902。

– SIP/9902-09a17100 is ringing 通过SIP通道呼叫9902,并且正在震铃。

– SIP/9902-09a17100 answered SIP/9901-09a56000 SIP的9902终端应答了SIP的9901终端。

– Packet2Packet bridging SIP/9901-09a56000 and SIP/9902-09a17100 在SIP9901和SIP9902之间建立了P2P通道。

== Spawn extension (demo, 9902, 1) exited non-zero on ’SIP/9901-09a56000′

9901挂断。

—————————————————————

从9902呼叫9901,并且我这里做就不重复做相同的分析了。 —————————————————————

– Executing [9901@demo:1] Dial(‖SIP/9902-09a54548″, ‖SIP/9901|20|r‖) in new stack – Called 9901

– SIP/9901-09a56000 is ringing

– SIP/9901-09a56000 answered SIP/9902-09a54548

– Packet2Packet bridging SIP/9902-09a54548 and SIP/9901-09a56000 == Spawn extension (demo, 9901, 1) exited non-zero on ’SIP/9902-09a54548′

9901挂断。

————————————————————— 五.遇到的问题:

问题1:呼叫失败。提示为在extension中没有―Dail‖这个应用程序。 原因:在extensions.conf中―Dial‖误写成―Dail‖。 —————————————————————

[Oct 25 10:21:01] WARNING[3363]: pbx.c:1797 pbx_extension_helper: No application ’Dail’ for extension (demo, 9902, 1)

== Spawn extension (demo, 9902, 1) exited non-zero on ’SIP/9901-09a547d0′

————————————————————— 问题2:呼叫失败(但是反向呼叫却可以成功。)

原因:用户9901和9902的编码不统一,在sip.conf中强行指定使用相同编解码后呼叫以及通话功能正常。

—————————————————————

– Executing [9902@demo:1] Dial(‖SIP/9901-09a17100″, ‖SIP/9902|20|r‖) in new stack – Called 9902>

– SIP/9902-09a56000 is circuit-busy

== Everyone is busy/congested at this time (1:0/1/0)

[Oct 25 11:25:10] WARNING[2490]: chan_sip.c:12428 handle_response: Remote host can’t match request BYE to call ’768cfe882651862a21c804946cb8dc43@192.168.0.148′. Giving up. ————————————————————— 问题3:电话单向打通,并且提示使用未知编码。

原因:用户9901和9902的编码不统一,在sip.conf中强行指定使用相同编解码后呼叫以及通话功能正常。

—————————————————————

– Executing [9901@demo:1] Dial(‖SIP/9902-09a17100″, ‖SIP/9901|20|r‖) in new stack – Called 9901>

– SIP/9901-09a56000 is ringing

[Oct 25 11:22:25] WARNING[2490]: channel.c:2947 set_format: Unable to find a codec translation path from g729 to gsm

关键提示:找不到一个能够将G.729转成GSM的编解码途径。

[Oct 25 11:22:25] WARNING[2490]: channel.c:2947 set_format: Unable to find a codec translation path from g729 to gsm – SIP/9901-09a56000 answered SIP/9902-09a17100

– Packet2Packet bridging SIP/9902-09a17100 and SIP/9901-09a56000 – Started music on hold, class ’default’, on SIP/9901-09a56000 [Oct 25 11:22:35] WARNING[3892]: channel.c:2947 set_format: Unable to find a codec translation path from g729 to slin

[Oct 25 11:22:35] WARNING[3892]: res_musiconhold.c:247 ast_moh_files_next: Unable to open file ’/var/lib/asterisk/moh/fpm-calm-river’: No such file or directory

– Stopped music on hold on SIP/9901-09a56000

[Oct 25 11:22:43] NOTICE[3892]: rtp.c:1274 ast_rtp_read: Unknown RTP codec 126 received from ’192.168.0.20′

关键提示:从192.168.0.20上收到未知的RTP编码。

[Oct 25 11:22:50] NOTICE[3892]: rtp.c:1274 ast_rtp_read: Unknown RTP codec 126 received from ’192.168.0.20′

Internal RTCP NTP clock skew detected: lsr=2324207771, now=2324324243, dlsr=176881 (2:698ms), diff=60409

Internal RTCP NTP clock skew detected: lsr=2324207771, now=2324534751, dlsr=401014 (6:118ms), diff=74034

Internal RTCP NTP clock skew detected: lsr=2324535463, now=2324702191, dlsr=223805 (3:414ms), diff=57077 ————————————————————— 根据关键提示,很明显,是和编解码有关的问题。

本文来源:https://www.bwwdw.com/article/1v0p.html

Top