We help IT Professionals succeed at work.

Asterisk can't make calls to external sip trucks

gid01
gid01 asked
on
Medium Priority
2,334 Views
Last Modified: 2012-05-11
I have included the Asterisk debugging log
[root@localhost ~]# asterisk -r
Asterisk 1.6.2.13, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.13 currently running on localhost (pid = 13512)
Verbosity is at least 3
localhost*CLI> sip set debug 65.111.186.2
No such command 'sip set debug 65.111.186.2' (type 'core show help sip set debug' for other possible commands)
localhost*CLI> sip set debug ip 65.111.186.2
SIP Debugging Enabled for IP: 65.111.186.2
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [18005551212@from-internal:1] Macro("SIP/1000-00000006", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/1000-00000006", "AMPUSER=1000") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/1000-00000006", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/1000-00000006", "1?Set(REALCALLERIDNUM=1000)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/1000-00000006", "AMPUSER=1000") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/1000-00000006", "AMPUSERCIDNAME=LR-CENTRAL") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/1000-00000006", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/1000-00000006", "AMPUSERCID=1000") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/1000-00000006", "CALLERID(all)="LR-CENTRAL" <1000>") in new stack
    -- Executing [s@macro-user-callerid:9] ExecIf("SIP/1000-00000006", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:10] GotoIf("SIP/1000-00000006", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] NoOp("SIP/1000-00000006", "Using CallerID "LR-CENTRAL" <1000>") in new stack
    -- Executing [18005551212@from-internal:2] Set("SIP/1000-00000006", "_NODEST=") in new stack
    -- Executing [18005551212@from-internal:3] Macro("SIP/1000-00000006", "record-enable,1000,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/1000-00000006", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/1000-00000006", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/1000-00000006", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("SIP/1000-00000006", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("SIP/1000-00000006", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:17] NoOp("SIP/1000-00000006", "Recording enable for 1000") in new stack
    -- Executing [s@macro-record-enable:18] Set("SIP/1000-00000006", "CALLFILENAME=OUT1000-20110421-163250-1303417970.6") in new stack
    -- Executing [s@macro-record-enable:19] Goto("SIP/1000-00000006", "record") in new stack
    -- Goto (macro-record-enable,s,23)
    -- Executing [s@macro-record-enable:23] MixMonitor("SIP/1000-00000006", "OUT1000-20110421-163250-1303417970.6.wav,,") in new stack
    -- Executing [s@macro-record-enable:24] Set("SIP/1000-00000006", "CDR(userfield)=audio:OUT1000-20110421-163250-1303417970.6.wav") in new stack
    -- Executing [s@macro-record-enable:25] MacroExit("SIP/1000-00000006", "") in new stack
    -- Executing [18005551212@from-internal:4] Macro("SIP/1000-00000006", "dialout-trunk,2,18005551212,,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/1000-00000006", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1000-00000006", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1000-00000006", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/1000-00000006", "DIAL_NUMBER=18005551212") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/1000-00000006", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/1000-00000006", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1000-00000006", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1000-00000006", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/1000-00000006", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/1000-00000006", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1000-00000006", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1000-00000006", "0?Set(REALCALLERIDNUM=1000)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/1000-00000006", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/1000-00000006", "USEROUTCID=7342011010") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/1000-00000006", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/1000-00000006", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/1000-00000006", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/1000-00000006", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/1000-00000006", "1?Set(CALLERID(all)=7342011010)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/1000-00000006", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/1000-00000006", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/1000-00000006", "0?AGI(fixlocalprefix)") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/1000-00000006", "OUTNUM=18005551212") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/1000-00000006", "custom=SIP/future-nine") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1000-00000006", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/1000-00000006", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1000-00000006", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/1000-00000006", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1000-00000006", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/1000-00000006", "SIP/future-nine/18005551212,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Audio is at 192.168.1.5 port 17828
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
    -- Called future-nine/18005551212
  == Begin MixMonitor Recording SIP/1000-00000006
Retransmitting #1 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #2 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #3 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #4 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #5 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #6 (no NAT) to 65.111.186.2:5060:
INVITE sip:18005551212@outgoing.future-nine.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport
Max-Forwards: 70
From: "7342011010" <sip:36389015@192.168.1.5>;tag=as1fa039f5
To: <sip:18005551212@outgoing.future-nine.com>
Contact: <sip:36389015@192.168.1.5>
Call-ID: 2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Thu, 21 Apr 2011 20:32:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1634658577 1634658577 IN IP4 192.168.1.5
s=Asterisk PBX 1.6.2.13
c=IN IP4 192.168.1.5
t=0 0
m=audio 17828 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Scheduling destruction of SIP dialog '2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5' in 32000 ms (Method: INVITE)
    -- SIP/future-nine-00000007 is circuit-busy
Scheduling destruction of SIP dialog '2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5' in 32000 ms (Method: INVITE)
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/1000-00000006", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 0") in new stack
    -- Executing [s@macro-dialout-trunk:21] Goto("SIP/1000-00000006", "s-CONGESTION,1") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/1000-00000006", "RC=0") in new stack
    -- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/1000-00000006", "0,1") in new stack
    -- Goto (macro-dialout-trunk,0,1)
    -- Executing [0@macro-dialout-trunk:1] Goto("SIP/1000-00000006", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/1000-00000006", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/1000-00000006", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 0 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/1000-00000006", "CALLERID(number)=1000") in new stack
    -- Executing [18005551212@from-internal:5] Macro("SIP/1000-00000006", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/1000-00000006", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/1000-00000006", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/1000-00000006", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/1000-00000006", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <SIP/1000-00000006> Playing 'all-circuits-busy-now.gsm' (language 'en')
    -- <SIP/1000-00000006> Playing 'pls-try-call-later.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:5] Congestion("SIP/1000-00000006", "20") in new stack
  == Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/1000-00000006' in macro 'outisbusy'
  == Spawn extension (from-internal, 18005551212, 5) exited non-zero on 'SIP/1000-00000006'
    -- Executing [h@from-internal:1] Macro("SIP/1000-00000006", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/1000-00000006", "1?noautomon") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] NoOp("SIP/1000-00000006", "TOUCH_MONITOR_OUTPUT=") in new stack
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/1000-00000006", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/1000-00000006", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,10)
    -- Executing [s@macro-hangupcall:10] GotoIf("SIP/1000-00000006", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,12)
    -- Executing [s@macro-hangupcall:12] Hangup("SIP/1000-00000006", "") in new stack
  == Spawn extension (macro-hangupcall, s, 12) exited non-zero on 'SIP/1000-00000006' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1000-00000006'
  == MixMonitor close filestream
  == End MixMonitor Recording SIP/1000-00000006
Really destroying SIP dialog '2a5320e75ae6c16a2926270f5f5bde1f@192.168.1.5' Method: INVITE
localhost*CLI>

Open in new window

Comment
Watch Question

It looks like you may have a routing issue. The fact that we see multiple invites being sent but no responses returning probably means that the responses are being blocked. Are you running a firewall? Of so make sure UDP port 5060 is open. If your using NAT, try setting the server in the DMZ so that it sees all responses. Obviously this is a temporary measure for testing purposes. If it works try routing port 5060 to the server address. Once you have response message you should be able to make calls. However the same issue blocking port 5060 may also block the RTP packets and cause you to have one way audio issues. If we have that you will need to open the UDP ports for RTP. This is usually UDP port 10000-20000 but it can vary with your configuration. Asterisk sets this in the /etc/asterisk/rtp.conf file.
Gid, you have a NAT problem. Your INVITES are going out advertising private IPs. For example, take a look at the
VIA header:

Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK4ac8ff29;rport

This header is used to return the SIP reply, so there is no way (I can see from just the debugs) for Future Nine to return the call correctly. Also the CONTACT header goes out privately:
sip:36389015@192.168.1.5

There are several options to address NAT issues:
- STUN servers (they reveal the Public Adress during the call setup so that the messages are filled correctly)
- An Application Layer Gateway (ALG) that will read SIP messages and rewrite the IPs by itself
- A SIP Proxy like OpenSIPS (I just took an ebootcamp and really recommend it)

How are you connecting to the Internet? What device manages the public address?

Regards,
I think this is a little bit more accurate for you to resolve this issue:

http://www.voip-info.org/wiki/view/Asterisk+SIP+externip

Author

Commented:
This is odd because the server used to be "local" only meaning I didn't open any port like 5060 and rtp ports. The only reason I forwarded the ports is because I wanted to use asterisk on my iPhone on att's 3G network. A few days ago I started to receive annoymous calls from ips in russian and some weird countries that i can't pronounce the name of so that i stop forwarding asterisk ports in my server.
Gid,

First of all, I couldn't understand your first sentence.

About forwarding your UDP 5060 port, thats expected behavior. There are scanners out there dedicated to find new IPs listening on port 5060. They will try to register with common sip profile names and place calls at your expenses.

Please try to answer the following question as best as possible: what device in your network performs NAT?

And how many public addresses do you have?
The packets you're seeing in asterisk are before the router. The router is responsible for removing the local address and replacing it with the public ip address. To see if the packet is correct going to the provider you need to do a packet trace between the router and the ISP. If at that point the IP address is incorrect, try adding a externip=<ipaddr> in sip.conf where <ipaddr> is the public IP address.
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.