Change externip info and calls drop after 20 seconds SOLVED

I have been researching this for a week now, so I would like to start by stating that my ports are in order, and all possible configurations that I have found solutions for have not fixed my issue

ISSUE: I have a remote sip device (grandstream gxp280) and when enter the following data into the sip_general_custom.conf file, my remote sip devices function correctly but it causes all incoming calls to drop after 20 seconds.

externip=190.144.xxx.yyy
localhost=192.168.1.0/255.255.255.0 ; (I used localhost instead of localnet as per sip.conf, but of course tried both)
nat=yes

FACTS: I run FreePBX 2.8.0.3, Asterisk 1.6.2.13, Dahdi-Linux 2.4.0. The Asterisk server is behind a Sonicwall firewall with a dmz pointing to the IP of the Ast. server. The remote sip device is behind a NAT router with a dmz pointing to the IP phone. When info is ‘#’ out incoming calls have no problems, remote sip devices have no outgoing sound and the call drops after 15-20 seconds. My external Public IP is different that the SIP trunk IP.

I thank you in advance for any info you can send my way and please let me know if I forgot any pertinant info.

Are they dropping because of a lack of reply to a critical packet, the lack of RTP, or because the phone has sent BYE?

I am not sure, I ran the RTP stats feature and here are the results of the call after it drops:

RTP-stats

  • Our Receiver:
    SSRC: 575017027
    Received packets: 993
    Lost packets: 0
    Jitter: 0.0004
    Transit: -0.2484
    RR-count: 0
  • Our Sender:
    SSRC: 1550562808
    Sent packets: 923
    Lost packets: 0
    Jitter: 0
    SR-count: 3
    RTT: 0.033000
    RTP-stats
  • Our Receiver:
    SSRC: 3510721284
    Received packets: 633
    Lost packets: 0
    Jitter: 0.0001
    Transit: -0.0002
    RR-count: 0
  • Our Sender:
    SSRC: 702592953
    Sent packets: 621
    Lost packets: 0
    Jitter: 0
    SR-count: 2
    RTT: 0.000000

Im not sure if this is the way to test, so if I am missing something please let me know. On further investigation, it seems that packet loss would explain my problem, but I am certain that the NAT is properly configured.

ADDITIONAL INFO: I actually have two IP addresses: one for the SIP Trunks (172.22.AA.CC) from my service provider and one is my external Public Ip (the 190.144.XXX.YYY). When FreePBX is set to the 172.22.AA.CC all incoming calls are fine but remote extensions have no incoming or outgoing audio and drop the call after 20 seconds. When I change it, the call drops as I originally stated.

Thank you for your help.

After further testing found this:
RTP-stats

  • Our Receiver:
    SSRC: 572919875
    Received packets: 1512
    Lost packets: 0
    Jitter: 0.0051
    Transit: -0.2406
    RR-count: 4
  • Our Sender:
    SSRC: 775363918
    Sent packets: 373
    Lost packets: 2494531
    Jitter: 12334
    SR-count: 2
    RTT: 38297.336000
    RTP-stats
  • Our Receiver:
    SSRC: 0
    Received packets: 0
    Lost packets: 1
    Jitter: 0.0000
    Transit: 0.0000
    RR-count: 0
  • Our Sender:
    SSRC: 96328263
    Sent packets: 1074
    Lost packets: 0
    Jitter: 0
    SR-count: 4
    RTT: 0.000000

Obviously I am losing packets. I know my ports are set up correctly so what could it be?

I was able to obtain stats on the calls received. When i looked into this document I find that the caller is sending invite after invite and because my machine does not respond with an ACK, Asterisk times out and hangs up. This is a guess!!

What I am GUESSING is happening is when the softswitch of my service provider is sending invites to @172.22.AA.CC my Asterisk is not responding because I have the external IP address set to 190.144.XXX.YYY.

Is this the case? Any ideas?

ACK is sent by the same party that sends the INVITE. Repeated INVITEs indicate a failure to get a status reponse.

It does sound like you have some sort of broken NAT configuration.

Thank you David55 for your response. Firstly, sorry for the noob response! :s My next question is, is the change in externip causing the problems in the reponse to the invite since the Invites are sent to the SIP Trunk IP and I have the Asterisk IP set to the External Internet IP?

FYI. The SIP Trunk IP does not have an Internet connection behind it, it is connected directly to the softswitch of the service provider.

Again, thank you very much for your help on this.

Another point of possible interest: The trunk IP plugs into one NIC (directly into the NIc and bypasses the firewall) and the Internet IP plugs into another (via firewall). Could this be causing the problem? If so, where can I find the config file to change which NIC Asterisk looks to for the SIP trunks? Can I change that to the Internet IP and plug the trunks IP into the firewall?

Is anyone out there :smile:

So after even more investigation I found my way into the Sip debug function and found a better example of the problem.

This is the Invite ouput when I set FreePBX to the Trunk IP (172.22.AA.CC):

<— Reliably Transmitting (NAT) to 200.13.230.38:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK94de.c0c.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.869533b3
Record-Route: sip:200.13.230.38:5060;ftag=8695336e;lr=on;did=2b1.d271
From: “45797315” sip:45797315@italtel.com;user=phone;tag=8695336e
To: sip:44039142@200.13.230.38;user=phone;tag=as26441657
Call-ID: 8695339b8695338-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039142@172.22.AA.CC
Content-Type: application/sdp
Content-Length: 304

v=0
o=root 1645592741 1645592741 IN IP4 172.22.AA.CC
s=Asterisk PBX 1.6.2.13
c=IN IP4 172.22.AA.CC
t=0 0
m=audio 12140 RTP/AVP 0 3 18 99
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:99 telephone-event/8000
a=fmtp:99 0-16
a=ptime:20
a=sendrecv

And here it is with the External Public Internet IP (190.144.XXX.YYY)

Retransmitting #6 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.XXX.YYY
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.XXX.YYY
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.XXX.YYY
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv

I am pretty sure since the Internet IP is not where my trunks are located, I am giving no response or sending the response to the wrong IP and/or NIC. I am beginning to think I may have to get into the Asterisk code and hardcode the IP address. Any thoughts?

Your opinion is wrong :smile:

Copy/paste the SIP debug of the entire call.

Here is the entire call with my external public Internet IP set and the externip. Thanks for taking a look:

<------------->
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c:
<— SIP read from UDP:200.13.230.38:5060 —>
INVITE sip:4039143@172.22.53.90;user=phone SIP/2.0
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
To: sip:44039143@200.13.230.38;user=phone
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Route: sip:200.13.230.38;lr
Max-Forwards: 69
Contact: sip:2686064.iIiIiI.0a010705.@200.13.234.200
Allow: INVITE, ACK, PRACK, CANCEL, BYE, OPTIONS, MESSAGE, NOTIFY, UPDATE, REGISTER, INFO, REFER, SUBSCRIBE
P-Asserted-Identity: sip:2686064@italtel.com
Accept: application/sdp, application/isup, application/xml
Content-Type: application/sdp
Content-Length: 250

v=0
o=- 0 19006764 IN IP4 10.1.7.5
s=IMSS
c=IN IP4 200.13.235.188
t=0 0
m=audio 45230 RTP/AVP 3 18 0
a=fmtp:18 annexb=no
a=X-sqn:0
a=X-cpar: a=rtpmap:101 X-NSE/8000
a=X-cpar: a=fmtp:101 200-202
a=X-cap: 2 image udptl t38
a=nortpproxy:yes

<------------->
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: — (16 headers 12 lines) —
[Dec 15 21:59:43] VERBOSE[4483] netsock.c: == Using SIP RTP TOS bits 184
[Dec 15 21:59:43] VERBOSE[4483] netsock.c: == Using SIP RTP CoS mark 5
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Sending to 200.13.230.38 : 5060 (NAT)
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Using INVITE request as basis request - 8693be208693be0-0@10.1.7.5
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Found peer ‘uneOUT’ for ‘2686064’ from 200.13.230.38:5060
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Found RTP audio format 3
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Found RTP audio format 18
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Found RTP audio format 0
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Capabilities: us - 0x190f (g723|gsm|ulaw|alaw|g726|g729|g722), peer - audio=0x106 (gsm|ulaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x106 (gsm|ulaw|g729)
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Peer audio RTP is at port 200.13.235.188:45230
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: Looking for 4039143 in from-trunk-sip-uneOUT (domain 172.22.53.90)
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c: list_route: hop: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c:
<— Transmitting (NAT) to 200.13.230.38:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Length: 0

<------------>
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk-sip-uneOUT:1] Set(“SIP/uneOUT-00000414”, “GROUP()=OUT_1”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk-sip-uneOUT:2] Goto(“SIP/uneOUT-00000414”, “from-trunk,4039143,1”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Goto (from-trunk,4039143,1)
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:1] Set(“SIP/uneOUT-00000414”, “__FROM_DID=4039143”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:2] ExecIf(“SIP/uneOUT-00000414”, “0 ?Set(CALLERID(name)=2686064)”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:3] SetMusicOnHold(“SIP/uneOUT-00000414”, “none”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:4] Set(“SIP/uneOUT-00000414”, “__MOHCLASS=none”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:5] Set(“SIP/uneOUT-00000414”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:6] Set(“SIP/uneOUT-00000414”, “CALLERPRES()=allowed_not_screened”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:7] Set(“SIP/uneOUT-00000414”, “_RGPREFIX=Grupo SoloComer:”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:8] Set(“SIP/uneOUT-00000414”, “CALLERID(name)=Grupo SoloComer:2686064”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [4039143@from-trunk:9] Goto(“SIP/uneOUT-00000414”, “ivr-4,s,1”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Goto (ivr-4,s,1)
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:1] Set(“SIP/uneOUT-00000414”, “MSG=custom/Solo_Comer_Bienvenida”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:2] Set(“SIP/uneOUT-00000414”, “LOOPCOUNT=0”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:3] Set(“SIP/uneOUT-00000414”, “__DIR-CONTEXT=”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:4] Set(“SIP/uneOUT-00000414”, “_IVR_CONTEXT_ivr-4=”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:5] Set(“SIP/uneOUT-00000414”, “_IVR_CONTEXT=ivr-4”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:6] GotoIf(“SIP/uneOUT-00000414”, “0?begin”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:7] Answer(“SIP/uneOUT-00000414”, “”) in new stack
[Dec 15 21:59:43] VERBOSE[8989] chan_sip.c: Audio is at 190.144.xxx.yyy port 17346
[Dec 15 21:59:43] VERBOSE[8989] chan_sip.c: Adding codec 0x4 (ulaw) to SDP
[Dec 15 21:59:43] VERBOSE[8989] chan_sip.c: Adding codec 0x2 (gsm) to SDP
[Dec 15 21:59:43] VERBOSE[8989] chan_sip.c: Adding codec 0x100 (g729) to SDP
[Dec 15 21:59:43] VERBOSE[8989] chan_sip.c:
<— Reliably Transmitting (NAT) to 200.13.230.38:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv

<------------>
[Dec 15 21:59:43] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:8] Wait(“SIP/uneOUT-00000414”, “1”) in new stack
[Dec 15 21:59:43] NOTICE[8989] channel.c: Dropping incompatible voice frame on SIP/uneOUT-00000414 of format ulaw since our native format has changed to 0x2 (gsm)
[Dec 15 21:59:43] VERBOSE[4483] chan_sip.c:
<— SIP read from UDP:190.249.mmm.ooo:5060 —>

<------------->
[Dec 15 21:59:44] VERBOSE[4483] chan_sip.c: Retransmitting #1 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 21:59:44] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:9] Set(“SIP/uneOUT-00000414”, “TIMEOUT(digit)=3”) in new stack
[Dec 15 21:59:44] VERBOSE[8989] func_timeout.c: – Digit timeout set to 3.000
[Dec 15 21:59:44] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:10] Set(“SIP/uneOUT-00000414”, “TIMEOUT(response)=20”) in new stack
[Dec 15 21:59:44] VERBOSE[8989] func_timeout.c: – Response timeout set to 20.000
[Dec 15 21:59:44] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:11] Set(“SIP/uneOUT-00000414”, “__IVR_RETVM=”) in new stack
[Dec 15 21:59:44] VERBOSE[8989] pbx.c: – Executing [s@ivr-4:12] ExecIf(“SIP/uneOUT-00000414”, “1?Background(custom/Solo_Comer_Bienvenida)”) in new stack
[Dec 15 21:59:44] VERBOSE[8989] file.c: – <SIP/uneOUT-00000414> Playing ‘custom/Solo_Comer_Bienvenida.slin’ (language ‘ES’)
[Dec 15 21:59:45] VERBOSE[4483] chan_sip.c: Retransmitting #2 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 21:59:47] VERBOSE[4483] chan_sip.c: Retransmitting #3 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 21:59:51] VERBOSE[4483] chan_sip.c: Retransmitting #4 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 21:59:55] VERBOSE[4483] chan_sip.c: Retransmitting #5 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 21:59:55] VERBOSE[4483] chan_sip.c:
<— SIP read from UDP:192.168.1.196:60359 —>

<------------->
[Dec 15 21:59:57] VERBOSE[4483] chan_sip.c:
<— SIP read from UDP:190.144.CCC.DDD:2273 —>

<------------->
[Dec 15 21:59:59] VERBOSE[4483] chan_sip.c: Retransmitting #6 (NAT) to 200.13.230.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 200.13.230.38:5060;branch=z9hG4bK8ad1.21e3.0;received=200.13.230.38
Via: SIP/2.0/UDP 200.13.234.200:5060;branch=z9hG4bK.iIiIiI.0a010705.8693be38
Record-Route: sip:200.13.230.38:5060;ftag=8693bdf3;lr=on;did=2eb.6fa6
From: “2686064” sip:2686064@italtel.com;user=phone;tag=8693bdf3
To: sip:44039143@200.13.230.38;user=phone;tag=as3b8c8b2c
Call-ID: 8693be208693be0-0@10.1.7.5
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:4039143@190.144.xxx.yyy
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 395263925 395263925 IN IP4 190.144.xxx.yyy
s=Asterisk PBX 1.6.2.13
c=IN IP4 190.144.xxx.yyy
t=0 0
m=audio 17346 RTP/AVP 0 3 18
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv


[Dec 15 22:00:03] WARNING[4483] chan_sip.c: Maximum retries exceeded on transmission 8693be208693be0-0@10.1.7.5 for seqno 1 (Critical Response) – See doc/sip-retransmit.txt.
[Dec 15 22:00:03] WARNING[4483] chan_sip.c: Hanging up call 8693be208693be0-0@10.1.7.5 - no reply to our critical packet (see doc/sip-retransmit.txt).
[Dec 15 22:00:03] VERBOSE[8989] pbx.c: == Spawn extension (ivr-4, s, 12) exited non-zero on ‘SIP/uneOUT-00000414’
[Dec 15 22:00:03] VERBOSE[8989] pbx.c: – Executing [h@ivr-4:1] Hangup(“SIP/uneOUT-00000414”, “”) in new stack
[Dec 15 22:00:03] VERBOSE[8989] pbx.c: == Spawn extension (ivr-4, h, 1) exited non-zero on ‘SIP/uneOUT-00000414’
[Dec 15 22:00:03] VERBOSE[4483] chan_sip.c: Really destroying SIP dialog ‘8693be208693be0-0@10.1.7.5’ Method: INVITE
[Dec 15 22:00:03] VERBOSE[4483] chan_sip.c:
<— SIP read from UDP:190.249.mmm.ooo:5060 —>

You either have two different externips, which are not visible from the same places, or 200.13.230.0/24 is part of you local nets. In the latter case, correctly declaring it and making sure that you do not enable directmedia should be enough. I don’t believe the former case is supported.

Thank you for your response.

200.13.230.0/24 is an address of a sip proxy server within my service provider.

As it stands it seems like I do have two external IPs: One IP was issued to me by the SIP service provider and the other is my Static Public Internet IP which was issued to me by my Internet service provider. They both plug into separate NICs and the the Internet IP connects to a firewall which has all the udp ports open and forwarding to my local IP (Internet side).

The issue is, is when I change the ExternIP to the internet IP the SIP IDs are invalid because they do not have the SIP IP tag (ex: SIP@172.22.53.90).

Also, there is no access to the Internet with the 172.22.53.90 IP as per my service provider.

As you can only have one externip, you can’t do that. However, provided you disable direct media, you can treat the VoIP server as part of your local network.

Actually, I’m not sure that Asterisk chooses its address based on the destination, so you may not be able to do it at all.

So you think I should force a media type in Asterisk?

If you are thinking it might be a codec conflict, I did several tests just now and Asterisk and the Grandstream are using GSM.

No.

Your only hope of getting this configuration to work is declare the VoIP gateway network as part of your local network and make sure that you have drectmedia=no.

It will only work if Asterisk sets the from address based on the actual interface used, and I’m not sure that is the case.

Asterisk assumes that there is one global network and one local network (although possibly made from multiple subnetworks). You are violating that assumption. As a result, Asterisk is telling your VoIP service to reply to its public address, but it is unable or unwilling to do so and the final ACK of the three step dialogue never arrives. Asterisk eventually gives up retransmitting the second stage response, and aborts the call.

If i understand you correctly, you are saying that I need to configure Asterisk so that it sees the two networks (VoIP and Internet) as one network? Can you offer me some detail on how I could accomplish this configuration?