SIPp call between two registered UACs - sip

I'm testing a B2BUA, and trying to do so with SIPp, but its assumptions are killing me. I need both sipp instances to register with a B2BUA, and the one to call the other. SIPp won't permit this, as the one called must apparently be in UAS mode, and if in UAS mode, you can't run out of call scenario files, so I can't do it that way either.
Basically both scenarios start with a register, and then one attempts and invite while the other waits for it. SIPp is not ok with this.
I am simulating two sets, 16001 and 16002.
scenario for 16001:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<!-- UC360 INVITE/200/ACK/BYE/200 sample UAC scenario -->
<scenario name="Basic UC360 UAC">
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:16001#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Contact: <sip:16001#[local_ip]:[local_port];line=10d9fd07f9eb2d0>
Allow: INVITE, ACK, BYE, OPTIONS, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, INFO, MESSAGE
Max-Forwards: 70
User-Agent: Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Expires: 3600
Supported: path
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="401" auth="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:16001#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 2 REGISTER
Contact: <sip:16001#[local_ip]:[local_port];line=10d9fd07f9eb2d0>
[authentication username=16001 password=asdfzxcvqwer]
Allow: INVITE, ACK, BYE, OPTIONS, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, INFO, MESSAGE
Max-Forwards: 70
User-Agent: Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Expires: 3600
Supported: path
Content-Length: 0
]]>
</send>
<recv response="200">
</recv>
<send retrans="500">
<![CDATA[
INVITE sip:[service]#[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: 16001 <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:[service]#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 10 INVITE
Contact: <sip:16001#[local_ip]:[local_port]>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: VIRTUAL Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
X-FrankenSIP-TCID: plca_wan_audioonly_rtp
Session-Expires: 3600;refresher=uas
Min-SE: 90
Supported: timer
Content-Length: [len]
v=0
o=16001 0 0 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 9 103 8 101
a=rtcp:[media_port+1]
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/16000
a=fmtp:9 bitrate=64000
a=rtpmap:103 G7221/16000
a=fmtp:103 bitrate=32000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>
<recv response="100"
optional="true">
</recv>
<recv response="401"
auth="true">
</recv>
<send retrans="500">
<![CDATA[
INVITE sip:[service]#[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: 16001 <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:[service]#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 10 INVITE
Contact: <sip:16001#[local_ip]:[local_port]>
Content-Type: application/sdp
[authentication username=16001 password=asdfzxcvqwer]
Max-Forwards: 70
User-Agent: VIRTUAL Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
X-FrankenSIP-TCID: plca_wan_audioonly_rtp
Session-Expires: 3600;refresher=uas
Min-SE: 90
Supported: timer
Content-Length: [len]
v=0
o=16001 0 0 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 9 103 8 101
a=rtcp:[media_port+1]
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/16000
a=fmtp:9 bitrate=64000
a=rtpmap:103 G7221/16000
a=fmtp:103 bitrate=32000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>
<recv response="100"
optional="true">
</recv>
<recv response="180">
</recv>
<recv response="200">
</recv>
<!-- NOTE: [branch-5] is used to specify reuse of same [branch] value that was used five messages earlier (e.g. INVITE) -->
<send>
<![CDATA[
ACK sip:[service]#[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch-5]
From: "16001" <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:[service]#[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 10 ACK
User-Agent: VIRTUAL Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Content-Length: 0
]]>
</send>
<pause milliseconds="450" />
<send retrans="500">
<![CDATA[
BYE sip:[service]#[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch-1]
From: "16001" <sip:16001#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:[service]#[remote_ip]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 11 BYE
Contact: <sip:16001#[local_ip]:[local_port]>
Max-Forwards: 70
X-FrankenSIP-TCID: plca_wan_audioonly_rtp
User-Agent: VIRTUAL Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Content-Length: 0
]]>
</send>
<recv response="200">
</recv>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
and for 16002:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="Basic MCD UAS">
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:16002#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:16002#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Contact: <sip:16002#[local_ip]:[local_port];line=10d9fd07f9eb2d0>
Allow: INVITE, ACK, BYE, OPTIONS, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, INFO, MESSAGE
Max-Forwards: 70
User-Agent: Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Expires: 3600
Supported: path
Content-Length: 0
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="401" auth="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:16002#[remote_ip]:[remote_port]>;tag=[call_number]
To: <sip:16002#[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 2 REGISTER
Contact: <sip:16002#[local_ip]:[local_port];line=10d9fd07f9eb2d0>
[authentication username=16002 password=asdfzxcvqwer]
Allow: INVITE, ACK, BYE, OPTIONS, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, INFO, MESSAGE
Max-Forwards: 70
User-Agent: Mitel-UC-Endpoint (Mitel UC360 Collaboration Point/2.1.0.99; 08:00:0F:74:80:E1)
Expires: 3600
Supported: path
Content-Length: 0
]]>
</send>
<recv response="200">
</recv>
<recv request="INVITE" crlf="true">
</recv>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Server: VIRTUAL Mitel-3300-ICP 12.0.1.99
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
]]>
</send>
<send retrans="500">
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Server: VIRTUAL Mitel-3300-ICP 12.0.1.99
Content-Type: application/sdp
Content-Length: [len]
v=0
o=16002 0 0 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 9 103 8 101
a=rtcp:[media_port+1]
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/16000
a=fmtp:9 bitrate=64000
a=rtpmap:103 G7221/16000
a=fmtp:103 bitrate=32000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>
<recv request="ACK">
</recv>
<recv request="BYE">
</recv>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Server: VIRTUAL Mitel-3300-ICP 12.0.1.99
Content-Length: 0
]]>
</send>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
This fails due to this error from 16002:
2023-02-07 17:02:49.664581 1675807369.664581: Discarding message which can't be mapped to a known SIPp call:
INVITE sip:16002#192.168.1.20:5060;line=10d9fd07f9eb2d0 SIP/2.0
Thanks.

Given that sipp cannot do it alone, if your test cases are for SIP over UDP, then you can use another tool like sipsak or sipexer to do the registration for UAS side:
https://github.com/nils-ohlmeier/sipsak
https://github.com/miconda/sipexer
When UDP is used, there is no problem to send the REGISTER, wait for response, then the UAC (at this phase sipsak or sipexer) shuts down. The contact is kept by the server for the duration of the Expires header value.
Then you start sipp on the same local port as provided to sipsak or sipexer, with UAS scenario which no longer includes the registration part.
All these tools should allow to specify the local port (the port to listen on that shows up also in Contact header).
If you need a specific set of headers in the REGISTER sent by UAS side, sipexer has support for pretty flexible SIP message templates. Iirc, sipsak supports reading the SIP message from a file.
Disclaimer: I am the author of sipexer, but also a long time user of sipp and sipsak.

Related

SIP Route parameters: r2 and rpp

I'm using the VoIP provider Messagenet and I see that it sends this INVITE to my client:
INVITE sip:me#my.ip.address;transport=udp SIP/2.0
Record-Route: <sip:212.97.59.76:5061;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Record-Route: <sip:212.97.59.76;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Via: SIP/2.0/UDP 212.97.59.76:5061;branch=z9hG4bKb812.a8e25f17.0
Via: SIP/2.0/UDP 193.227.104.21:5060;branch=z9hG4bK1966d0a8
Max-Forwards: 69
From: "fromname" <sip:fromnumber#sip.messagenet.it>;tag=as2a6c9e96
To: <sip:mynumber#212.97.59.76>
Contact: <sip:fromnumber#193.227.104.21:5060>
Call-ID: 46cee45e062a30e3372663265a0be595#sip.messagenet.it
CSeq: 102 INVITE
User-Agent: whisky
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Mnet-InLeg: whisky:1530689207.16483286;NH9HCiZ0TqZGK1ACkkhlvh67g1ig7LPEf+W5lblauyjqYqxgm1B2stIr6Mog/CC6
Content-Type: application/sdp
Content-Length: 377
v=0
o=root 60186075 60186075 IN IP4 193.227.104.23
s=whisky
c=IN IP4 193.227.104.23
t=0 0
m=audio 50216 RTP/AVP 18 8 3 0 97 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
My question is: what do the parameters r2 and rpp mean in the Record-Route headers?
Record-Route: <sip:212.97.59.76:5061;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
Record-Route: <sip:212.97.59.76;r2=on;lr=on;ftag=as2a6c9e96;rpp=np>
I'm looking for some documentations about this, but I have found nothing until now.

Validity of SIP ACK response to SIP 200 OK message

We are sending a sip call to one of our partner. They are sending us “Record-Route” and “Contact” headers within 200 OK message. Our side is sending ACK to the IP address mentioned in the Record-Route but it is replacing the “Contact” header with “Route” header and other side is not honoring our ACK and sending us repeated 200 OK which results into call disconnection.
I am not sure if we are violating any SIP RFC by changing "Contact" header to "Route" while maintaining the contents of the header. Can anyone shed a light on it?
Here is the 200 OK from partner side:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
Here is our ACK to 200 OK message:
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
Here is the Entire SIP dialog:
INVITE sip:+200#200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
Contact: +100<sip:+100#100.100.100.100:5060>
User-Agent: Excel_CSP/84.11.34
Supported: timer
Session-Expires: 3660
Min-SE: 300
CSeq: 1 INVITE
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 144
v=0
o=sip 0 0 IN IP4 100.100.100.100
s=SIP_Call
c=IN IP4 100.100.100.230
t=0 0
m=audio 46750 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
To: +200<sip:+200#200.200.200.2:5060>
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Server: YATE/3.0.0
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Server: YATE/3.0.0
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 INVITE
Allow: ACK, INVITE, BYE, CANCEL
Content-Type: application/sdp
Server: YATE/3.0.0
Content-Length: 195
v=0
o=yate 1441225325 1441225325 IN IP4 201.201.201.30
s=SIP Call
c=IN IP4 201.201.201.30
t=0 0
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
ACK sip:200.200.200.2:5060 SIP/2.0
Via: SIP/2.0/UDP 100.100.100.100
To: +200<sip:+200#200.200.200.2:5060>;tag=784054843
From: +100<sip:+100#100.100.100.100:5060>;tag=4244235125227
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:+100#10.10.10.135:7654>
Content-Length: 0
BYE sip:+100#100.100.100.100:5060 SIP/2.0
Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
Max-Forwards: 69
Record-Route: <sip:200.200.200.2:5060;lr>
To: <sip:+100#100.100.100.100:5060>;tag=4244235125227
From: <sip:+200#200.200.200.2:5060>;tag=784054843
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 95618 BYE
Allow: ACK, INVITE, BYE, CANCEL
User-Agent: YATE/3.0.0
Reason: SIP;cause=408;text="Request Timeout"
Content-Length: 0
SIP/2.0 200 OK
To: <sip:+100#100.100.100.100:5060>;tag=4244235125227
From: <sip:+200#200.200.200.2:5060>;tag=784054843
Call-ID: CANTATA21.1a8.1200679.50#100.100.100.100
CSeq: 95618 BYE
Record-Route: <sip:200.200.200.2:5060;lr>
Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
User-Agent: Excel_CSP/84.11.34
Content-Length: 0
IP addresses and SIP TO/FROM information has been manually updated to conceal the original identity.
I have gone through RFC 3261 I found following on page # 161. I am not sure, how to read the following table. Does it mean that Contact header is not applicable in ACK to 2xx messages?
Header field where proxy ACK BYE CAN INV OPT REG
___________________________________________________________
Contact 2xx - - - m o o
The 200 Ok contains:
Record-Route: <sip:200.200.200.2:5060;lr>
Contact: <sip:+100#10.10.10.135:7654>
Your application doesn't look to understand the meaning of "lr" parameter: the "loose routing" parameter introduced in rfc3261. It's not even compatible with the initial rfc2543.
If your app was only compatible with rfc2543, the ACK would contains the exact message you have, but with the additionnal "lr" parameter. This would indicate to the server that the order is rfc2543, and in theory, the server would understand and re-order: (rfc3261, Section 16.6, Step 6. Postprocess routing information)
ACK sip:200.200.200.2:5060;lr SIP/2.0
Route: <sip:+100#10.10.10.135:7654>
However, a correct message should be compliant with latest rfc3261, and thus your app has to generate the following SIP message:
ACK sip:+100#10.10.10.135:7654 SIP/2.0
Route: <sip:200.200.200.2:5060;lr>
The whole issue is about wrong handling of the "lr" parameter in your application! The solution is to fix the missing "lr" and make sure the order is accurate according to rfc3261.
I'm guessing you've stripped out some parts of the SIP headers when you posted your question. Most of the Via headers are missing the mandatory branches parameter which is particularly crucial in INVITE transaction processing.
Aside from the problem AymericM hash highlighted with regards the Contact and Route headers you "could" also have another problem with regards the Via header branch parameter in your ACK request. Specifically you should take a look at Chapters 13.2.2.4 2xx Responses and 17.1.1.3 Construction of the ACK Request for details on how ACK requests should be constructed.
The key is that the ACK request must start a NEW transaction when acknowledging a non 2xx failure response. When acknowledging a 2xx response the ACK request must be an in-transaction request and use the same header fields, including the Via header branch parameter, as the original INVITE request.
Construction of ACK requests is one of the biggest gotchas in SIP.

sip - replay a pcap file with sipp

i am trying to replay an captured pcap file with sipp.
My setup has 2 pc's and a proxy. The receiving pc has linphone and should be able to answer a call from the other pc which sends a pcap file with sipp.
I have recorded the media with wireshark and saved it as *.pcap.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="UAC with media">
<!-- In client mode (sipp placing calls), the Call-ID MUST be -->
<!-- generated by sipp. To do so, use [call_id] keyword. -->
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:[field0]#[field2]>;tag=[call_number]
To: <sip:[field0]#[field2]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Contact: <sip:[field0]#[local_ip]:[local_port]>
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Content-Length: 0
]]>
</send>
<!-- asterisk -->
<recv response="100" optional="true">
</recv>
<recv response="401" auth="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0]#[field2]>;tag=[call_number]
To: <sip:[field0]#[field2]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Contact: <sip:[field0]#[local_ip]>
[field3]
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Content-Length: 0
]]>
</send>
<!-- asterisk -->
<recv response="100" optional="true">
</recv>
<recv response="200">
</recv>
<send retrans="500">
<![CDATA[
INVITE sip:[field1]#[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:[field0]#[field2]>;tag=[call_number]
To: <sip:[field1]#[field2]>
Call-ID: [call_id]
CSeq: 20 INVITE
Contact: <sip:[field0]#[local_ip]:[local_port]>
Content-Type: application/sdp
Max-Forwards: 70
Subject: Phone Call
Content-Length: [len]
v=0
o=user1 123456 654321 IN IP[media_ip_type] [media_ip]
s=-
c=IN IP[local_ip_type] [local_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
m=video [media_port+2] RTP/AVP 99 98 34 100
a=rtpmap:99 MP4V-ES/90000
a=fmtp:99 profile-level-id=3
a=rtpmap:98 H263-1998/90000
a=fmtp:98 CIF=1;QCIF=1
a=rtpmap:34 H263/90000
a=rtpmap:100 x-snow/90000
a=sendrecv
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="200" rtd="true" crlf="true">
</recv>
<!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
<send>
<![CDATA[
ACK sip:[field1]#[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
Route: <sip:[remote_ip]:[remote_port];lr=on>
From: <sip:[field0]#[field2]>;tag=[call_number]
To: <sip:[field1]#[field2]>
Call-ID: [call_id]
CSeq: 20 ACK
Contact: <sip:[field0]#[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Phone Call
Content-Length: [len]
]]>
</send>
<!-- Play a pre-recorded PCAP file (RTP stream) -->
<nop>
<action>
<exec play_pcap_audio="/home/MM08-T/Desktop/owntest.pcap"/>
</action>
</nop>
<pause milliseconds="10000"/>
<!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send retrans="500">
<![CDATA[
BYE sip:[field1]#[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Route: <sip:[remote_ip]:[remote_port];lr=on>
From: <sip:[field0]#[field2]>;tag=[call_number]
To: <sip:[field1]#[field2]>
Call-ID: [call_id]
CSeq: 21 BYE
Contact: <sip:[field0]#[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Phone Call
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true">
</recv>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
and the injection-file:
SEQUENTIAL MM08-T;MM08-O;lab.ibk.tuwien.ac.at;[authentication
username=MM08-T password=UHzd7wv0];
The problem is that I always get the error-message:
2014-05-28 16:27:32:278 1401287252.278473: Aborting call on unexpected
message for Call-Id '10-12715#192.168.108.105': while expecting '180'
(index 8), received 'SIP/2.0 101 Dialog Establishement Via:
SIP/2.0/UDP 192.168.108.105:5061;rport=5061;branch=z9hG4bK-12715-10-6
Record-Route: From:
;tag=10 To:
;tag=1157919833 Call-ID:
10-12715#192.168.108.105 CSeq: 20 INVITE Contact:
User-Agent: Linphone/3.3.99.6
(eXosip2/3.3.0) Content-Length: 0 P-hint:
'. sipp: There were more errors, enable -trace_err to log them.
It seems to me like the scenario-file has some problem but i just can't find anything wrong.
Has anyone got any clue?
According to error message you posted here, the SIPP xml script do not handle "101 Dialog Establishment" response from the Linphone.
You can try to add 101 response handling in your XML file (as optional), and try again.
<recv response="101" optional="true">
</recv>

Asterisk failed to deliver sound on LTE(4G) network

I've installed Asterisk 11, and two wifi phones are fine to talk through asterisk server. However, a wifi phone and LTE(4G) phone can't deliver sounds.
Asterisk sip.conf
[general]
context=default ; Default context for incoming calls
bindport=5060 ; bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=alaw
register => 12121111111:1234:11111111#sipauth.deltathree.com/1000
srvlookup=no
directrtpsetup=yes
trustpid=yes
sendrpid=no
qualify=yes
callevents=yes
insecure=invite
pedantic=no
videosupport=yes
canreinvite=yes
nat=yes
externip=XXX.XXX.91.12
localnet=10.7.21.4/255.255.255.0
qualify=yes
directmedia=yes
Sip settings
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: Yes
User Agent: Asterisk PBX 11.8.1
SDP Session Name: Asterisk PBX 11.8.1
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: asterisk
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: -1
SIP realtime: Enabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS0
IP ToS RTP audio: CS0
IP ToS RTP video: CS0
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Enabled using externhost
Externhost: XXX.52.91.12:0
Externaddr: XXX.52.91.12:0
Externrefresh: 600
Localnet: XX.7.21.0/255.255.255.0
XX.7.21.0/255.255.255.0
Global Signalling Settings:
---------------------------
Codecs: (ulaw|alaw)
Codec Order: ulaw:20,alaw:20
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 0 (Disabled)
RTP Hold Timeout: 0 (Disabled)
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: No
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: No
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: default
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 2000
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language:
Tone zone: <Not set>
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: asterisk
Realtime SIP Settings:
----------------------
Realtime Peers: Yes
Realtime Regs: No
Cache Friends: No
Update: Yes
Ignore Reg. Expire: No
Save sys. name: No
Auto Clear: 120 (Disabled)
sip logs
When I look at sip logs, it looks like fine. I just see one more "invite" from server to wifi-phone.
interface: eth0 (10.7.21.0/255.255.255.0)
filter: ( port 5060 ) and (ip or ip6)
#
U 2014/04/16 22:46:28.514023 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
INVITE sip:2000#asterisk-sip-domain.com SIP/2.0.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;rport.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>.
CSeq: 20 INVITE.
Call-ID: Z6lXHBKOyd.
Max-Forwards: 70.
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Content-Type: application/sdp.
Content-Length: 372.
Contact: <sip:1000#//WIFI-PUBLIC-IP//:1495>;+sip.instance="<urn:uuid:41bf1699-9e9a-4817-8b8c-e51f7b4ae2dc>".
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
.
v=0.
o=1000 2350 2859 IN IP4 //WIFI-PRIVATE-IP//.
s=Talk.
c=IN IP4 //WIFI-PRIVATE-IP//.
b=AS:380.
t=0 0.
m=audio 7076 RTP/AVP 124 120 111 110 0 8 101.
a=rtpmap:124 opus/48000.
a=fmtp:124 useinbandfec=1; usedtx=1.
a=rtpmap:120 SILK/16000.
a=rtpmap:111 speex/16000.
a=fmtp:111 vbr=on.
a=rtpmap:110 speex/8000.
a=fmtp:110 vbr=on.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:28.517399 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Length: 0.
.
#
U 2014/04/16 22:46:28.522887 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
INVITE sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:28 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 258.
.
v=0.
o=root 1526682879 1526682879 IN IP4 //WIFI-PRIVATE-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //WIFI-PRIVATE-IP//.
t=0 0.
m=audio 7076 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=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:29.022450 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
INVITE sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:28 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 258.
.
v=0.
o=root 1526682879 1526682879 IN IP4 //WIFI-PRIVATE-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //WIFI-PRIVATE-IP//.
t=0 0.
m=audio 7076 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=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:29.113047 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: sip:2000#//LTE-PHONE-PUBLIC-IP//:63968.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
.
#
U 2014/04/16 22:46:29.426139 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
#
U 2014/04/16 22:46:29.426158 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
#
U 2014/04/16 22:46:29.427976 f:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Length: 0.
.
** (WHY IT MAKES ONE MORE INVITE FROM SERVER TO WIFI-PHONE???)**
#
U 2014/04/16 22:46:30.307448 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:48504
INVITE sip:1000#//WIFI-PUBLIC-IP//:48504 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK451726cf;rport.
Max-Forwards: 70.
From: <sip:2000#//AMAZON-EC2-SERVER//>;tag=as30b8a8a5.
To: <sip:1000#//WIFI-PUBLIC-IP//:48504>.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 1c2fd2cd6a4ac372408845e8077ba2b5#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Date: Wed, 16 Apr 2014 13:46:14 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 259.
.
v=0.
o=root 741350827 741350827 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
t=0 0.
m=audio 30390 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=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:30.816230 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK12ab34f9;rport.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Contact: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;+sip.instance="<urn:uuid:8afceca3-368f-4f57-a586-6056d3492371>".
Content-Type: application/sdp.
Content-Length: 183.
.
v=0.
o=2000 2310 1562 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Talk.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
b=AS:380.
t=0 0.
m=audio 30390 RTP/AVP 0 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:30.816888 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
ACK sip:2000#//LTE-PHONE-PUBLIC-IP//:63968 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK680dd0d2;rport.
Max-Forwards: 70.
From: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
To: <sip:2000#//LTE-PHONE-PUBLIC-IP//:63968>;tag=zZBSo25.
Contact: <sip:1000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 102 ACK.
User-Agent: Asterisk PBX 11.8.1.
Content-Length: 0.
.
#
U 2014/04/16 22:46:30.817278 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
SIP/2.0 200 OK.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;branch=z9hG4bK.FuKwv3ZMW;received=//WIFI-PUBLIC-IP//;rport=1495.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
Call-ID: Z6lXHBKOyd.
CSeq: 20 INVITE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Content-Type: application/sdp.
Content-Length: 261.
.
v=0.
o=root 1551912347 1551912347 IN IP4 //LTE-PHONE-PUBLIC-IP//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //LTE-PHONE-PUBLIC-IP//.
t=0 0.
m=audio 30390 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=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:30.925455 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
ACK sip:2000#//AMAZON-EC2-SERVER//:5060 SIP/2.0.
Via: SIP/2.0/UDP //WIFI-PRIVATE-IP//:48504;rport;branch=z9hG4bK.qV8rz6rI4.
From: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
To: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
CSeq: 20 ACK.
Call-ID: Z6lXHBKOyd.
Max-Forwards: 70.
.
#
U 2014/04/16 22:46:35.277987 //LTE-PHONE-PUBLIC-IP//:63968 -> //AMAZON-EC2-PRIVATE-IP//:5060
BYE sip:1000#//AMAZON-EC2-SERVER//:5060 SIP/2.0.
Via: SIP/2.0/UDP //LTE-PHONE-PUBLIC-IP//:63968;branch=z9hG4bK.Jfn1vpiLT;rport.
From: <sip:2000#//LTE-PHONE-PUBLIC-IP//>;tag=zZBSo25.
To: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
CSeq: 111 BYE.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
Max-Forwards: 70.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
.
#
U 2014/04/16 22:46:35.278525 //AMAZON-EC2-PRIVATE-IP//:5060 -> //LTE-PHONE-PUBLIC-IP//:63968
SIP/2.0 200 OK.
Via: SIP/2.0/UDP //LTE-PHONE-PUBLIC-IP//:63968;branch=z9hG4bK.Jfn1vpiLT;received=//LTE-PHONE-PUBLIC-IP//;rport=63968.
From: <sip:2000#//LTE-PHONE-PUBLIC-IP//>;tag=zZBSo25.
To: <sip:1000#//AMAZON-EC2-SERVER//>;tag=as4a4e67da.
Call-ID: 60d3866362c2076357b37d2d4b930652#//AMAZON-EC2-SERVER//:5060.
CSeq: 111 BYE.
Server: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.278797 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
INVITE sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 11.8.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 259.
.
v=0.
o=root 1551912347 1551912348 IN IP4 //AMAZON-EC2-SERVER//.
s=Asterisk PBX 11.8.1.
c=IN IP4 //AMAZON-EC2-SERVER//.
t=0 0.
m=audio 19500 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=ptime:20.
a=sendrecv.
#
U 2014/04/16 22:46:35.418765 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
.
#
U 2014/04/16 22:46:35.441248 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK1930727f;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 102 INVITE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE.
Contact: <sip:1000#//WIFI-PUBLIC-IP//:1495>;+sip.instance="<urn:uuid:41bf1699-9e9a-4817-8b8c-e51f7b4ae2dc>".
Content-Type: application/sdp.
Content-Length: 180.
.
v=0.
o=1000 2350 2861 IN IP4 //WIFI-PRIVATE-IP//.
s=Talk.
c=IN IP4 //WIFI-PRIVATE-IP//.
b=AS:380.
t=0 0.
m=audio 7076 RTP/AVP 0 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
#
U 2014/04/16 22:46:35.441661 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
ACK sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK7dd12d7d;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Contact: <sip:2000#//AMAZON-EC2-SERVER//:5060>.
Call-ID: Z6lXHBKOyd.
CSeq: 102 ACK.
User-Agent: Asterisk PBX 11.8.1.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.441754 //AMAZON-EC2-PRIVATE-IP//:5060 -> //WIFI-PUBLIC-IP//:1495
BYE sip:1000#//WIFI-PUBLIC-IP//:1495 SIP/2.0.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK48ef4999;rport.
Max-Forwards: 70.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 103 BYE.
User-Agent: Asterisk PBX 11.8.1.
X-Asterisk-HangupCause: Normal Clearing.
X-Asterisk-HangupCauseCode: 16.
Content-Length: 0.
.
#
U 2014/04/16 22:46:35.474403 //WIFI-PUBLIC-IP//:1495 -> //AMAZON-EC2-PRIVATE-IP//:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP //AMAZON-EC2-SERVER//:5060;branch=z9hG4bK48ef4999;rport.
From: "........." <sip:2000#asterisk-sip-domain.com>;tag=as380612c6.
To: <sip:1000#asterisk-sip-domain.com>;tag=8ClA8ivYF.
Call-ID: Z6lXHBKOyd.
CSeq: 103 BYE.
User-Agent: LinphoneAndroid/1.0.1 (belle-sip/1.3.1).
Supported: replaces, outbound.
.
exit
21 received, 0 dropped
Do you see why it failed to deliver sound when a device is on LTE(4G) network?
I changed below code in sip.conf and user's conf.
canreinvite = yes
It all worked fine. However, it delivers sound through Asterisk Server, which means the server has to take care of voice traffic.

Failure of SIP Proxy Authentication

I'm developing a SIP user agent application that connects to an Asterisk server and tries to do an outgoing call. I'm using the NIST implementation of the JAIN SIP API.
The application first registers itself successfully. Then, when the application transmits an INVITE request to an X-Lite SIP soft phone, Asterisk responds with a 407 (Proxy Authentication Required) response. The response contains a Proxy-Authenticate header. My application sends an INVITE again, but this time with the Proxy-Authorization header, upon which Asterisk responds with 488 (Not acceptable here).
Here follows the SIP conversation ('>>' indicates outgoing messages; '<<' indicates incoming messages):
>> REGISTER sip:10.0.84.30:5060 SIP/2.0
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
CSeq: 1 REGISTER
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK493cd4b63090dc9a8027931937b737c9353835
Max-Forwards: 70
Contact: <sip:10.0.85.3:5060>
Expires: 300
Content-Length: 0
<< SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK493cd4b63090dc9a8027931937b737c9353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
CSeq: 1 REGISTER
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Contact: <sip:301#10.0.84.30>
Content-Length: 0
<< SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK493cd4b63090dc9a8027931937b737c9353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>;tag=as4d134cc6
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
CSeq: 1 REGISTER
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Contact: <sip:301#10.0.84.30>
WWW-Authenticate: Digest realm="asterisk",nonce="27ca4a51"
Content-Length:0
>> REGISTER sip:10.0.84.30:5060 SIP/2.0
CSeq: 2 REGISTER
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bKe339b4ed9edc5d75379673b6dec7fc42353835
Max-Forwards: 70
Contact: <sip:10.0.85.3:5060>
Expires: 300
Authorization: Digest username="301",realm="asterisk",nonce="27ca4a51",response="cfdcdff7ddee99d10c3099e88ffb73af",algorithm=MD5,uri="sip:10.0.84.30:5060",nc=00000001
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
Content-Length: 0
<< SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bKe339b4ed9edc5d75379673b6dec7fc42353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
CSeq: 2 REGISTER
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Contact: <sip:301#10.0.84.30>
Content-Length: 0
<< SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bKe339b4ed9edc5d75379673b6dec7fc42353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=0vmZig
To: <sip:301#asterisk>;tag=as4d134cc6
Call-ID: 7f2d15884ab375fc7b5d32fdd28426d5#10.0.85.3
CSeq: 2 REGISTER
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Expires: 300
Contact: <sip:10.0.85.3:5060>;expires=300
Date: Tue, 03 May 2011 09:37:45 GMT
Content-Length: 0
>> INVITE sip:302#asterisk SIP/2.0
Call-ID: 003d85b0d0868f6f2a2d8c324d7f1d54#10.0.85.3
CSeq: 3 INVITE
From: <sip:301#asterisk>;tag=sJSeLA
To: <sip:302#asterisk>
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK6704cd9554c0c8e5bc94bc42b606147a353835
Max-Forwards: 70
Contact: <sip:10.0.85.3:5060>
Route: <sip:10.0.84.30:5060;lr>
Content-Type: application/sdp
Content-Length: 106
v=0
o=- 3513403599 3513403599 IN IP4 10.0.85.3
s=-
c=IN IP4 10.0.85.3
t=0 0
m=audio 40000 RTP/AVP 3
<< SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK6704cd9554c0c8e5bc94bc42b606147a353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=sJSeLA
To: <sip:302#asterisk>;tag=as7358e1b8
Call-ID: 003d85b0d0868f6f2a2d8c324d7f1d54#10.0.85.3
CSeq: 3 INVITE
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Contact: <sip:302#10.0.84.30>
Proxy-Authenticate: Digest realm="asterisk",nonce="55deefb6"
Content-Length: 0
>> INVITE sip:302#asterisk SIP/2.0
CSeq: 4 INVITE
From: <sip:301#asterisk>;tag=sJSeLA
To: <sip:302#asterisk>
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK6e3501c0973664fcd7a17affddd23572353835
Max-Forwards: 70
Contact: <sip:10.0.85.3:5060>
Route: <sip:10.0.84.30:5060;lr>
Content-Type: application/sdp
Proxy-Authorization: Digest username="301",realm="asterisk",nonce="55deefb6",response="47e2c7abe625e4a183726e29c035d7e0",algorithm=MD5,uri="sip:302#asterisk",nc=00000001
Call-ID: 003d85b0d0868f6f2a2d8c324d7f1d54#10.0.85.3
Content-Length: 106
v=0
o=- 3513403599 3513403599 IN IP4 10.0.85.3
s=-
c=IN IP4 10.0.85.3
t=0 0
m=audio 40000 RTP/AVP 3
<< SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 10.0.85.3:5060;branch=z9hG4bK6e3501c0973664fcd7a17affddd23572353835;received=10.0.85.3
From: <sip:301#asterisk>;tag=sJSeLA
To: <sip:302#asterisk>;tag=as7358e1b8
Call-ID: 003d85b0d0868f6f2a2d8c324d7f1d54#10.0.85.3
CSeq: 4 INVITE
User-Agent: Asterisk PBX (switchvox)
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Contact: <sip:302#10.0.84.30>
Content-Length: 0
What am I doing wrong here, causing the 488 response?
The 488 response is almost certainly because of a codec mismatch between your SIP client and your Asterisk server. In your SIP trace your client is requesting the call use the GSM codec and my guess is your Asterisk server is configured to not allow GSM.
Either re-configure your Asterisk server to accept GSM or try changing your SDP to use ULAW or ALAW as it's pretty rare for Asterisk to be configured not to accept those.
In the below sample not the change to the end of the m= line. 0 corresponds to PCMU (ULAW) and 8 corresponds to PCMA (ALAW).
v=0
o=- 3513403599 3513403599 IN IP4 10.0.85.3
s=-
c=IN IP4 10.0.85.3
t=0 0
m=audio 40000 RTP/AVP 0 8