Com base em uma pergunta do stackoverflow , como posso realmente fazer o dispositivo tocar?
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
Saída CLI do Asterisk:
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>
Nada aparece na CLI do Asterisk. No entanto, se eu discar o ramal 6003 de um tablet Android:
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>
então demo_alice
pode discar thufir
, o telefone literalmente toca e eu posso desligar.
Em que medida os sipsak podem simular uma chamada?
Tags command-line voip sip asterisk telephony