SDP invite issues

I’m having issues building a call Anyone have any ideas what I need to set. The provider is Level 3, I have a host in AWS.

Reliably Transmitting (NAT) to 8.48.100.197:5060:
OPTIONS sip:8.48.100.197 SIP/2.0
Via: SIP/2.0/UDP 54.208.146.133:5060;branch=z9hG4bK3babdf77;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@54.208.146.133;tag=as4146cd79
To: sip:8.48.100.197
Contact: sip:asterisk@54.208.146.133:5060
Call-ID: 2390cbd022aa05796d00b30f6842850c@54.208.146.133:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 16.1.0
Date: Wed, 02 Jan 2019 20:44:57 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:8.48.100.197:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 54.208.146.133:5060;branch=z9hG4bK3babdf77;received=54.209.146.133;rport=5060
From: “asterisk” sip:asterisk@54.208.146.133;tag=as4146cd79
To: sip:8.48.100.197;tag=abc123
Call-ID: 2390cbd022aa05796d00b30f6842850c@54.208.146.133:5060
CSeq: 102 OPTIONS
Contact: sip:ANONYMOUS@8.48.100.197:5060
Allow: INVITE,ACK,CANCEL,BYE,REFER,PRACK,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Supported: timer,100rel,replaces
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Really destroying SIP dialog ‘2390cbd022aa05796d00b30f6842850c@54.208.146.133:5060’ Method: OPTIONS

<— SIP read from UDP:8.48.100.197:5060 —>
INVITE sip:+15719188345@54.209.146.133:5060 SIP/2.0
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060
Recv-Info: x-broadworks-client-session-info
Content-Length: 308
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 663008 770848 IN IP4 8.48.100.197
s=SIP Media Capabilities
c=IN IP4 8.48.100.196
t=0 0
m=audio 6038 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:20
<------------->
— (14 headers 14 lines) —
Sending to 8.48.100.197:5060 (no NAT)
Sending to 8.48.100.197:5060 (no NAT)
Using INVITE request as basis request - 1159736633_115077078@8.48.100.197
Found peer ‘level3a’ for ‘+18166121300’ from 8.48.100.197:5060
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - (g729|ulaw), peer - audio=(ulaw|alaw|g729)/video=(nothing)/text=(nothing), combined - (g729|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 8.48.100.196:6038
Looking for +15719188345 in incoming (domain 54.209.146.133)
sip_route_dump: route/path hop: sip:+18166121300@8.48.100.197:5060

<— Transmitting (NAT) to 8.48.100.197:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Length: 0

<------------>
Audio is at 10684
Adding codec g729 to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to 8.48.100.197:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv

<------------>
Retransmitting #1 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


Retransmitting #2 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


Retransmitting #3 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


Retransmitting #4 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


Retransmitting #5 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


Scheduling destruction of SIP dialog ‘1159736633_115077078@8.48.100.197’ in 6400 ms (Method: INVITE)
optel35*CLI> end
No such command ‘end’ (type ‘core show help end’ for other possible commands)
Retransmitting #6 (NAT) to 8.48.100.197:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B2b66540152196521;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK00063b63
To: sip:+15719188345@54.209.146.133:5060;tag=as6ec0214b
Call-ID: 1159736633_115077078@8.48.100.197
CSeq: 874900 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.208.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 971785450 971785450 IN IP4 54.208.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.208.146.133
t=0 0
m=audio 10684 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


[Jan 2 14:45:35] WARNING[3257]: chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission 1159736633_115077078@8.48.100.197 for seqno 874900 (Critical Response) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
Really destroying SIP dialog ‘1159736633_115077078@8.48.100.197’ Method: INVITE

The problem isn’t with SDP. It is that the 200 OK is not reaching its destination, or the ACK is not coming back from there.

Hm. so the issue is a packet back to the 54 host. Hm…

I’m at a loss.

I have to believe its nat configs but I have

externaddr = 54.208.146.133
externip = 54.208.146.133
localnet=10.123.240.0/255.255.255.0
media_address=54.208.146.133
rtptimeout=200

and
[level3a]
type=peer
context=incoming
directmedia=no
qualify=yes
host=8.48.100.197
disallow=all
allow=g729
allow=ulaw
nat=force_rport,comedia

setup

The remote side would be sending the 200 OK to 54.208.146.133 port 5060. If you aren’t seeing it in the Asterisk SIP trace then you can go a step above and do a tcpdump on the system to see if it is getting firewalled there. If not then it is outside of Asterisk and the system itself, and likely AWS In some way.

Oh, actually, I think your IP address is wrong in your configuration. The INVITE went to “54.209.146.133” while you have “54.208.145.133” configured in your NAT settings.

Thats one error for sure.

I’m not building the audio stream up. I wonder if Level 3 has more address in use for the media stream.

It’s entirely possible… and the thing I mentioned would be causing the problem you’ve presented. If after fixing it a problem still occurs you would need to provide new information and details.

I have a sip debug on, as well additional verbosity logging. The dial plan answers the call and plays back an audio file.

<— SIP read from UDP:8.48.100.197:5060 —>
INVITE sip:+15719188345@54.209.146.133:5060 SIP/2.0
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B32695353b168c74e
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
To: sip:+15719188345@54.209.146.133:5060
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 752393 INVITE
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060
Recv-Info: x-broadworks-client-session-info
Content-Length: 308
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 589346 388760 IN IP4 8.48.100.197
s=SIP Media Capabilities
c=IN IP4 8.48.100.196
t=0 0
m=audio 6188 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:20
<------------->
— (14 headers 14 lines) —
Sending to 8.48.100.197:5060 (no NAT)
Sending to 8.48.100.197:5060 (no NAT)
Using INVITE request as basis request - 1298150443_67011543@8.48.100.197
Found peer ‘level3a’ for ‘+18166121300’ from 8.48.100.197:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - (g729|ulaw), peer - audio=(ulaw|alaw|g729)/video=(nothing)/text=(nothing), combined - (g729|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7f7dfc006010 – Strict RTP learning after remote address set to: 8.48.100.196:6188
Peer audio RTP is at port 8.48.100.196:6188
Looking for +15719188345 in incoming (domain 54.209.146.133)
sip_route_dump: route/path hop: sip:+18166121300@8.48.100.197:5060

<— Transmitting (NAT) to 8.48.100.197:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B32695353b168c74e;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
To: sip:+15719188345@54.209.146.133:5060
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 752393 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.209.146.133:5060
Content-Length: 0

<------------>
– Executing [+15719188345@incoming:1] NoOp(“SIP/level3a-00000003”, “ets”) in new stack
– Executing [+15719188345@incoming:2] Answer(“SIP/level3a-00000003”, “”) in new stack
Audio is at 19186
Adding codec g729 to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to 8.48.100.197:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B32695353b168c74e;received=8.48.100.197;rport=5060
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
To: sip:+15719188345@54.209.146.133:5060;tag=as258eb59e
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 752393 INVITE
Server: Asterisk PBX 16.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:+15719188345@54.209.146.133:5060
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 831230143 831230143 IN IP4 54.209.146.133
s=Asterisk PBX 16.1.0
c=IN IP4 54.209.146.133
t=0 0
m=audio 19186 RTP/AVP 18 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
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:8.48.100.197:5060 —>
ACK sip:+15719188345@54.209.146.133:5060 SIP/2.0
Via: SIP/2.0/UDP 8.48.100.197:5060;branch=z9hG4bK00B326ca04eb168c74e
From: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
To: sip:+15719188345@54.209.146.133:5060;tag=as258eb59e
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 752393 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
— (8 headers 0 lines) —
– Executing [+15719188345@incoming:3] Playback(“SIP/level3a-00000003”, “tt-weasels”) in new stack
– <SIP/level3a-00000003> Playing ‘tt-weasels.g729’ (language ‘en’)
– Auto fallthrough, channel ‘SIP/level3a-00000003’ status is ‘UNKNOWN’
Scheduling destruction of SIP dialog ‘1298150443_67011543@8.48.100.197’ in 6400 ms (Method: ACK)
Reliably Transmitting (NAT) to 8.48.100.197:5060:
BYE sip:+18166121300@8.48.100.197:5060 SIP/2.0
Via: SIP/2.0/UDP 54.209.146.133:5060;branch=z9hG4bK16782f63;rport
Max-Forwards: 70
From: sip:+15719188345@54.209.146.133:5060;tag=as258eb59e
To: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 102 BYE
User-Agent: Asterisk PBX 16.1.0
X-Asterisk-HangupCause: Unknown
X-Asterisk-HangupCauseCode: 0
Content-Length: 0


<— SIP read from UDP:8.48.100.197:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 54.209.146.133:5060;branch=z9hG4bK16782f63;rport=5060
From: sip:+15719188345@54.209.146.133:5060;tag=as258eb59e
To: “Siemens Daniel” sip:+18166121300@8.48.100.197:5060;tag=gK0054e5be
Call-ID: 1298150443_67011543@8.48.100.197
CSeq: 102 BYE
Content-Length: 0

The SIP negotiation is now succeeding. Using “rtp set debug on” would show you if you are sending media and receiving it. Anything from here would seem to be outside of Asterisk as the SIP and SDP is fine.

I found it.,

Level 3 is doing media on other ports. I needed to open up my firewall rules to allow traffic on the /29

So if anyone uses Level 3 Enterprise VOIP Trunking they will most likely just tell you the IP address only but you have to open up the subnet which is usually a /29.