[asterisk-users] Nat issue one way audio on IP dial

Nasir Javaid nasirjavaidnasir at gmail.com
Wed Jul 28 11:23:16 CDT 2010


hi there,

i have posted earlier on the list but got no satisfying answer. the problem
is not big.

I have asterisk server directly connected with internet (79.80.x.x) and
clients are behind router. clients/users are registered with asterisk and
are using sipura and xlite softphone.

Now problem is that when a user calls other by dialing his IP:Port (sip
uri), call is connected fine and he can hear the called user but the called
user can not here the caller voice.

If the caller calls the other user by username instead of IP:Port , the
voice is perfect both ways.

what i have noticed is that IP:Port dial is missing a parameter "rinstance"
in "Contact" , "To" headers for adf. what is "rinstance" for? Also something
with "Contact" header seems fishy. or RTP issue.

that is

Dial(SIP/adf,30,r) works fine with bothway audio, but

Dial(SIP/116.18.35.235:28614,30,r) has one way audio.
            /                                 \
            |                                  |
             this is IP:Port of of adf

please help as it's almost 2 weeks and i have found to suitable answer from
any forum. I nead to know what can i do to modify Headers or settings in
conf files to correct this problem.

Below is the conf of calling user

[pepsi]
username=pepsi
type=friend
secret=123456
qualify=yes
nat=no
insecure=port,invite
incominglimit=1
outgoinglimit=1
host=dynamic
dtmfmode=rfc2833
context=out
canreinvite=yes
callerid="pepsi coke" <12345678901>
accountcode=6:0:pepsi
amaflags=default
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm

Below is the conf of called user

[adf]
username=adf
type=friend
secret=123456
qualify=yes
nat=yes
insecure=port,invite
incominglimit=2
outgoinglimit=2
host=dynamic
dtmfmode=rfc2833
context=user
canreinvite=yes
callerid="adf xyz" <11223344556>
accountcode=1:0:adf
amaflags=default
disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=gsm



below is my sip debug after dialing

Audio is at 79.80.x.x port 16238
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 116.18.35.235:28614:
INVITE sip:adf at 116.18.35.235:28614 SIP/2.0
Via: SIP/2.0/UDP 79.80.x.x:5678;branch=z9hG4bK46e569df;rport
From: "pepsi coke" <sip:12345678901 at 79.80.x.x:5678>;tag=as42ec768c
To: <sip:adf at 116.18.35.235:28614>
Contact: <sip:12345678901 at 79.80.x.x:5678>
Call-ID: 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 21 Jul 2010 15:10:22 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 9626 9626 IN IP4 79.80.x.x
s=session
c=IN IP4 79.80.x.x
t=0 0
m=audio 16238 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
[Jul 21 11:10:22] WARNING[23814]: chan_sip.c:2872 sip_call: Setting
auto-congest time to 15000 ms.
    -- Called adf at 116.18.35.235:28614
<------------>
ast-server*CLI>
<--- SIP read from 116.18.35.235:28614 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 79.80.x.x:5678;branch=z9hG4bK46e569df;rport=5678
Contact: <sip:adf at 116.18.35.235:28614>
To: <sip:adf at 116.18.35.235:28614>;tag=d54e632c
From: "pepsi coke"<sip:12345678901 at 79.80.x.x:5678>;tag=as42ec768c
Call-ID: 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
CSeq: 102 INVITE
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
    -- SIP/116.18.35.235:28614-007f4660 is ringing
ast-server*CLI>
<--- SIP read from 116.18.35.235:28614 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 79.80.x.x:5678;branch=z9hG4bK46e569df;rport=5678
Contact: <sip:adf at 116.18.35.235:28614>
To: <sip:adf at 116.18.35.235:28614>;tag=d54e632c
From: "pepsi coke"<sip:12345678901 at 79.80.x.x:5678>;tag=as42ec768c
Call-ID: 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 185

v=0
o=- 6 2 IN IP4 192.168.0.12
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.0.12
t=0 0
m=audio 55246 RTP/AVP 8 0 101
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv

<------------->
--- (11 headers 9 lines) ---
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 192.168.0.12:55246
Found description format telephone-event for ID 101
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0xc
(ulaw|alaw)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.0.12:55246
list_route: hop: <sip:adf at 116.18.35.235:28614>
[Jul 21 11:10:27] DEBUG[9707]: chan_sip.c:5695 reqprep: Strict routing
enforced for session 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
set_destination: Parsing <sip:adf at 116.18.35.235:28614> for address/port to
send to
set_destination: set destination to 116.18.35.235, port 28614
Transmitting (NAT) to 116.18.35.235:28614:
ACK sip:adf at 116.18.35.235:28614 SIP/2.0
Via: SIP/2.0/UDP 79.80.x.x:5678;branch=z9hG4bK07eb06b5;rport
From: "pepsi coke" <sip:12345678901 at 79.80.x.x:5678>;tag=as42ec768c
To: <sip:adf at 116.18.35.235:28614>;tag=d54e632c
Contact: <sip:12345678901 at 79.80.x.x:5678>
Call-ID: 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
    -- Call on SIP/116.18.35.235:28614-007f4660 left from hold
    -- SIP/116.18.35.235:28614-007f4660 answered SIP/pepsi-9fdfb9a0
ast-server*CLI>
<--- SIP read from 116.18.35.235:28614 --->



<------------->
--- (0 headers 1 lines) ---
ast-server*CLI>
<--- SIP read from 116.18.35.235:28614 --->



<------------->
--- (0 headers 1 lines) ---
Scheduling destruction of SIP dialog
'0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x' in 32000 ms (Method: INVITE)
[Jul 21 11:11:03] DEBUG[23814]: chan_sip.c:5695 reqprep: Strict routing
enforced for session 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
set_destination: Parsing <sip:adf at 116.18.35.235:28614> for address/port to
send to
set_destination: set destination to 116.18.35.235, port 28614
Reliably Transmitting (NAT) to 116.18.35.235:28614:
BYE sip:adf at 116.18.35.235:28614 SIP/2.0
Via: SIP/2.0/UDP 79.80.x.x:5678;branch=z9hG4bK36df65b5;rport
From: "pepsi coke" <sip:12345678901 at 79.80.x.x:5678>;tag=as42ec768c
To: <sip:adf at 116.18.35.235:28614>;tag=d54e632c
Call-ID: 0433af7878e3a8067a40f896382cc3a6 at 79.80.x.x
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0




Nasir Javaid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100728/f1217587/attachment.htm 


More information about the asterisk-users mailing list