AAH 2.8 4 SIP trunks from Vonage need help PLEASE

Ok the problem is I have my Asterisk box behind a Linksys router so it is NAT’ed. I can place outbound call with ease, but incoming calls fail. Playing around in the sip.conf I added these and incoming started working but outgoing tells me all circuits are busy.

~!
sip.conf – outbound working, incoming not working

bindport=5060			; UDP Port to bind to (SIP standard port is 5060)
bindaddr=192.168.1.151		; IP address to bind to (0.0.0.0 binds to all)
disallow=all
allow=ulaw
allow=alaw
context =incoming ; Send unknown SIP callers to this context
callerid = Unknown
externip=aaa.bbb.ccc.ddd
localnet=192.168.1.0/255.255.255.0
nat=no

sip.conf – outbound not working, incoming working

bindport=5060			; UDP Port to bind to (SIP standard port is 5060)
bindaddr=192.168.1.151		; IP address to bind to (0.0.0.0 binds to all)
disallow=all
allow=ulaw
allow=alaw
context =incoming ; Send unknown SIP callers to this context
callerid = Unknown
externip=aaa.bbb.ccc.ddd
localnet=192.168.1.0/255.255.255.0
nat=yes

I have 5060 UDP forwarded to the box as well as the port range specified in the rtp.conf

sip_additional.conf


register=1NPANXXXXXX:password@sphone.vopr.vonage.net:5061


[vonage_in_4349]
username=1NPANXXXXXX
type=friend
secret=password
nat=yes
insecure=very
host=sphone.vopr.vonage.net
fromuser=1NPANXXXXXX
fromdomain=sphone.vopr.vonage.net
dtmfmode=inband
context=from-pstn
canreinvite=no
auth=md5

[vonage_out_4349]
username=1NPANXXXXXX
type=friend
secret=password
nat=yes
host=sphone.vopr.vonage.net
fromuser=1NPANXXXXXX
fromdomain=sphone.vopr.vonage.net
dtmfmode=rfc2833
context=pstn-out
auth=md5

That is the lines for one of the sip trunks to vonage, if I have missed something that would be of help please let me know I have been strugling with this for a while.

Thanks in advance,

Nick

I’m having the same problem, any ideas?

If I had to take a wild guess, you don’t have an inbound route defined for the incoming phone number in the context the call is trying to go to.

TheLostPacket

I do. Its has something to do with NAT being on or off. Does anyone have a working config for vonage behind a firewall? (NAT)

See above.

Turn sip debug on and watch the incoming call. Read each line.

I have inbound routes that work fine when NAT=yes so I am pretty sure it is not the them. Here is the debug

With NAT=YES in the sip.conf (incoming will work fine but outbound fails with this setting)

[code]=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2006.05.03 14:38:01 =~=~=~=~=~=~=~=~=~=~=~=
sip ~Content-Length: 0Max-Forwards: 13CSeq: 101 ACKsip debug

asterisk1*CLI>
SIP Debugging enabled

asterisk1*CLI> si
Destroying call ‘3e214313799e649a5f852e3a2e1883f3@192.168.1.151’

asterisk1*CLI> sip
REGISTER 13 headers, 0 lines
Reliably Transmitting (NAT) to 216.115.20.41:5060:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK1a5f0193;rport

From: sip:15125354351@sphone.vopr.vonage.net;tag=as1a1a1fd9

To: sip:15125354351@sphone.vopr.vonage.net

Call-ID: 3e214313799e649a5f852e3a2e1883f3@192.168.1.151

CSeq: 125 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354351”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“f2b6ca597cbbc68c86e2a89b726877af”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI> sip
Destroying call '23547b845fb4fd90248427363aa09859@192.168.1.151’
Destroying call ‘75bcc24111e8111375ba1b2f10710ede@192.168.1.151’

asterisk1*CLI> sip

<-- SIP read from 216.115.20.41:5060:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK1a5f0193;rport

From: sip:15125354351@sphone.vopr.vonage.net;tag=as1a1a1fd9

To: sip:15125354351@sphone.vopr.vonage.net

Call-ID: 3e214313799e649a5f852e3a2e1883f3@192.168.1.151

CSeq: 125 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘3e214313799e649a5f852e3a2e1883f3@192.168.1.151’ in 32000 ms

asterisk1*CLI> sip
Destroying call ‘07be1d192399024f5adbc286514fbf54@192.168.1.151’

asterisk1*CLI> sip
REGISTER 13 headers, 0 lines
Reliably Transmitting (NAT) to 216.115.20.41:5060:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK677ce886;rport

From: sip:15125354349@sphone.vopr.vonage.net;tag=as19dd3a31

To: sip:15125354349@sphone.vopr.vonage.net

Call-ID: 23547b845fb4fd90248427363aa09859@192.168.1.151

CSeq: 125 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354349”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“eb1ec17cd771a20b4ada8081a4462c48”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI> sip
REGISTER 13 headers, 0 lines
Reliably Transmitting (NAT) to 216.115.20.41:5060:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK5ea6bbc9;rport

From: sip:15125354350@sphone.vopr.vonage.net;tag=as64f740c1

To: sip:15125354350@sphone.vopr.vonage.net

Call-ID: 75bcc24111e8111375ba1b2f10710ede@192.168.1.151

CSeq: 125 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354350”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“eeb1913f41840584d34c89cb74300e6e”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI> sip
REGISTER 13 headers, 0 lines

asterisk1*CLI> sip
Reliably Transmitting (NAT) to 216.115.20.41:5060:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK393c19cb;rport

From: sip:15125354348@sphone.vopr.vonage.net;tag=as6fb6483f

To: sip:15125354348@sphone.vopr.vonage.net

Call-ID: 07be1d192399024f5adbc286514fbf54@192.168.1.151

CSeq: 125 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354348”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“4680222f187de6eff1ebde295a6d4873”, opaque=""

Expires: 120

Contact: sip:113@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI> sip

<-- SIP read from 216.115.20.41:5060:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK677ce886;rport

From: sip:15125354349@sphone.vopr.vonage.net;tag=as19dd3a31

To: sip:15125354349@sphone.vopr.vonage.net

Call-ID: 23547b845fb4fd90248427363aa09859@192.168.1.151

CSeq: 125 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘23547b845fb4fd90248427363aa09859@192.168.1.151’ in 32000 ms

asterisk1*CLI> sip

<-- SIP read from 216.115.20.41:5060:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK393c19cb;rport

From: sip:15125354348@sphone.vopr.vonage.net;tag=as6fb6483f

To: sip:15125354348@sphone.vopr.vonage.net

Call-ID: 07be1d192399024f5adbc286514fbf54@192.168.1.151

CSeq: 125 REGISTER

Contact: sip:113@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘07be1d192399024f5adbc286514fbf54@192.168.1.151’ in 32000 ms

asterisk1*CLI> sip

<-- SIP read from 216.115.20.41:5060:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK5ea6bbc9;rport

From: sip:15125354350@sphone.vopr.vonage.net;tag=as64f740c1

To: sip:15125354350@sphone.vopr.vonage.net

Call-ID: 75bcc24111e8111375ba1b2f10710ede@192.168.1.151

CSeq: 125 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘75bcc24111e8111375ba1b2f10710ede@192.168.1.151’ in 32000 ms

asterisk1*CLI> sip no

<-- SIP read from 216.115.20.41:5060:
INVITE sip:15125354348@68.201.250.45:5060 SIP/2.0

Via: SIP/2.0/UDP 216.115.20.41:5060

Via: SIP/2.0/UDP 216.115.30.25:5060

Via: SIP/2.0/UDP 208.49.157.16:5060;branch=z9hG4bK19C7

Record-Route: sip:15125354348@216.115.20.41:5060

Record-Route: sip:15125354348@216.115.30.25:5060

From: “Cell Phone TX” sip:12817824574@208.49.157.16;tag=208625319

To: sip:15125354348@inbound2.vonage.net

Call-ID: 38BAA272-DA1311DA-950D8A76-B2E81983@208.49.157.16

CSeq: 101 INVITE

Contact: sip:12817824574@208.49.157.16:5060

Max-Forwards: 13

Content-Type: application/sdp

Content-Length: 361

v=0

o=CiscoSystemsSIP-GW-UserAgent 1759 5393 IN IP4 208.49.157.16

s=SIP Call

c=IN IP4 208.49.157.16

t=0 0

m=audio 21084 RTP/AVP 0 18 2 100 101

c=IN IP4 208.49.157.16

a=rtpmap:0 PCMU/8000

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:2 G726-32/8000

a=rtpmap:100 X-NSE/8000

a=fmtp:100 192-194

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

— (14 headers 15 lines)—
Using INVITE request as basis request - 38BAA272-DA1311DA-950D8A76-B2E81983@208.49.157.16
Sending to 216.115.20.41 : 5060 (NAT)
Found peer 'vonage_in_4351’
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 2
Found RTP audio format 100
Found RTP audio format 101
Peer audio RTP is at port 208.49.157.16:21084

asterisk1*CLI> sip no
Found description format PCMU
Found description format G729
Found description format G726-32
Found description format X-NSE
Found description format telephone-event
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x114 (ulaw|g726|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Looking for 15125354348 in from-pstn (domain 68.201.250.45)
list_route: hop: sip:15125354348@216.115.20.41:5060
list_route: hop: sip:15125354348@216.115.30.25:5060
list_route: hop: sip:12817824574@208.49.157.16:5060
Transmitting (NAT) to 216.115.20.41:5060:
SIP/2.0 100 Trying

Via: SIP/2.0/UDP 216.115.20.41:5060;received=216.115.20.41

Via: SIP/2.0/UDP 216.115.30.25:5060

Via: SIP/2.0/UDP 208.49.157.16:5060;branch=z9hG4bK19C7

From: “Cell Phone TX” sip:12817824574@208.49.157.16;tag=208625319

To: sip:15125354348@inbound2.vonage.net

Call-ID: 38BAA272-DA1311DA-950D8A76-B2E81983@208.49.157.16

CSeq: 101 INVITE

User-Agent: Asterisk PBX

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: sip:15125354348@68.201.250.45

Content-Length: 0


asterisk1*CLI> sip no
– Executing Goto(“SIP/15125354351-3579”, “from-external-custom|attendant|1”) in new stack

asterisk1*CLI> sip no
– Goto (from-external-custom,attendant,1)

asterisk1*CLI> sip no
– Executing Answer(“SIP/15125354351-3579”, “”) in new stack

asterisk1*CLI> sip no
We’re at 68.201.250.45 port 12312

asterisk1*CLI> sip no
Adding codec 0x4 (ulaw) to SDP

asterisk1*CLI> sip no
Adding non-codec 0x1 (telephone-event) to SDP

asterisk1*CLI> sip no
Reliably Transmitting (NAT) to 216.115.20.41:5060:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 216.115.20.41:5060;received=216.115.20.41

Via: SIP/2.0/UDP 216.115.30.25:5060

Via: SIP/2.0/UDP 208.49.157.16:5060;branch=z9hG4bK19C7

Record-Route: sip:15125354348@216.115.20.41:5060

Record-Route: sip:15125354348@216.115.30.25:5060

From: “Cell Phone TX” sip:12817824574@208.49.157.16;tag=208625319

To: sip:15125354348@inbound2.vonage.net;tag=as12d599a0

Call-ID: 38BAA272-DA1311DA-950D8A76-B2E81983@208.49.157.16

CSeq: 101 INVITE

User-Agent: Asterisk PBX

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: sip:15125354348@68.201.250.45

Content-Type: application/sdp

Content-Length: 216

v=0

o=root 2798 2798 IN IP4 68.201.250.45

s=session

c=IN IP4 68.201.250.45

t=0 0

m=audio 12312 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=silenceSupp:off - - - -


asterisk1*CLI> sip no
– Executing Wait(“SIP/15125354351-3579”, “1”) in new stack

asterisk1*CLI> sip no

<-- SIP read from 216.115.20.41:5060:
ACK sip:15125354348@68.201.250.45:5060 SIP/2.0

Via: SIP/2.0/UDP 216.115.20.41:5060

Via: SIP/2.0/UDP 216.115.30.25:5060

Via: SIP/2.0/UDP 208.49.157.16:5060;branch=z9hG4bK7A6

From: “Cell Phone TX” sip:12817824574@208.49.157.16;tag=208625319

To: sip:15125354348@inbound2.vonage.net;tag=as12d599a0

Call-ID: 38BAA272-DA1311DA-950D8A76-B2E81983@208.49.157.16

CSeq: 101 ACK

Max-Forwards: 13

Content-Length: 0

— (10 headers 0 lines)—

asterisk1*CLI> sip no debu
– Executing BackGround(“SIP/15125354351-3579”, “pls-wait-connect-call”) in new stack
– Playing ‘pls-wait-connect-call’ (language ‘en’)

asterisk1*CLI> sip no debug
– Executing Dial(“SIP/15125354351-3579”, “local/1@from-internal|30|mt”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing VoiceMail(“SIP/15125354351-3579”, “200@default”) in new stack

asterisk1*CLI> sip no debug

asterisk1*CLI>
SIP Debugging Disabled

asterisk1*CLI> [/code]

Here is the debug with NAT=NO in the sip.conf no ther changes (outbund will now work but inbound dies)

[code]

asterisk1*CLI>
Destroying call ‘3e214313799e649a5f852e3a2e1883f3@192.168.1.151’

asterisk1*CLI>
Destroying call ‘23547b845fb4fd90248427363aa09859@192.168.1.151’

asterisk1*CLI>
Destroying call ‘07be1d192399024f5adbc286514fbf54@192.168.1.151’

asterisk1*CLI>
Destroying call ‘75bcc24111e8111375ba1b2f10710ede@192.168.1.151’

asterisk1*CLI>

<-- SIP read from 216.115.20.41:5061:
INVITE sip:15125354348@68.201.250.45:5060 SIP/2.0

Via: SIP/2.0/UDP 216.115.20.41:5061

Via: SIP/2.0/UDP 216.115.20.24:5060

Via: SIP/2.0/UDP 208.49.157.17:5060;branch=z9hG4bK90A

Record-Route: sip:15125354348@216.115.20.41:5061

Record-Route: sip:15125354348@216.115.20.24:5060

From: “Cell Phone TX” sip:12817824574@208.49.157.17;tag=1894722780

To: sip:15125354348@inbound4.vonage.net

Call-ID: DCC88D50-DA1311DA-BDC9ECAF-6A62EE8@208.49.157.17

CSeq: 101 INVITE

Contact: sip:12817824574@208.49.157.17:5060

Max-Forwards: 13

Content-Type: application/sdp

Content-Length: 361

v=0

o=CiscoSystemsSIP-GW-UserAgent 2414 7130 IN IP4 208.49.157.17

s=SIP Call

c=IN IP4 208.49.157.17

t=0 0

m=audio 19884 RTP/AVP 0 18 2 100 101

c=IN IP4 208.49.157.17

a=rtpmap:0 PCMU/8000

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:2 G726-32/8000

a=rtpmap:100 X-NSE/8000

a=fmtp:100 192-194

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

— (14 headers 15 lines)—
Using INVITE request as basis request - DCC88D50-DA1311DA-BDC9ECAF-6A62EE8@208.49.157.17
Sending to 216.115.20.41 : 5061 (non-NAT)
Found peer ‘vonage_out_4351’

asterisk1*CLI>
Reliably Transmitting (NAT) to 216.115.20.41:5061:
SIP/2.0 407 Proxy Authentication Required

Via: SIP/2.0/UDP 216.115.20.41:5061;received=216.115.20.41

Via: SIP/2.0/UDP 216.115.20.24:5060

Via: SIP/2.0/UDP 208.49.157.17:5060;branch=z9hG4bK90A

From: “Cell Phone TX” sip:12817824574@208.49.157.17;tag=1894722780

To: sip:15125354348@inbound4.vonage.net;tag=as7daab599

Call-ID: DCC88D50-DA1311DA-BDC9ECAF-6A62EE8@208.49.157.17

CSeq: 101 INVITE

User-Agent: Asterisk PBX

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: sip:15125354348@68.201.250.45

Proxy-Authenticate: Digest realm=“asterisk”, nonce=“17e2378d”

Content-Length: 0


Scheduling destruction of call ‘DCC88D50-DA1311DA-BDC9ECAF-6A62EE8@208.49.157.17’ in 15000 ms

asterisk1*CLI>

<-- SIP read from 216.115.20.41:5061:
ACK sip:15125354348@inbound4.vonage.net SIP/2.0

Via: SIP/2.0/UDP 216.115.20.41:5061

From: “Cell Phone TX” sip:12817824574@208.49.157.17;tag=1894722780

To: sip:15125354348@inbound4.vonage.net;tag=as7daab599

Call-ID: DCC88D50-DA1311DA-BDC9ECAF-6A62EE8@208.49.157.17

CSeq: 101 ACK

Content-Length: 0

— (7 headers 0 lines)—

asterisk1*CLI>
Destroying call ‘61e5ff4e71d6e2261c0b02e5111f4681@192.168.1.151’

asterisk1*CLI>
Destroying call ‘3152a9505b64ba8e2a9e2e3c63b44ac4@192.168.1.151’

asterisk1*CLI>
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 216.115.20.41:5061:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK1f8ffa9a;rport

From: sip:15125354351@sphone.vopr.vonage.net;tag=as3a2eb01e

To: sip:15125354351@sphone.vopr.vonage.net

Call-ID: 61e5ff4e71d6e2261c0b02e5111f4681@192.168.1.151

CSeq: 105 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354351”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“f2b6ca597cbbc68c86e2a89b726877af”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI>
Destroying call ‘462a6ada02df37c41ac7e759558124f8@192.168.1.151’

asterisk1*CLI>
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 216.115.20.41:5061:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK6eeab06c;rport

From: sip:15125354350@sphone.vopr.vonage.net;tag=as2af300bb

To: sip:15125354350@sphone.vopr.vonage.net

Call-ID: 3152a9505b64ba8e2a9e2e3c63b44ac4@192.168.1.151

CSeq: 105 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354350”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“eeb1913f41840584d34c89cb74300e6e”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI>

<-- SIP read from 216.115.20.41:5061:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK1f8ffa9a;rport

From: sip:15125354351@sphone.vopr.vonage.net;tag=as3a2eb01e

To: sip:15125354351@sphone.vopr.vonage.net

Call-ID: 61e5ff4e71d6e2261c0b02e5111f4681@192.168.1.151

CSeq: 105 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘61e5ff4e71d6e2261c0b02e5111f4681@192.168.1.151’ in 32000 ms

asterisk1*CLI>
Destroying call ‘558d44767068f4a752d3b9be3cacffe5@192.168.1.151’

asterisk1*CLI>

<-- SIP read from 216.115.20.41:5061:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK6eeab06c;rport

From: sip:15125354350@sphone.vopr.vonage.net;tag=as2af300bb

To: sip:15125354350@sphone.vopr.vonage.net

Call-ID: 3152a9505b64ba8e2a9e2e3c63b44ac4@192.168.1.151

CSeq: 105 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘3152a9505b64ba8e2a9e2e3c63b44ac4@192.168.1.151’ in 32000 ms

asterisk1*CLI>
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 216.115.20.41:5061:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK72aae41e;rport

From: sip:15125354349@sphone.vopr.vonage.net;tag=as047dead6

To: sip:15125354349@sphone.vopr.vonage.net

Call-ID: 462a6ada02df37c41ac7e759558124f8@192.168.1.151

CSeq: 105 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354349”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“eb1ec17cd771a20b4ada8081a4462c48”, opaque=""

Expires: 120

Contact: sip:s@68.201.250.45

Event: registration

Content-Length: 0


asterisk1*CLI>
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 216.115.20.41:5061:
REGISTER sip:sphone.vopr.vonage.net SIP/2.0

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK3123b759;rport

From: sip:15125354348@sphone.vopr.vonage.net;tag=as12280c2d

To: sip:15125354348@sphone.vopr.vonage.net

Call-ID: 558d44767068f4a752d3b9be3cacffe5@192.168.1.151

CSeq: 105 REGISTER

User-Agent: Asterisk PBX

Max-Forwards: 70

Authorization: Digest username=“15125354348”, realm=“216.115.20.41”, algorithm=MD5, uri=“sip:216.115.20.41”, nonce=“1534782874”, response=“4680222f187de6eff1ebde295a6d4873”, opaque=""

Expires: 120

Contact: sip:113@68.201.250.45

Event: registration

Content-Length: 0


<-- SIP read from 216.115.20.41:5061:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK72aae41e;rport

From: sip:15125354349@sphone.vopr.vonage.net;tag=as047dead6

To: sip:15125354349@sphone.vopr.vonage.net

Call-ID: 462a6ada02df37c41ac7e759558124f8@192.168.1.151

CSeq: 105 REGISTER

Contact: sip:s@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘462a6ada02df37c41ac7e759558124f8@192.168.1.151’ in 32000 ms

asterisk1*CLI>

<-- SIP read from 216.115.20.41:5061:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 68.201.250.45:5060;branch=z9hG4bK3123b759;rport

From: sip:15125354348@sphone.vopr.vonage.net;tag=as12280c2d

To: sip:15125354348@sphone.vopr.vonage.net

Call-ID: 558d44767068f4a752d3b9be3cacffe5@192.168.1.151

CSeq: 105 REGISTER

Contact: sip:113@68.201.250.45;expires=20

Max-Forwards: 70

Content-Length: 0

— (9 headers 0 lines)—
Scheduling destruction of call ‘558d44767068f4a752d3b9be3cacffe5@192.168.1.151’ in 32000 ms

asterisk1*CLI> sip debugno debug[/code]

Thanks so much for the response, if you guys can figure out what is going on I would be greatful.

Thanks,

Nick

Do you actually hear this message?

– Executing BackGround(“SIP/15125354351-3579”, “pls-wait-connect-call”) in new stack
– Playing ‘pls-wait-connect-call’ (language ‘en’)

TheLostPacket

Yeah I hear her say please wait while I connect the call, I have my ring group down right now so it doesnt go anywhere but it works and I can call in and the call sounds great if NAT=YES. I get a recording when it is set to NAT=NO if you call 5125354348 you can hear the recording, I have it set to NAT=NO right now.

Thanks,

Nick

you may have already seen this but here it is

voip-info.org/wiki/view/Asterisk+and+Vonage

Set nat=yes, where is the problem? Your dial command is failing not the vonage leg of the incoming call.

The problem is that if I set NAT=YES I can’t call out. Why is that, any ideas on that it says all circuits are busy when set to YES.

Here is what happens when I try to call with NAT=YES

[code]

asterisk1*CLI>
– Executing Macro(“SIP/113-5bf7”, “dialout-trunk|2|14173357889||”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?3:2”) in new stack
– Goto (macro-dialout-trunk,s,3)
– Executing Macro(“SIP/113-5bf7”, “user-callerid”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSER=113”) in new stack
– Executing Set(“SIP/113-5bf7”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSERCIDNAME=Nick Crocker”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=“Nick Crocker” <113>”) in new stack
– Executing NoOp(“SIP/113-5bf7”, “Using CallerID “Nick Crocker” <113>”) in new stack
– Executing Macro(“SIP/113-5bf7”, “record-enable|113|OUT”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/113-5bf7”, “recordingcheck|20060503-165526|1146689726.169”) in new stack

asterisk1*CLI>
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

asterisk1*CLI>
recordingcheck|20060503-165526|1146689726.169: Outbound recording not enabled

asterisk1*CLI>
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/113-5bf7”, “No recording needed”) in new stack
– Executing Macro(“SIP/113-5bf7”, “outbound-callerid|2”) in new stack
– Executing Set(“SIP/113-5bf7”, “USEROUTCID=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?4”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=5125354348”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?8”) in new stack
– Goto (macro-outbound-callerid,s,8)
– Executing NoOp(“SIP/113-5bf7”, “CallerID set to “” <113>”) in new stack
– Executing Set(“SIP/113-5bf7”, “GROUP()=OUT_2”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?108”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_NUMBER=14173357889”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_TRUNK=2”) in new stack
– Executing AGI(“SIP/113-5bf7”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix

asterisk1*CLI>
fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf

asterisk1*CLI>
– AGI Script fixlocalprefix completed, returning 0

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “OUTNUM=14173357889”) in new stack

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “custom=SIP/vonage_out_4348”) in new stack

asterisk1*CLI>
– Executing GotoIf(“SIP/113-5bf7”, “0?16”) in new stack

asterisk1*CLI>
– Executing Dial(“SIP/113-5bf7”, “SIP/vonage_out_4348/14173357889|120|W”) in new stack

asterisk1*CLI>
– Called vonage_out_4348/14173357889

asterisk1*CLI>
– SIP/vonage_out_4348-ca9d is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing Goto(“SIP/113-5bf7”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing NoOp(“SIP/113-5bf7”, “Dial failed due to CONGESTION”) in new stack
– Executing Macro(“SIP/113-5bf7”, “dialout-trunk|3|14173357889||”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?3:2”) in new stack
– Goto (macro-dialout-trunk,s,3)
– Executing Macro(“SIP/113-5bf7”, “user-callerid”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSER=113”) in new stack
– Executing Set(“SIP/113-5bf7”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSERCIDNAME=Nick Crocker”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=“Nick Crocker” <113>”) in new stack

asterisk1*CLI>
– Executing NoOp(“SIP/113-5bf7”, “Using CallerID “Nick Crocker” <113>”) in new stack
– Executing Macro(“SIP/113-5bf7”, “record-enable|113|OUT”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/113-5bf7”, “recordingcheck|20060503-165526|1146689726.169”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

asterisk1*CLI>
recordingcheck|20060503-165526|1146689726.169: Outbound recording not enabled

asterisk1*CLI>
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/113-5bf7”, “No recording needed”) in new stack

asterisk1*CLI>
– Executing Macro(“SIP/113-5bf7”, “outbound-callerid|3”) in new stack
– Executing Set(“SIP/113-5bf7”, “USEROUTCID=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?4”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=5125354349”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?8”) in new stack
– Goto (macro-outbound-callerid,s,8)
– Executing NoOp(“SIP/113-5bf7”, “CallerID set to “” <113>”) in new stack
– Executing Set(“SIP/113-5bf7”, “GROUP()=OUT_3”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?108”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_NUMBER=14173357889”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_TRUNK=3”) in new stack
– Executing AGI(“SIP/113-5bf7”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix

asterisk1*CLI>
fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf

asterisk1*CLI>
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“SIP/113-5bf7”, “OUTNUM=14173357889”) in new stack
– Executing Set(“SIP/113-5bf7”, “custom=SIP/vonage_out_4349”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?16”) in new stack
– Executing Dial(“SIP/113-5bf7”, “SIP/vonage_out_4349/14173357889|120|W”) in new stack

asterisk1*CLI>
– Called vonage_out_4349/14173357889

asterisk1*CLI>
– SIP/vonage_out_4349-33ac is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing Goto(“SIP/113-5bf7”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing NoOp(“SIP/113-5bf7”, “Dial failed due to CONGESTION”) in new stack
– Executing Macro(“SIP/113-5bf7”, “dialout-trunk|4|14173357889||”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?3:2”) in new stack
– Goto (macro-dialout-trunk,s,3)
– Executing Macro(“SIP/113-5bf7”, “user-callerid”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSER=113”) in new stack
– Executing Set(“SIP/113-5bf7”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSERCIDNAME=Nick Crocker”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=“Nick Crocker” <113>”) in new stack

asterisk1*CLI>
– Executing NoOp(“SIP/113-5bf7”, “Using CallerID “Nick Crocker” <113>”) in new stack
– Executing Macro(“SIP/113-5bf7”, “record-enable|113|OUT”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/113-5bf7”, “recordingcheck|20060503-165527|1146689726.169”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

asterisk1*CLI>
recordingcheck|20060503-165527|1146689726.169: Outbound recording not enabled

asterisk1*CLI>
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/113-5bf7”, “No recording needed”) in new stack
– Executing Macro(“SIP/113-5bf7”, “outbound-callerid|4”) in new stack
– Executing Set(“SIP/113-5bf7”, “USEROUTCID=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?4”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=5125354350”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?8”) in new stack
– Goto (macro-outbound-callerid,s,8)
– Executing NoOp(“SIP/113-5bf7”, “CallerID set to “” <113>”) in new stack
– Executing Set(“SIP/113-5bf7”, “GROUP()=OUT_4”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?108”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_NUMBER=14173357889”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_TRUNK=4”) in new stack
– Executing AGI(“SIP/113-5bf7”, “fixlocalprefix”) in new stack

asterisk1*CLI>
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix

asterisk1*CLI>
fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf

asterisk1*CLI>
– AGI Script fixlocalprefix completed, returning 0

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “OUTNUM=14173357889”) in new stack

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “custom=SIP/vonage_out_4350”) in new stack

asterisk1*CLI>
– Executing GotoIf(“SIP/113-5bf7”, “0?16”) in new stack

asterisk1*CLI>
– Executing Dial(“SIP/113-5bf7”, “SIP/vonage_out_4350/14173357889|120|W”) in new stack

asterisk1*CLI>
– Called vonage_out_4350/14173357889

asterisk1*CLI>
– SIP/vonage_out_4350-fd07 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing Goto(“SIP/113-5bf7”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing NoOp(“SIP/113-5bf7”, “Dial failed due to CONGESTION”) in new stack
– Executing Macro(“SIP/113-5bf7”, “dialout-trunk|5|14173357889||”) in new stack

asterisk1*CLI>
– Executing GotoIf(“SIP/113-5bf7”, “1?3:2”) in new stack
– Goto (macro-dialout-trunk,s,3)
– Executing Macro(“SIP/113-5bf7”, “user-callerid”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSER=113”) in new stack
– Executing Set(“SIP/113-5bf7”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/113-5bf7”, “AMPUSERCIDNAME=Nick Crocker”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=“Nick Crocker” <113>”) in new stack
– Executing NoOp(“SIP/113-5bf7”, “Using CallerID “Nick Crocker” <113>”) in new stack
– Executing Macro(“SIP/113-5bf7”, “record-enable|113|OUT”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/113-5bf7”, “recordingcheck|20060503-165527|1146689726.169”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

asterisk1*CLI>
recordingcheck|20060503-165527|1146689726.169: Outbound recording not enabled

asterisk1*CLI>
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/113-5bf7”, “No recording needed”) in new stack
– Executing Macro(“SIP/113-5bf7”, “outbound-callerid|5”) in new stack
– Executing Set(“SIP/113-5bf7”, “USEROUTCID=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?4”) in new stack
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=5125354351”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?6”) in new stack

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “CALLERID(all)=113”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “1?8”) in new stack
– Goto (macro-outbound-callerid,s,8)
– Executing NoOp(“SIP/113-5bf7”, “CallerID set to “” <113>”) in new stack
– Executing Set(“SIP/113-5bf7”, “GROUP()=OUT_5”) in new stack
– Executing GotoIf(“SIP/113-5bf7”, “0?108”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_NUMBER=14173357889”) in new stack
– Executing Set(“SIP/113-5bf7”, “DIAL_TRUNK=5”) in new stack
– Executing AGI(“SIP/113-5bf7”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix

asterisk1*CLI>
fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf

asterisk1*CLI>
– AGI Script fixlocalprefix completed, returning 0

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “OUTNUM=14173357889”) in new stack

asterisk1*CLI>
– Executing Set(“SIP/113-5bf7”, “custom=SIP/vonage_out_4351”) in new stack

asterisk1*CLI>
– Executing GotoIf(“SIP/113-5bf7”, “0?16”) in new stack

asterisk1*CLI>
– Executing Dial(“SIP/113-5bf7”, “SIP/vonage_out_4351/14173357889|120|W”) in new stack

asterisk1*CLI>
– Called vonage_out_4351/14173357889

asterisk1*CLI>
– SIP/vonage_out_4351-e247 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing Goto(“SIP/113-5bf7”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing NoOp(“SIP/113-5bf7”, “Dial failed due to CONGESTION”) in new stack
– Executing Macro(“SIP/113-5bf7”, “outisbusy|”) in new stack
– Executing Playback(“SIP/113-5bf7”, “all-circuits-busy-now”) in new stack

asterisk1*CLI>
– Playing ‘all-circuits-busy-now’ (language ‘en’)

asterisk1*CLI>
– Executing Playback(“SIP/113-5bf7”, “pls-try-call-later”) in new stack

asterisk1*CLI>
– Playing ‘pls-try-call-later’ (language ‘en’)

asterisk1*CLI>
== Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/113-5bf7’ in macro ‘outisbusy’
== Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/113-5bf7’

asterisk1*CLI> [/code]

[quote=“rusty”]you may have already seen this but here it is

voip-info.org/wiki/view/Asterisk+and+Vonage[/quote]

Thanks I have seen this, it helped me to get this far, thanks for the post :smile:

Thanks Nick,

Here is a little more info I found, when switching the NAT to yes this is what I get when I try to place a call. This came from Flash OP

Server = 0 CID-CallingPres = 0 (Presentation Allowed, Not Screened) Event = Hangup CallerID = 14173357889 Privilege = call,all Channel = SIP/vonage_out_4348-a567 State = Down Cause = 1 CallerIDName = <Unknown> Uniqueid = 1146695627.247-0 Cause-txt = Unallocated (unassigned) num

As soon as I turn on NAT=Yes it tears down the SIP trunks from originating calls. :frowning:

An update I got both inbound and outbound working but it is still screwed up.

With my register string set to this: register=15125354348:password@sphone.vopr.vonage.net:5061/113
outbound will work on that trunk but incoming fails, I see it hit asterisk and fail

With this register string on a second trunk like this: register=15125354349:password@216.115.20.41:5061/113

Incoming will work but outbound on that trunk gets congestion.

Sip.conf

[code]; Note: If your SIP devices are behind a NAT and your Asterisk
; server isn’t, try adding “nat=1” to each peer definition to
; solve translation problems.

[general]

bindport= 5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr= 192.168.1.200 ; IP address to bind to (0.0.0.0 binds to all)
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=g723
context = incoming ; Send unknown SIP callers to this context from-sip-external
externip= 68.201.253.91
localnet= 192.168.1.0/255.255.255.0
srvlookup=yes
nat=yes

#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
#include additional_a2billing_sip.conf[/code]

Any ideas why one register string wont do both jobs incoming/outgoing?

Later,

Nick