One way audio issue when calling over SIP trunk

Hi

I have an issue with my Asterisk installation.

I have a SIP account at OVH that I want to be able to pickup on any authenticated softphone (my desktop computer, my smartphone and my laptop). I installed Asterisk 1.8.10.1 on my dedicated Utunbu server (using apt-get), created 3 accounts for each device and created a call group.

Everything looks fine except I can’t hear my interlocutor from the landline (but he can hear me). When I call a device from another (ie 6001 to 6002), it works fine.

Asterisk is installed on a dedicated server, directly connected to the Internet. All firewall ports are opened so it’s not a NAT/firewall issue. It looks like an issue between my Asterisk server and OVH.

Here are my config files :

sip.conf

[code][general]
bindport=5060
bindaddr=XXX.XXX.XXX.XXX ; My server’s IP, authentication fails when not provided
srvlookup=yes
defaultexpiry=3600
registertimeout=30
registerattempts=0
allowguest=no
encryption=no
nat = no
directmedia=no ; New name for "canreinvite"
directrtpsetup=no

; SIP trunks
register => 033285XXXXXX:********@sip.ovh.fr

[lenwe-ovh]
encryption=no
type=peer
host=sip.ovh.fr
context=lenwe-incoming
language=fr
insecure=invite,port
fromdomain=sip.ovh.fr
fromuser=033285XXXXXX
username=033285XXXXXX
secret=********
qualify=yes
dtmfmode=auto
language=fr
video=no
disallow=all
allow=ulaw,alaw,g729[/code]

users.conf

[code][general]
fullname = New User
userbase = 6000
hasvoicemail = no
hassip = yes
hasiax = no
hasmanager = no

lenwe
type=friend
host=dynamic
dtmfmode=auto
fullname = Lenwe
context=lenwe-internal
secret=O1mwODnU
language=fr
video=no
mailbox=XXXXXXXX@XXX.com
disallow=all
allow=ulaw,alaw,g729

6001
username = lenwe-office

6002
username = lenwe-mobile

6003
username = lenwe-laptop[/code]

extensions.conf

[code][general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[lenwe-incoming]

; from external
exten => s,1,Dial(SIP/6001&SIP/6002&SIP/6003,20,t)

[lenwe-internal]

; to internal
exten => _6XXX,1,Dial(SIP/${EXTEN},20,t)

; to external
exten => _X.,1,Dial(SIP/lenwe-ovh/${EXTEN}) [/code]

Here is the debug trace when placing a call from Asterisk to a landline phone (then hanging up).

Call from 6001 to landline 0951XXXXXX

== Using SIP RTP CoS mark 5 -- Executing [0951XXXXXX@lenwe-internal:1] Dial("SIP/6001-00000000", "SIP/lenwe-ovh/0951XXXXXX") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/lenwe-ovh/0951XXXXXX -- SIP/lenwe-ovh-00000001 is ringing -- SIP/lenwe-ovh-00000001 is making progress passing it to SIP/6001-00000000 -- SIP/lenwe-ovh-00000001 answered SIP/6001-00000000 -- Remotely bridging SIP/6001-00000000 and SIP/lenwe-ovh-00000001 == Spawn extension (lenwe-internal, 0951XXXXXX, 1) exited non-zero on 'SIP/6001-00000000'

Now, this is the trace when calling from a landline to my SIP line. The 6001 and 6002 clients are up and ringing (6003 is offline).

Call from landline 0951XXXXXX to 6XXX

== Using SIP RTP CoS mark 5 -- Executing [s@lenwe-incoming:1] Dial("SIP/lenwe-ovh-00000005", "SIP/6001&SIP/6002&SIP/6003,20,t") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/6001 == Using SIP RTP CoS mark 5 -- Called SIP/6002 [Dec 12 12:56:13] WARNING[15946]: app_dial.c:2218 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) -- SIP/6001-00000006 connected line has changed. Saving it until answer for SIP/lenwe-ovh-00000005 -- SIP/6002-00000007 connected line has changed. Saving it until answer for SIP/lenwe-ovh-00000005 -- SIP/6001-00000006 is ringing -- SIP/6002-00000007 is ringing -- SIP/6001-00000006 connected line has changed. Saving it until answer for SIP/lenwe-ovh-00000005 -- SIP/6001-00000006 answered SIP/lenwe-ovh-00000005 == Spawn extension (lenwe-incoming, s, 1) exited non-zero on 'SIP/lenwe-ovh-00000005'

Do you know how could I fix this issue ?

Thanks

Either your ISP is blocking the media or one of your facts is incorrect.

You should check the SDP in the INVITE or ACK and the 200 OK and make sure that all the media addresses really are public.

My ISP does not block the media. I can use my SIP account directly on my computer and my mobile phone without problem.

I have no idea how the request should look like so I attached the debug traces. Hope this helps…
[ul][li]Outgoing call from 6001 (my computer) to landline phone : pastebin.com/16Ht9ED3[/li]
[li]Outgoing call from 6002 (my smartphone) to landline phone : pastebin.com/NvAaAx9y[/li][/ul]

I edited the real IPs and phone numbers as follow :
[ul][li]XXX.XXX.XXX.XXX Is my dedicated server’s IP mydedicatedserver.com[/li]
[li]YYY.YYY.YYY.YYY Is the public IP of my desktop computer (behind router). Local IP is 192.168.0.1[/li]
[li]ZZZ.ZZZ.ZZZ.ZZZ Is the public IP of my mobile phone (behind router). Local IP is 10.101.125.252[/li]
[li]91.121.129.20 is the IP of my SIP trunk sip.ovh.fr [/li]
[li]0951XXXXXX Landline phone number I’m trying to get sound from[/li]
[li]0033285XXXXXX My SIP phone number[/li][/ul]

Looks like the computer has NAT problems. It is specifying the private address as its media address and its contact address. If that is not routable from the dedicated server, it will not receive incoming media.

Either configure the dedicated server to be able to route to your computer, or convince your computer to use YYY.YYY.YYY.YYY, not 192.168.0.1