Asterisk call termination - asterisk

When trying to dial to the number through the provider, the connection is interrupted immediately after the answer. That is, on the same settings, the call goes through, then it breaks off. With what this behavior can be connected and in what direction to look for? SIP-call log:
m2422*CLI> channel originate SIP/<some number>#<provider's ip> application MusicOnHold
== Using SIP RTP CoS mark 5
Audio is at 33966
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to <provider's ip>:5060:
INVITE sip:<some number>#<provider's ip> SIP/2.0
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK478c225f
Max-Forwards: 70
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>
Contact: <sip:anonymous#<my ip>:5060>
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
CSeq: 102 INVITE
User-Agent: docker
Date: Thu, 13 Apr 2017 21:39:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 265
v=0
o=root 1062463446 1062463446 IN IP4 <my ip>
s=Asterisk PBX 14.3.0
c=IN IP4 <my ip>
t=0 0
m=audio 33966 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
---
-- Called <some number>#<provider's ip>
<--- SIP read from UDP:<provider's ip>:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK478c225f
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
Date: Thu, 13 Apr 2017 21:39:31 GMT
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow-Events: telephone-event
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
<--- SIP read from UDP:<provider's ip>:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK478c225f
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
Date: Thu, 13 Apr 2017 21:39:31 GMT
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
Allow-Events: telephone-event
Contact: <sip:<some number>#<provider's ip>:5060>
Content-Disposition: session;handling=required
Content-Type: application/sdp
Content-Length: 259
v=0
o=CiscoSystemsSIP-GW-UserAgent 7410 4097 IN IP4 <provider's ip>
s=SIP Call
c=IN IP4 <provider's ip>
t=0 0
m=audio 18808 RTP/AVP 0 101
c=IN IP4 <provider's ip>
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:passive
<------------->
--- (14 headers 11 lines) ---
sip_route_dump: route/path hop: <sip:<some number>#<provider's ip>:5060>
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port <provider's ip>:18808
-- SIP/trunk-0000001b is making progress
> 0x7f75f8002870 -- Probation passed - setting RTP source address to <provider's ip>:18808
<--- SIP read from UDP:<provider's ip>:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK478c225f
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
Date: Thu, 13 Apr 2017 21:39:31 GMT
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
Allow-Events: telephone-event
Contact: <sip:<some number>#<provider's ip>:5060>
Content-Disposition: session;handling=required
Content-Type: application/sdp
Content-Length: 259
v=0
o=CiscoSystemsSIP-GW-UserAgent 7410 4097 IN IP4 <provider's ip>
s=SIP Call
c=IN IP4 <provider's ip>
t=0 0
m=audio 18808 RTP/AVP 0 101
c=IN IP4 <provider's ip>
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:passive
<------------->
--- (14 headers 11 lines) ---
sip_route_dump: route/path hop: <sip:<some number>#<provider's ip>:5060>
-- SIP/trunk-0000001b is making progress
<--- SIP read from UDP:<provider's ip>:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK478c225f
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
Date: Thu, 13 Apr 2017 21:39:31 GMT
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
Supported: replaces
Allow-Events: telephone-event
Contact: <sip:<some number>#<provider's ip>:5060>
Content-Type: application/sdp
Content-Length: 259
v=0
o=CiscoSystemsSIP-GW-UserAgent 7410 4097 IN IP4 <provider's ip>
s=SIP Call
c=IN IP4 <provider's ip>5
t=0 0
m=audio 18808 RTP/AVP 0 101
c=IN IP4 <provider's ip>
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:passive
<------------->
--- (14 headers 11 lines) ---
sip_route_dump: route/path hop: <sip:<somenumber>#<provider's ip>:5060>
set_destination: Parsing <sip:<somenumber>#<provider's ip>:5060> for address/port to send to
set_destination: set destination to <provider's ip>:5060
Transmitting (no NAT) to <provider's ip>:5060:
ACK sip:<some number>#<provider's ip>:5060 SIP/2.0
Via: SIP/2.0/UDP <my ip>:5060;branch=z9hG4bK2566cc60
Max-Forwards: 70
From: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
To: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
Contact: <sip:anonymous#<my ip>:5060>
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
CSeq: 102 ACK
User-Agent: docker
Content-Length: 0
---
-- SIP/trunk-0000001b answered
> Launching MusicOnHold() on SIP/trunk-0000001b
-- Started music on hold, class 'default', on channel 'SIP/trunk-0000001b'
<--- SIP read from UDP:<provider's ip>:5060 --->
BYE sip:anonymous#<my ip>:5060 SIP/2.0
Via: SIP/2.0/UDP <provider's ip>:5060;branch=z9hG4bK67DF6A22C1
From: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
To: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
Date: Thu, 13 Apr 2017 21:39:42 GMT
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
User-Agent: Cisco-SIPGateway/IOS-12.x
Max-Forwards: 70
Timestamp: 1492119582
CSeq: 101 BYE
Reason: Q.850;cause=16
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to <provider's ip>:5060 (no NAT)
Scheduling destruction of SIP dialog '264825d83272bc8d676c07b27e9cb754#<my ip>:5060' in 32000 ms (Method: BYE)
<--- Transmitting (no NAT) to <provider's ip>:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <provider's ip>:5060;branch=z9hG4bK67DF6A22C1;received=<provider's ip>
From: <sip:<some number>#<provider's ip>>;tag=488081DC-9C3
To: "Anonymous" <sip:anonymous#anonymous.invalid>;tag=as37dc79d9
Call-ID: 264825d83272bc8d676c07b27e9cb754#<my ip>:5060
CSeq: 101 BYE
Server: docker
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
-- Stopped music on hold on SIP/trunk-0000001b

<--- SIP read from UDP:<provider's ip>:5060 --->
BYE sip:anonymous#<my ip>:5060 SIP/2.0
You have ask provide what is issue
Most likly - no sound from your side(incorrect nat and externip settings) or you use codec which provider not recommend/not support.

Related

Asterisk returns 501 - Not Implemented to INFO packets

I am trying to send DTMFs through SIPp. Since the play_pcap_audio action was not 100% reliable, I wanted to construct SIP INFO messages to make my tests more robust, however when I send INFO packets I get 501 - Not implemented response from Asterisk.
If I set my softphone to use SIP INFO for sending DTMFs, that works fine, so I am assuming it has to do with the messages I am sending. However comparing the actual messages did not reveal any difference.
The INVITE I send:
INVITE sip:*203#192.168.200.208:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.0.2:5060;branch=z9hG4bK-234-1-7;rport
From: sipp <sip:2018005#192.168.200.208>;tag=1
To: <sip:*203#192.168.200.208:5060>
Call-ID: 1-234#172.17.0.2
CSeq: 4 INVITE
Contact: sip:2018005#172.17.0.2:5060
Authorization: //auth header omitted
Max-Forwards: 70
Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO
Content-Type: application/sdp
Content-Length: 195
v=0
o=user1 53655765 2353687637 IN IP4 172.17.0.2
s=-
c=IN IP4 172.17.0.2
t=0 0
m=audio 8192 RTP/AVP 0
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
and the INFO message:
INFO sip:192.168.200.208:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.0.2:5060;branch=z9hG4bK-234-1-16
Max-Forwards: 70
Contact: <sip:2018005#172.17.0.2:5060;transport=UDP>
To: <sip:*203#192.168.200.208:5060>
From: "sipp" <sip:2018005#192.168.200.208>;tag=1
Call-ID: 1-234#172.17.0.2
CSeq: 5 INFO
User-Agent: SIPp docker
Authorization: // auth header omitted
Content-Length: 22
Signal=1
Duration=160
I have made sure it's not to do with the dtmfmode configuration in Asterisk.
One thing I noticed is when Asterisk responds to INVITE, it contains the following header:
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
I would expect INFO to be here - but again, it's the same when using the softphone and it all works.
What other areas could affect the processing of SIP INFOs?
Any help would be much appreciated on further debugging.
Turned out to be a problem with SIP dialogs.
The tags (+ a call-id) identify a dialog. After an INVITE is sent the UAS responds with an OK, sticking a remote tag to the To: field. Every subsequent request has to use the same tags (local and remote + call-id) to refer to the same dialog. This can be achieved by sticking [last_To:] into the header when using a SIPp scenario, so that we get the correct remote tag:
<send>
<![CDATA[
ACK sip:[field3]#[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0]#[field1]>;tag=[call_number]
[last_To:]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: sip:[field0]#[local_ip]:[local_port]
Max-Forwards: 10
Content-Length: 0
]]>
</send>
In the above case an ACK is sent back from the UAC and the dialog is established. Now when we send the INFO, we have to refer to the same dialog (by setting the correct tags) and it all works.
Interestingly, when not setting these values properly, pjsip gives 501 Not Implemented, whereas chan_sip responds with 481 Call/Transaction Does Not Exist which is much more accurate.

Soft phones don't connect when used with Asterisk server on cloud

Setting up Asterisk on GCP
I have used Asterisk 13, on a Google Cloud Platform instance, I am very new to Asterisk (started using it a few days ago). I need help with understanding how to connect devices (softphone would do) on my local machine.
sip.conf
[general]
context=public ; Default context for incoming calls. Defaults to 'default'
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
[authentication]
[basic-options](!) ; a template
dtmfmode=rfc2833
context=from-office
type=friend
[natted-phone](!,basic-options) ; another template inheriting basic-options
directmedia=no
host=dynamic
[public-phone](!,basic-options) ; another template inheriting basic-options
directmedia=yes
[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
[ulaw-phone](!) ; and another one for ulaw-only
disallow=all
allow=ulaw
[peer-default] ; Added by me, above all is default
disallow=all
allow=alaw,ulaw
type=friend
host=dynamic
context=softphone
secret=<secret>
[peer-xvhy]
disallow=all
allow=alaw,ulaw
context=softphone
type=friend
host=dynamic
secret=<secret>
Addresses
GCP instance has a public IP = GCP_IP
my local machine(macOs) has a public IP = LOCAL_IP
I connect two softphones, with the domain = GCP_IP
one with username = peer-default
the other with username = peer-xvhy
With that, I am able to connect my phones.
On sip show peers I see:
peer-default/peer-default LOCAL_IP D No No 52629 Unmonitored
peer-xvhy/peer-xvhy LOCAL_IP D No No 52629 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
I find it strange that both have same ip and port.
When I try to call a phone using this extensions.conf:
[softphone]
exten => 100, 1, Dial(SIP/peer-default)
same => n, Hangup()
I see this in the sip set debug on console:
<------------>
-- Executing [100#softphone:1] Dial("SIP/peer-default-00000021", "SIP/peer-default") in new stack
== Using SIP RTP CoS mark 5
Audio is at 16760
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to <LOCAL_IP>:52629:
INVITE sip:peer-default#<LOCAL_IP>:52629;ob SIP/2.0
Via: SIP/2.0/UDP <LOCAL_IP>:5060;branch=z9hG4bK5664fbba
Max-Forwards: 70
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#<LOCAL_IP>:52629;ob>
Contact: <sip:peer-default#<LOCAL_IP>:5060>
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
To: <sip:100#<GCP_IP>>;tag=as78507fab
CSeq: 102 INVITE
User-Agent: Asterisk PBX certified/13.21-cert2
Date: Fri, 06 Jul 2018 17:38:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282
v=0
o=root 886654089 886654089 IN IP4 <LOCAL_IP>
s=Asterisk PBX certified/13.21-cert2
c=IN IP4 <LOCAL_IP>
t=0 0
m=audio 16760 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
---
-- Called SIP/peer-default
<--- SIP read from UDP:<LOCAL_IP>:52629 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP <LOCAL_IP>:5060;received=<GCP_IP>;branch=z9hG4bK5664fbba
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#192.168.3.227;ob>
CSeq: 102 INVITE
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
<--- SIP read from UDP:<LOCAL_IP>:52629 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP <LOCAL_IP>:5060;received=<GCP_IP>;branch=z9hG4bK5664fbba
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#192.168.3.227;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
CSeq: 102 INVITE
Contact: "jacken-hagar" <sip:peer-default#<LOCAL_IP>:52629;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
sip_route_dump: route/path hop: <sip:peer-default#<LOCAL_IP>:52629;ob>
-- SIP/peer-default-00000022 is ringing
<--- Transmitting (no NAT) to <LOCAL_IP>:52629 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP <LOCAL_IP>:52629;branch=z9hG4bKPjgVfIZ2GZvjLmd.liWqt5Kx4tzfqul90b;received=<LOCAL_IP>;rport=52629
From: "jacken-hagar" <sip:peer-default#<GCP_IP>>;tag=YdEWucbUlrPjEvqWtnSNwzAamrQraB2D
To: <sip:100#<GCP_IP>>;tag=as78507fab
Call-ID: VbDA043j0pr7mzU-WCYMOfp5PS0YGPUR
CSeq: 26560 INVITE
Server: Asterisk PBX certified/13.21-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:100#<LOCAL_IP>:5060>
Content-Length: 0
<------------>
<--- SIP read from UDP:<LOCAL_IP>:52629 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <LOCAL_IP>:5060;received=<GCP_IP>;branch=z9hG4bK5664fbba
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#192.168.3.227;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
CSeq: 102 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Contact: "jacken-hagar" <sip:peer-default#<LOCAL_IP>:52629;ob>
Supported: replaces, 100rel, norefersub
Content-Type: application/sdp
Content-Length: 282
v=0
o=- 3739887487 3739887488 IN IP4 <LOCAL_IP>
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4010 RTP/AVP 8 101
c=IN IP4 <LOCAL_IP>
b=TIAS:96000
a=rtcp:4011 IN IP4 192.168.3.227
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
<------------->
--- (11 headers 14 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw|ulaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port <LOCAL_IP>:4010
sip_route_dump: route/path hop: <sip:peer-default#<LOCAL_IP>:52629;ob>
set_destination: Parsing <sip:peer-default#<LOCAL_IP>:52629;ob> for address/port to send to
set_destination: set destination to <LOCAL_IP>:52629
Transmitting (no NAT) to <LOCAL_IP>:52629:
ACK sip:peer-default#<LOCAL_IP>:52629;ob SIP/2.0
Via: SIP/2.0/UDP <LOCAL_IP>:5060;branch=z9hG4bK7fa42c02
Max-Forwards: 70
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#<LOCAL_IP>:52629;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
Contact: <sip:peer-default#<LOCAL_IP>:5060>
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX certified/13.21-cert2
Content-Length: 0
---
-- SIP/peer-default-00000022 answered SIP/peer-default-00000021
Audio is at 19568
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (no NAT) to <LOCAL_IP>:52629 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <LOCAL_IP>:52629;branch=z9hG4bKPjgVfIZ2GZvjLmd.liWqt5Kx4tzfqul90b;received=<LOCAL_IP>;rport=52629
From: "jacken-hagar" <sip:peer-default#<GCP_IP>>;tag=YdEWucbUlrPjEvqWtnSNwzAamrQraB2D
To: <sip:100#<GCP_IP>>;tag=as78507fab
Call-ID: VbDA043j0pr7mzU-WCYMOfp5PS0YGPUR
CSeq: 26560 INVITE
Server: Asterisk PBX certified/13.21-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:100#<LOCAL_IP>:5060>
Content-Type: application/sdp
Content-Length: 282
v=0
o=root 401214028 401214028 IN IP4 <LOCAL_IP>
s=Asterisk PBX certified/13.21-cert2
c=IN IP4 <LOCAL_IP>
t=0 0
m=audio 19568 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
<------------>
-- Channel SIP/peer-default-00000022 joined 'simple_bridge' basic-bridge <f1c38edc-c2d7-4681-ad97-7bcb7f7b19b1>
-- Channel SIP/peer-default-00000021 joined 'simple_bridge' basic-bridge <f1c38edc-c2d7-4681-ad97-7bcb7f7b19b1>
set_destination: Parsing <sip:peer-default#<LOCAL_IP>:52629;ob> for address/port to send to
set_destination: set destination to <LOCAL_IP>:52629
Audio is at 16760
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to <LOCAL_IP>:52629:
INVITE sip:peer-default#<LOCAL_IP>:52629;ob SIP/2.0
Via: SIP/2.0/UDP <LOCAL_IP>:5060;branch=z9hG4bK71beb7ff
Max-Forwards: 70
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#<LOCAL_IP>:52629;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
Contact: <sip:peer-default#<LOCAL_IP>:5060>
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX certified/13.21-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 281
v=0
o=root 886654089 886654090 IN IP4 <LOCAL_IP>
s=Asterisk PBX certified/13.21-cert2
c=IN IP4 <LOCAL_IP>
t=0 0
m=audio 4008 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
---
<--- SIP read from UDP:<LOCAL_IP>:52629 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <LOCAL_IP>:5060;received=<GCP_IP>;branch=z9hG4bK71beb7ff
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#192.168.3.227;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
CSeq: 103 INVITE
Contact: "jacken-hagar" <sip:peer-default#<LOCAL_IP>:52629;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length: 282
v=0
o=- 3739887487 3739887489 IN IP4 <LOCAL_IP>
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4010 RTP/AVP 8 101
c=IN IP4 <LOCAL_IP>
b=TIAS:96000
a=rtcp:4011 IN IP4 192.168.3.227
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
<------------->
--- (11 headers 14 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw|ulaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port <LOCAL_IP>:4010
set_destination: Parsing <sip:peer-default#<LOCAL_IP>:52629;ob> for address/port to send to
set_destination: set destination to <LOCAL_IP>:52629
Transmitting (no NAT) to <LOCAL_IP>:52629:
ACK sip:peer-default#<LOCAL_IP>:52629;ob SIP/2.0
Via: SIP/2.0/UDP <LOCAL_IP>:5060;branch=z9hG4bK3f0206ce
Max-Forwards: 70
From: "jacken-hagar" <sip:peer-default#<LOCAL_IP>>;tag=as3175e9a7
To: <sip:peer-default#<LOCAL_IP>:52629;ob>;tag=ERo8E-rMSwEcwRC31GLgFSGyuafT0zMp
Contact: <sip:peer-default#<LOCAL_IP>:5060>
Call-ID: 0e6f6ecb04a151372a04d3e12eea8eae#<LOCAL_IP>:5060
CSeq: 103 ACK
User-Agent: Asterisk PBX certified/13.21-cert2
Content-Length: 0
---
Retransmitting #1 (no NAT) to <LOCAL_IP>:52629:
SIP/2.0 200 OK
Via: SIP/2.0/UDP <LOCAL_IP>:52629;branch=z9hG4bKPjgVfIZ2GZvjLmd.liWqt5Kx4tzfqul90b;received=<LOCAL_IP>;rport=52629
From: "jacken-hagar" <sip:peer-default#<GCP_IP>>;tag=YdEWucbUlrPjEvqWtnSNwzAamrQraB2D
To: <sip:100#<GCP_IP>>;tag=as78507fab
Call-ID: VbDA043j0pr7mzU-WCYMOfp5PS0YGPUR
CSeq: 26560 INVITE
Server: Asterisk PBX certified/13.21-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:100#<LOCAL_IP>:5060>
Content-Type: application/sdp
Content-Length: 282
v=0
o=root 401214028 401214028 IN IP4 <LOCAL_IP>
s=Asterisk PBX certified/13.21-cert2
c=IN IP4 <LOCAL_IP>
t=0 0
m=audio 19568 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
```
The retransmit log appears 10 times and then the call disconnects
this happens within 32 seconds every time.
with this error:
```
WARNING[25825]: chan_sip.c:4069 retrans_pkt: Retransmission timeout reached on transmission f60f2b6a32c0d48cc30f2e0f9c5174c8 for seqno 1 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
What (whatever little) I can understand from the retransmission log is:
From: "jacken-hagar" <sip:peer-
default#<GCP_IP>>;tag=YdEWucbUlrPjEvqWtnSNwzAamrQraB2D
To: <sip:100#<GCP_IP>>;tag=as78507fab
Is the problem it should be sending to and from LOCAL_IP because that's what sip show peers says about the address about my soft phones.
Finally got to fix that, hope this helps someone else out.
Retransmitting #1 (no NAT) to <LOCAL_IP>:52629:
SIP/2.0 200 OK
Via: SIP/2.0/UDP <LOCAL_IP>:52629;branch=z9hG4bKPjgVfIZ2GZvjLmd.liWqt5Kx4tzfqul90b;received=<LOCAL_IP>;rport=52629
From: "jacken-hagar" <sip:peer-default#<GCP_IP>>;tag=YdEWucbUlrPjEvqWtnSNwzAamrQraB2D
To: <sip:100#<GCP_IP>>;tag=as78507fab
Call-ID: VbDA043j0pr7mzU-WCYMOfp5PS0YGPUR
CSeq: 26560 INVITE
Server: Asterisk PBX certified/13.21-cert2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:100#<LOCAL_IP>:5060>
Content-Type: application/sdp
Content-Length: 282
Each time you see the above in sip set debug on logs you should focus on the contact header.
Contact: <sip:100#<LOCAL_IP>:5060>
In my case <LOCAL_IP> was the internal address of my GCP Instance, and not the local ip of my machine.
From here on in the sip.conf
[general]
context=public ; Default context for incoming calls. Defaults to 'default'
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
externip=<PUBLIC_IP_OF_YOUR_INSTANCE>
localnet=<INTERNAL_IP_OF_YOUR_INSTANCE>/<MASK (255.255.255.255)>

Asterisk returns 481 on hangup

Not sure if it's the place where I should ask this question.
I'm developing a simple voip application. I can call to other users, but can't hang up. When client sends BYE request, server answers with 481 - call leg transaction does not exist.
Here are client logs:
INVITE sip:2#172.20.4.7:51110;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.20.4.7:5060;branch=z9hG4bK06952c7a;rport
Max-Forwards: 70
From: "First" <sip:1#172.20.4.7>;tag=as746cc61d
To: <sip:2#172.20.4.7:51110;transport=UDP>
Contact: <sip:1#172.20.4.7:5060>
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
CSeq: 102 INVITE
User-Agent: FPBX-AsteriskNOW-12.0.76.4(11.16.0)
Date: Tue, 07 Mar 2017 11:52:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Asserted-Identity: "First" <sip:1#172.20.4.7>
Content-Type: application/sdp
Content-Length: 310
v=0
o=root 2015785808 2015785808 IN IP4 172.20.4.7
s=Asterisk PBX 11.16.0
c=IN IP4 172.20.4.7
t=0 0
m=audio 13952 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.20.4.7:51110;branch=z9hG4bKnCqg
Contact: <sip:2#172.20.4.7:51110;transport=UDP>
To: <sip:2#172.20.4.7;transport=UDP>;tag=YU2R
From: <sip:2#172.20.4.7;transport=UDP>;tag=as746cc61d
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
CSeq: 102 INVITE
Allow-Events: presence, kpml, talk
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.20.4.7:51110;branch=z9hG4bK06952c7a;rport
Contact: <sip:2#172.20.4.7:51110;transport=UDP>
To: <sip:2#172.20.4.7;transport=UDP>;tag=YU2R
From: "First" <sip:1#172.20.4.7;transport=>;tag=as746cc61d
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Accept: application/sdp, application/sdp
Accept-Language: en
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
Allow-Events: presence, kpml, talk
Content-Length: 247
v=0
o=Z 13 13 IN IP4 95.86.129.80
s=Test
c=IN IP4 95.86.129.80
t=0 0
m=audio 50000 RTP/AVP 3 110 8 0 97 101
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode = 30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
ACK sip:2#172.20.4.7:51110;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.20.4.7:5060;branch=z9hG4bK54ba94a0;rport
Max-Forwards: 70
From: "First" <sip:1#172.20.4.7>;tag=as746cc61d
To: <sip:2#172.20.4.7:51110;transport=UDP>;tag=YU2R
Contact: <sip:1#172.20.4.7:5060>
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
CSeq: 102 ACK
User-Agent: FPBX-AsteriskNOW-12.0.76.4(11.16.0)
Content-Length: 0
BYE sip:1#172.20.4.7;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.20.4.7:51110;branch=z9hG4bKAZsQ
Max-Forwards: 70
From: <sip:2#172.20.4.7;transport=UDP>;tag=as746cc61d
To: <sip:1#172.20.4.7;transport=UDP>;tag=YU2R
Contact: <sip:2#172.20.4.7:51110;transport=UDP>
CSeq: 2 BYE
User-Agent: TestSoftphone
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
Content-Length: 0
SIP/2.0 481 Call leg/transaction does not exist
Via: SIP/2.0/UDP 172.20.4.7:51110;branch=z9hG4bKAZsQ;received=172.20.1.40;rport=51110
From: <sip:2#172.20.4.7;transport=UDP>;tag=as746cc61d
To: <sip:1#172.20.4.7;transport=UDP>;tag=YU2R
Call-ID: 425bb181009f366c499b10f362d29ac6#172.20.4.7:5060
CSeq: 2 BYE
Server: FPBX-AsteriskNOW-12.0.76.4(11.16.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
I read that 481 can occur if To tag or From tag or Call-ID is outside of dialog, but looks like tags and ids are ok. I don't receive a tag for To, so I generate Ringing packet where To tag is set, that may be the problem.
EDIT. I added "pedantic=no" to sip_custom.conf, and it works now. Though I don't know what's wrong with this dialog.
I'm pretty sure that Contact header is not necessary in BYE. Fastest way to understand what is wrong is check full dialog with some other SIP client. As you sad this is probably related with To or From headers
Please compare the content of Via headers in initial INVITE and BYE messages - values are different: Via: SIP/2.0/UDP 172.20.4.7:5060 and Via: SIP/2.0/UDP 172.20.4.7:51110 respectively. Asterisk created dialog and marked it internally (inside its mind) according to combination of address and port in Via header. It expects actual dialog to be canceled from the same address and port, hence all the requests came from different source are considered as "out-of-dialog" and rejected.
Actual problem is widespread and caused by incorrect behavior of the routers/firewalls installed on the edge of client networks. Try to disable ALG feature on mentioned device.

Why won't VLC send an rtsp PLAY request to my server?

I'm implementing an RTSP server in NodeJs, using the RFC's (rtsp, rtp, sdp) and this tutorial.
I'm using VLC to test my implementation, and it works fine for the example (link at the bottom of the tutorial) but stops halfway for my server.
I'm suspecting some RFC compliance issue, but I can't find it, and VLC isn't really providing any useful information as to what it's doing.
Running wireshark and the c++ server implementation, and pointing VLC to it shows all the steps:
OPTIONS rtsp://192.168.10.151:8554/mjpeg/1 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
DESCRIBE rtsp://192.168.10.151:8554/mjpeg/1 RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
This should be date
Content-Base: rtsp://192.168.10.151:8554/mjpeg/1/
Content-Type: application/sdp
Content-Length: 90
v=0
o=- 6334 1 IN IP4 192.168.10.151
s=
t=0 0
m=video 0 RTP/AVP 26
c=IN IP4 0.0.0.0
SETUP rtsp://192.168.10.151:8554/mjpeg/1/ RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
RTSP/1.0 200 OK
CSeq: 4
This should be date
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Session: -2144778205
PLAY rtsp://192.168.10.151:8554/mjpeg/1/ RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: -2144778205
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 5
This should be date
Range: npt=0.000-
Session: -2144778205
RTP-Info: url=rtsp://127.0.0.1:8554/mjpeg/1/track1
And the VLC messages:
...
live555 debug: RTP subsession 'video/JPEG'
core debug: selecting program id=0
live555 debug: setup start: 0.000000 stop:0.000000
live555 debug: play start: 0.000000 stop:0.000000
core debug: using access_demux module "live555"
core debug: looking for decoder module matching "any": 43 candidates
...
When I run my own server, it never sends the play request:
OPTIONS rtsp://rasmus.axit.local:8554/mjpeg/1 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
DESCRIBE rtsp://rasmus.axit.local:8554/mjpeg/1 RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Date: Fri, 09 Sep 2016 09:36:29 GMT
Content-Base: rtsp://rasmus.axit.local:8554/mjpeg/1
Content-Type: application/sdp
Content-Length: 91
v=0
o=- -12345678 1 IN IP4 192.168.10.71
s=
t=0 0
m=video 0 RTP/AVP 26
c=IN IP4 0.0.0.0
SETUP rtsp://rasmus.axit.local:8554/mjpeg/1/ RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
RTSP/1.0 200 OK
CSeq: 4
Date: Fri, 09 Sep 2016 09:36:29 GMT
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Session: -12345678
And VLC:
...
live555 debug: RTP subsession 'video/JPEG'
It doesn't continue from there.
I can't figure out what it's missing. Earlier it didn't send a SETUP either, and that turned out to be a missing empty line on the DESCRIBE response. Consequently I've tried adding various amount of newlines, ids, different dates and what not in different places, but no dice.
Please let me know if you need more information.
Your response to the DESCRIBE commands seems to be invalid - you are replying with 96 characters while the Content-Length header states 91. Not sure if this affects the outcome, but I assume VLC could fail because of this (it could be that it cannot parse the connection data line). Also there seems to be an unneeded extra newline at the end of the SDP data at the end of the last line.

Asterisk Instant Messaging Errors

I was trying to setup instant messaging in asterisk server. For the client i'm using Blink Softphone. I did add to my sip.conf
[general]
accept_outofcall_message=yes
outofcall_message_context=dialplan_name
auth_message_requests=yes
and to my extensions.conf
[dialplan_name]
exten => _XXX,1,MessageSend(sip:${EXTEN},"${CALLERID(name)}"${MESSAGE(from)})
So this is a simple extension for testing. But when i try and send the message from user1 to user2 i get in the asterisk log:
[Jan 30 21:17:47] WARNING[6420][C-00000005]: chan_sip.c:10515 process_sdp: Insufficient information in SDP (c=)...
What can be wrong here? I'am sure that the clients are on the nat, so i do have both nat=force_rport,comedia for all my users in sip.conf
My asterisk version is 13 (latest).
[UPDATED]
I turned on the sip debug log, and tried to send the message (first i get some weird retransmission):
Retransmitting #9 (no NAT) to 14.228.14.150:5070: <- weird ip here
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 14.228.14.150:5070;branch=z9hA4cA-abcdef613aca8b1x3124abb0z3e1bc8;received=14.228.14.150;rport=5070
From: 2014<sip:2014#(server_ip_here)>;tag=a312facc
To: 0009735466221178<sip:0009735466221178#(server_ip_here)>;tag=bb62441233
Call-ID: abcdef613aca8b1x3124abb0z3e1bc8
CSeq: 1 INVITE
Server: Asterisk PBX 13.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2222abcf"
Content-Length: 0
Then
<--- SIP read from TLS:(my_ip_here):49312 --->
INVITE sip:123#(server_ip_here) SIP/2.0
Via: SIP/2.0/TLS (my_ip_here):49312;rport;branch=b4ae88b115be15a5n9244;alias
Max-Forwards: 70
From: "user1" <sip:user1#server_ip_here>;tag=39e388fd5f616b7
To: <sip:123#(server_ip_here)>
Contact: <sip:12313560#(server_ip_here):49311;transport=tls>
Call-ID: ac48128192za12a2f432e24c18aabc7q
CSeq: 28982 INVITE
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: 100rel, replaces, norefersub, gruu
User-Agent: Blink 0.9.1.2 (Windows)
Content-Type: application/sdp
Content-Length: 308
v=0
o=- 3211422221 3211422221 IN IP4 (my_ip)
s=Blink 0.9.1.2 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 (my_ip)
a=path:msrps://(my_ip):2855/37a1cc82ab315e21b222;tcp
a=accept-types:message/cpim text/* application/im-iscomposing+xml
a=accept-wrapped-types:*
a=setup:active
<------------->
--- (13 headers 10 lines) ---
Sending to (my_ip):49312 (NAT)
Sending to (my_ip):49312 (NAT)
Using INVITE request as basis request - ad72cd1681aff769721af12c21aaea7c
Found peer 'user1' for 'user1' from (my_ip):49312
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
[Jan 31 21:02:17] WARNING[27265][C-00000118]: chan_sip.c:10515 process_sdp: Insufficient information in SDP (c=)...
arheops was right! Using INVITE request as basis request <- here it is. Instead of MESSAGE for some reason INVITE request is used.
Looks like your softphone use INVITE instead of MESSAGE for messaging.
You can get more info by enable sip debug in asterisk console
asterisk -r
sip set debug on

Resources