[Asterisk-Users] SIP Problem - Asterisk to Provider Gateway

Gavin Adams me at gavinadams.org
Fri Mar 3 11:46:49 MST 2006


Hi All,

I'm stumped on a weird problem. I have an * server working fine for local
SIP phones and IAX2 connections. We just provisioned a second Ethernet
port to attach to a local SIP provider.

PSTN calls incoming work fine:

PSTN -> SIP Provider -> SIP -> *

but outgoing calls are not. Call setup takes place and the caller can hear
about 1-2 seconds of audio before the SIP provider cancels the call and
sends back a BYE message. They haven't made any changes on their end
(metaswitch).

The wierd part is that yesterday I was having the exact opposite problem
(outgoing working fine, incoming calls no audio). RTP setup was correct,
but * wasn't responding to the RTP packets.

Recompiled asterisk with PRI support for the X100P card installed:

make && make install libpri (1.2.2)
make clean && make && make install zaptel (1.2.3)
make clean && make && make install asterisk (1.2.4)

Set zaptel and zapata for the X100P and TDM400P cards (not in use, but
using for clock) and the incoming audio was fixed, outgoing not so much.

Here is a debug of the SIP session. The ones I'm curious about are the
provider OK packets and *'s ACK response. It appears that the SIP provider
isn't seeing them. Also, the ACK response time is less than 1ms (with
qualify on, the SIP peer quals at 4-6ms).

Any assistance would be appreciated.

tethereal:

1   0.000000   10.70.0.92 -> 10.70.0.89   SIP/SDP Request: INVITE
sip:2924357 at pbx-quantum, with session description
2   0.003542   10.70.0.89 -> 10.70.0.92   SIP Status: 100 Trying
3   1.214914   10.70.0.89 -> 10.70.0.92   SIP/SDP Status: 183 Session
Progress, with session description
4   1.216377   10.70.0.89 -> 10.70.0.92   SIP Status: 180 Ringing
5   1.528401   10.70.0.89 -> 10.70.0.92   SIP/SDP Status: 200 OK, with
session description
6   1.528820   10.70.0.92 -> 10.70.0.89   SIP Request: ACK
sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp
7   1.771613   10.70.0.89 -> 10.70.0.92   SIP/SDP Status: 200 OK, with
session description
8   1.772038   10.70.0.92 -> 10.70.0.89   SIP Request: ACK
sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp
9   2.271674   10.70.0.89 -> 10.70.0.92   SIP/SDP Status: 200 OK, with
session description
10   2.272098   10.70.0.92 -> 10.70.0.89   SIP Request: ACK
sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp
11   3.271984   10.70.0.89 -> 10.70.0.92   SIP/SDP Status: 200 OK, with
session description
12   3.272384   10.70.0.92 -> 10.70.0.89   SIP Request: ACK
sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp
13   3.522590   10.70.0.89 -> 10.70.0.92   SIP Request: BYE
sip:4414964319 at 10.70.0.92;transport=udp
14   3.522947   10.70.0.92 -> 10.70.0.89   SIP Status: 200 OK

And a few of the sip debug messages for the SIP/SDP and SIP Request ACK
packets:

<-- SIP read from 10.70.0.89:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK1f0a40b1;rport=5060
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 INVITE
Server: DC-SIP/2.0
Allow-Events: message-summary
Allow-Events: refer
Supported: 100rel
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Allow: REGISTER
Allow: OPTIONS
Allow: PRACK
Allow: UPDATE
Allow: SUBSCRIBE
Allow: NOTIFY
Allow: REFER
Accept-Encoding: identity
Accept: application/sdp
Accept: application/simple-message-summary
Contact: <sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp>
Content-Length: 119
Content-Type: application/sdp

v=0
o=- 3244118288 3244118288 IN IP4 10.70.0.89
s=-
c=IN IP4 10.70.0.89
t=0 0
m=audio 9196 RTP/AVP 0
a=ptime:20

--- (27 headers 7 lines)---
Found RTP audio format 0
Peer audio RTP is at port 10.70.0.89:9196
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0
(nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing),
combined - 0x0 (nothing)
Transmitting (no NAT) to 10.70.0.89:5060:
ACK sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK7713b672;rport
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Contact: <sip:4414964319 at 10.70.0.92>
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
localhost*CLI>
<-- SIP read from 10.70.0.89:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK1f0a40b1;rport=5060
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 INVITE
Server: DC-SIP/2.0
Allow-Events: message-summary
Allow-Events: refer
Supported: 100rel
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Allow: REGISTER
Allow: OPTIONS
Allow: PRACK
Allow: UPDATE
Allow: SUBSCRIBE
Allow: NOTIFY
Allow: REFER
Accept-Encoding: identity
Accept: application/sdp
Accept: application/simple-message-summary
Contact: <sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp>
Content-Length: 119
Content-Type: application/sdp

v=0
o=- 3244118288 3244118288 IN IP4 10.70.0.89
s=-
c=IN IP4 10.70.0.89
t=0 0
m=audio 9196 RTP/AVP 0
a=ptime:20

--- (27 headers 7 lines)---
Found RTP audio format 0
Peer audio RTP is at port 10.70.0.89:9196
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0
(nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing),
combined - 0x0 (nothing)
Transmitting (no NAT) to 10.70.0.89:5060:
ACK sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK10a132f3;rport
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Contact: <sip:4414964319 at 10.70.0.92>
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
localhost*CLI>
<-- SIP read from 10.70.0.89:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK1f0a40b1;rport=5060
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 INVITE
Server: DC-SIP/2.0
Allow-Events: message-summary
Allow-Events: refer
Supported: 100rel
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Allow: REGISTER
Allow: OPTIONS
Allow: PRACK
Allow: UPDATE
Allow: SUBSCRIBE
Allow: NOTIFY
Allow: REFER
Accept-Encoding: identity
Accept: application/sdp
Accept: application/simple-message-summary
Contact: <sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp>
Content-Length: 119
Content-Type: application/sdp

v=0
o=- 3244118288 3244118288 IN IP4 10.70.0.89
s=-
c=IN IP4 10.70.0.89
t=0 0
m=audio 9196 RTP/AVP 0
a=ptime:20

--- (27 headers 7 lines)---
Found RTP audio format 0
Peer audio RTP is at port 10.70.0.89:9196
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0
(nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing),
combined - 0x0 (nothing)
Transmitting (no NAT) to 10.70.0.89:5060:
ACK sip:2924357 at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.70.0.92:5060;branch=z9hG4bK38b38604;rport
From: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
To:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
Contact: <sip:4414964319 at 10.70.0.92>
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
localhost*CLI>
<-- SIP read from 10.70.0.89:5060:
BYE sip:4414964319 at 10.70.0.92;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.70.0.89:5060;branch=z9hG4bK4228lv20e85g7bonk241.1
Allow-Events: message-summary
Allow-Events: refer
Max-Forwards: 69
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
From:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
To: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
CSeq: 803546145 BYE
Supported: 100rel
Content-Length: 0


--- (11 headers 0 lines)---
Sending to 10.70.0.89 : 5060 (non-NAT)
Transmitting (no NAT) to 10.70.0.89:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.70.0.89:5060;branch=z9hG4bK4228lv20e85g7bonk241.1;received=10.70.0.89
From:
<sip:2924357 at pbx-quantum>;tag=SD6q75199-quantum1.quantum.bm+1+acb61+6a3a58ac
To: "4414964319" <sip:4414964319 at 10.70.0.92>;tag=as75a2b003
Call-ID: 296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92
CSeq: 803546145 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:4414964319 at 10.70.0.92>
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing


---
    -- Hungup 'IAX2/Paragon-ATL-1'
Destroying call '296c97ab6b5f1b2444d51cf9681a7c42 at 10.70.0.92'
localhost*CLI>
<-- SIP read from 10.70.0.89:5060:
OPTIONS sip:metaswitch at 10.70.0.92:5060 SIP/2.0
Via: SIP/2.0/UDP 10.70.0.89:5060;branch=z9hG4bK42285d30dgth3bsbb4s0.1
Allow-Events: message-summary
Allow-Events: refer
Max-Forwards: 69
Call-ID: SD60v9a01-2d0c8591c963fef19d65359cc21f83b2-v3000i1
From:
<sip:metaswitch at 10.70.0.89:5060;transport=udp>;tag=SD60v9a01-quantum1.quantum.bm+1+0+988ea0c4
CSeq: 134320618 OPTIONS
Supported: 100rel
Content-Length: 0
Contact: <sip:metaswitch at 127.0.0.100:5060;maddr=10.70.0.89;transport=udp>
To: <sip:metaswitch at 10.70.0.92>


--- (12 headers 0 lines)---
Looking for metaswitch in default (domain 10.70.0.92)
Transmitting (no NAT) to 10.70.0.89:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.70.0.89:5060;branch=z9hG4bK42285d30dgth3bsbb4s0.1;received=10.70.0.89
From:
<sip:metaswitch at 10.70.0.89:5060;transport=udp>;tag=SD60v9a01-quantum1.quantum.bm+1+0+988ea0c4
To: <sip:metaswitch at 10.70.0.92>;tag=as3b6cbf64
Call-ID: SD60v9a01-2d0c8591c963fef19d65359cc21f83b2-v3000i1
CSeq: 134320618 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:10.70.0.92>
Accept: application/sdp
Content-Length: 0

Regards,

--- Gavin



More information about the asterisk-users mailing list