1

Building on a stackoverflow question, how can I actually get the device to ring?

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:sipsak@127.0.1.1:60831;tag=39c26336
To: sip:6003@localhost;tag=as5c9393b3
Call-ID: 969040694@127.0.1.1
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

Asterisk CLI output:

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> 

Nothing shows in the Asterisk CLI. However, if I dial extension 6003 from an Android tablet:

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> 

then demo_alice can dial thufir, the phone literally rings, and I can hang it up.

To what extent can sipsak simulate a call?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.