sipsak 如何模拟 usrloc 的调用?

sipsak 如何模拟 usrloc 的调用?

建立在堆栈溢出问题,我怎样才能真正让设备响铃?

thufir@mordor:~$ sudo sipsak -vv -s sip:6003@localhost
No SRV record: _sip._tcp.localhost
No SRV record: _sip._udp.localhost
using A record: localhost

message received:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.1.1:60831;branch=z9hG4bK.19ff6b4d;alias;received=127.0.0.1;rport=60831
From: sip:[email protected]:60831;tag=39c26336
To: sip:6003@localhost;tag=as5c9393b3
Call-ID: [email protected]
CSeq: 1 OPTIONS
Server: Asterisk PBX 13.1.0~dfsg-1.1ubuntu3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:127.0.0.1:5060>
Accept: application/sdp
Content-Length: 0

** reply received after 0.152 ms **
   SIP/2.0 200 OK
   final received

星号 CLI 输出:

mordor*CLI> 
mordor*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
demo_alice/demo_alice     192.168.1.6                              D  Yes        Yes            5060     Unmonitored                                  
demo_bob/demo_bob         192.168.1.8                              D  Yes        Yes            40962    Unmonitored                                  
thufir/thufir             192.168.1.5                              D  Yes        Yes            5062     Unmonitored                                  
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline]
mordor*CLI> 
mordor*CLI> dialplan show internal
[ Context 'internal' created by 'pbx_config' ]
  '6001' =>         1. Dial(SIP/demo_alice,20)                    [pbx_config]
  '6002' =>         1. Dial(SIP/demo_bob,20)                      [pbx_config]
  '6003' =>         1. Dial(SIP/thufir,20)                        [pbx_config]

-= 3 extensions (3 priorities) in 1 context. =-
mordor*CLI> 

Asterisk CLI 中没有显示任何内容。但是,如果我从 Android 平板电脑拨打分机 6003:

mordor*CLI> 
  == Using SIP RTP CoS mark 5
    -- Executing [6003@internal:1] Dial("SIP/demo_alice-00000004", "SIP/thufir,20") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/thufir
    -- SIP/thufir-00000005 is ringing
    -- SIP/thufir-00000005 answered SIP/demo_alice-00000004
    -- Channel SIP/demo_alice-00000004 joined 'simple_bridge' basic-bridge <d5d9838f-a838-4a80-b3f9-15391fb4f2ab>
    -- Channel SIP/thufir-00000005 joined 'simple_bridge' basic-bridge <d5d9838f-a838-4a80-b3f9-15391fb4f2ab>
    -- Channel SIP/thufir-00000005 left 'native_rtp' basic-bridge <d5d9838f-a838-4a80-b3f9-15391fb4f2ab>
    -- Channel SIP/demo_alice-00000004 left 'native_rtp' basic-bridge <d5d9838f-a838-4a80-b3f9-15391fb4f2ab>
  == Spawn extension (internal, 6003, 1) exited non-zero on 'SIP/demo_alice-00000004'
mordor*CLI> 

然后demo_alice可以拨号thufir,电话响了,我可以挂断电话。

sipsak能模拟通话到什么程度?

相关内容