SIP Trunk, No NAT, One Way Audio

Hi,

Asterisk 1.6.2.11. SIP trunk from an operator.

Outgoing call : signal is OK, audio is only one way. I can hear the distant person, but she can’t hear me.

Networking :

[IP Phone] ------- [Asterisk] ------- [VoIP Provider's Router] ------- [VoIP Provider's PABX] 192.168.4.107 eth0 : 192.168.4.1 eth1 : 37.1.1.1 37.1.1.2 212.39.140.250

pabx*CLI> sip show peers altitude-output 212.39.140.250 N 5060 OK (13 ms) toto/toto 192.168.4.107 D N 5060 OK (9 ms)

There is no firewall anywhere. This is not a NAT situation. It’s only IP routing in our case.

As you can see from the above, NAT is enabled, but it’s useless I’m afraid. But I still have my problem using “nat=no”.

I’ve been playing a lot with externip, localnet, etc. Did tcpdumps… Just can’t get it.

Please help.

Thanks in advance.

What IP address does sip show channel … show for the failing leg?

Hi david55, thanks for replying.

pabx*CLI> sip show channels Peer User/ANR Call ID Format Hold Last Message Expiry 212.39.140.250 0601020304 7b62ef5f1cd9706 0x8 (alaw) No Tx: ACK 192.168.4.107 toto b3e8589c-23d85f 0x100004 (ulaw| No Rx: ACK 2 active SIP dialogs

The bridging looks OK too.

pabx*CLI> core show channels verbose Channel Context Extension Prio State Application Data CallerID Duration Accountcode BridgedTo SIP/altitude-output- default 1 Up AppDial (Outgoing Line) 10601020304 00:02:10 SIP/toto-0000a4f0 SIP/toto-0000a4f0 default 10601020304 1 Up Dial SIP/altitude-output/06010 133 00:02:10 SIP/altitude-output- 2 active channels 1 active call

Could that be a routing issue between 192.168.4.107 and 212.39.140.250 ?

Thanks in advance.

I think you need to use sip show channel, rather than sip show channels, to see where it thinks the RTP is going.

pabx*CLI> sip show channels Peer User/ANR Call ID Format Hold Last Message Expiry 192.168.4.107 toto 7507cfee-ade0d5 0x100004 (ulaw| No Rx: ACK 212.39.140.250 0601020304 0f25884a715eee0 0x4 (ulaw) No Tx: ACK

[code]pabx*CLI> sip show channel 7507cfee-ade0d5

  • SIP Call
    Curr. trans. direction: Incoming
    Call-ID: 7507cfee-ade0d541@192.168.4.107
    Owner channel ID: SIP/toto-0000a523
    Our Codec Capability: 209715199
    Non-Codec Capability (DTMF): 1
    Their Codec Capability: 1051917
    Joint Codec Capability: 1051917
    Format: 0x100004 (ulaw|h263p)
    T.38 support Yes
    Video support No
    MaxCallBR: 384 kbps
    Theoretical Address: 192.168.4.107:5060
    Received Address: 192.168.4.107:5060
    SIP Transfer mode: open
    NAT Support: RFC3581
    Audio IP: 192.168.4.1 (local)
    Our Tag: as2fca1e7c
    Their Tag: ad75d80ae3cf0bd5o0
    SIP User agent: Linksys/SPA942-5.2.8
    Username: toto
    Peername: toto
    Original uri: sip:toto@192.168.4.107:5060
    Caller-ID: 133
    Need Destroy: No
    Last Message: Rx: ACK
    Promiscuous Redir: No
    Route: sip:toto@192.168.4.107:5060
    DTMF Mode: rfc2833
    SIP Options: replaces replace
    Session-Timer: Inactive[/code]

* SIP Call Curr. trans. direction: Outgoing Call-ID: 0f25884a715eee0e6cbce51116f92936@37.1.1.1 Owner channel ID: SIP/altitude-output-0000a524 Our Codec Capability: 4 Non-Codec Capability (DTMF): 1 Their Codec Capability: 4 Joint Codec Capability: 4 Format: 0x4 (ulaw) T.38 support Yes Video support No MaxCallBR: 384 kbps Theoretical Address: 212.39.140.250:5060 Received Address: 212.39.140.250:5060 SIP Transfer mode: open NAT Support: RFC3581 Audio IP: 37.1.1.1 (local) Our Tag: as13cb5fe4 Their Tag: 00-07211-091afcfc-6699cf882 SIP User agent: Username: 0601020304 Peername: altitude-output Original uri: sip:212.39.140.250:5060 Need Destroy: No Last Message: Tx: ACK Promiscuous Redir: No Route: sip:212.39.140.250:5060 DTMF Mode: rfc2833 SIP Options: (none) Session-Timer: Inactive

The problem : “toto” can hear the outside when it speaks, however the outside does not hear “toto”.

“Audio IP” is the PABX’s IP address in both cases… Could that be a problem ?

Thanks a lot.

It doesn’t give as much information as I thought. The (local) is OK, unless you expected it to be re-invited. I’m not sure how you get the remote address, other than a full sip debug trace.

Please find below two tcpdumps : one on the 192.168.4 interface, one on the 37.1.1 interface.

[code]INVITE sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 INVITE
Max-Forwards: 70
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 403
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp

v=0
o=- 977196301 977196301 IN IP4 192.168.4.107
s=-
c=IN IP4 192.168.4.107
t=0 0
m=audio 16442 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as2a03c0d7
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="3d985bb2"
Content-Length: 0

ACK sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-b605349e
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as2a03c0d7
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 101 ACK
Max-Forwards: 70
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0

INVITE sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username=“toto”,realm=“asterisk”,nonce=“3d985bb2”,uri="sip:10601020304@192.168.4.1",algorithm=MD5,response="81e7d96e614d4669ffe216c92d24d30f"
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 403
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp

v=0
o=- 977196301 977196301 IN IP4 192.168.4.107
s=-
c=IN IP4 192.168.4.107
t=0 0
m=audio 16442 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Length: 0

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Length: 0

SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Type: application/sdp
Content-Length: 449

v=0
o=root 1435722530 1435722530 IN IP4 192.168.4.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.4.1
t=0 0
m=audio 11628 RTP/AVP 4 0 8 18 97 2 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-e1ca91a6;received=192.168.4.107
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:10601020304@192.168.4.1
Content-Type: application/sdp
Content-Length: 449

v=0
o=root 1435722530 1435722531 IN IP4 192.168.4.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.4.1
t=0 0
m=audio 11628 RTP/AVP 4 0 8 18 97 2 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

ACK sip:10601020304@192.168.4.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.107:5060;branch=z9hG4bK-58d734ed
From: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
To: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 ACK
Max-Forwards: 70
Authorization: Digest username=“toto”,realm=“asterisk”,nonce=“3d985bb2”,uri="sip:10601020304@192.168.4.1",algorithm=MD5,response="81e7d96e614d4669ffe216c92d24d30f"
Contact: “Toto TOTO” sip:toto@192.168.4.107:5060
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0

BYE sip:toto@192.168.4.107:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.1:5060;branch=z9hG4bK0041d7f9;rport
Max-Forwards: 70
From: sip:10601020304@192.168.4.1;tag=as3f93f3a4
To: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.2.11
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

SIP/2.0 200 OK
To: “Toto TOTO” sip:toto@192.168.4.1;tag=888a8566eb11d15eo0
From: sip:10601020304@192.168.4.1;tag=as3f93f3a4
Call-ID: a9f6fc06-bbdecb3e@192.168.4.107
CSeq: 102 BYE
Via: SIP/2.0/UDP 192.168.4.1:5060;branch=z9hG4bK0041d7f9
Server: Linksys/SPA942-5.2.8
Content-Length: 0[/code]

[code]INVITE sip:0601020304@212.39.140.250 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK26a56ac4;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250
Contact: sip:0144010203@37.1.1.1
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Date: Thu, 16 Dec 2010 10:06:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 258

v=0
o=root 2013443425 2013443425 IN IP4 37.1.1.1
s=Asterisk PBX 1.6.2.11
c=IN IP4 37.1.1.1
t=0 0
m=audio 16120 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

SIP/2.0 100 Trying
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 0

OPTIONS sip:212.39.140.250 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK5285f383;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@37.1.1.1;tag=as1f6b2c1f
To: sip:212.39.140.250
Contact: sip:asterisk@37.1.1.1
Call-ID: 265a9a1d464f9c677a756b7d1665a804@37.1.1.1
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.11
Date: Thu, 16 Dec 2010 10:06:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

SIP/2.0 501 Not Implemented
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 265a9a1d464f9c677a756b7d1665a804@37.1.1.1
CSeq: 102 OPTIONS
From: “asterisk” sip:asterisk@37.1.1.1;tag=as1f6b2c1f
Server: Cirpack/v4.42q (gw_sip)
To: sip:212.39.140.250;tag=00-07664-09131fb5-64ec01162
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK5285f383
Content-Length: 0

SIP/2.0 180 Ringing
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241

v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 180 Ringing
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241

v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 200 OK
Allow: INVITE,ACK,BYE,CANCEL,PRACK,UPDATE,INFO
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
Contact: sip:212.39.140.250:5060
Content-Type: application/sdp
CSeq: 102 INVITE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
P-Asserted-Identity: sip:0601020304@212.39.140.250;user=phone
Privacy: id
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK26a56ac4
Content-Length: 241

v=0
o=cp10 129249399520 129249399521 IN IP4 212.39.140.2
s=SIP Call
c=IN IP4 212.39.140.112
t=0 0
m=audio 35020 RTP/AVP 8 101
b=AS:82
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv

ACK sip:212.39.140.250:5060 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK346f7807;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Contact: sip:0144010203@37.1.1.1
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0

BYE sip:212.39.140.250:5060 SIP/2.0
Via: SIP/2.0/UDP 37.1.1.1:5060;branch=z9hG4bK5ec7f7bf;rport
Max-Forwards: 70
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 103 BYE
User-Agent: Asterisk PBX 1.6.2.11
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

SIP/2.0 200 OK
Call-ID: 79f1d61e658f684e5dc3c46425f7b135@37.1.1.1
CSeq: 103 BYE
From: “Toto TOTO” sip:0144010203@37.1.1.1;tag=as0e2e8c99
Server: Cirpack/v4.42q (gw_sip)
To: sip:0601020304@212.39.140.250;tag=00-07916-09131efe-48c1369e6
Via: SIP/2.0/UDP 37.1.1.1:5060;received=37.1.1.1;rport=5060;branch=z9hG4bK5ec7f7bf
Content-Length: 0[/code]

Thanks.

/edit I believe this is a routing problem between the 192.168.4 network and the provider’s proxy. We should add a static route on the provider’s router. I’ll sort this out with them tomorrow.