[solved] outgoing calls OK, incoming call one-way audio

Dear asterisk users,
I’m facing a problem I can’t solve.

I installed asterisk 1.4 and I’m using it with a softphone (eyebeam) using an sip provider.
My asterisk is installed on a nas behind a modem / router.

If I call from Eyebeam to external number, everything is ok.
If I call from external number to eyebeam, I receive the call and I can hear the sound from eyebeam to external number but not the other way.

On my router, I redirected UDP 5060 to the nas (same port) and also udp 10000-20000 to my nas (same port).
In my rtp.conf I have this:

[quote]rtpstart=10000
rtpend=20000
[/quote]

Does anyone feel like he might help me finding a solution to this issue?
Thanks a lot!

Not without seeing the SDP exchange and the NAT related options in sip.conf.

Hello,
in my users.conf,
I have this for the softphone extension:

here’s my sip.conf:

[quote][general]
context = default ; Default context for incoming calls
allowoverlap = no ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no ; Disable all transfers (unless enabled in peers or users)
bindport = 5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr = 0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup = yes ; Enable DNS SRV lookups on outbound calls
register => xxxxxxxx:xxxx@212.71.0.11/21 ; I replaced private values by xxxx
externhost = mydomain.dyndns.org ; Alternatively you can specify an
externrefresh = 20 ; How often to refresh externhost if
localnet = 192.168.1.0/255.255.255.0
nat = yes ; Global NAT settings (Affects all peers and users)
allowexternaldomains = no
allowexternalinvites = no
allowguest = yes
allowsubscribe = no
allowtransfer = yes
alwaysauthreject = no
autodomain = no
callevents = no
compactheaders = no
dumphistory = no
g726nonstandard = no
ignoreregexpire = no
jbenable = no
jbforce = no
jblog = no
language = fr
maxcallbitrate = 384
maxexpiry = 3600
minexpiry = 60
notifyringing = no
pedantic = no
promiscredir = no
recordhistory = no
relaxdtmf = no
rtcachefriends = no
rtsavesysname = no
rtupdate = no
sendrpid = no
sipdebug = no
t1min = 100
t38pt_udptl = no
progressinband = no
trustrpid = no
usereqphone = no
videosupport = no
insecure=port,invite
[authentication]
[/quote]

But I’m sorry, I do’nt know what is the SDP exchange…

I notice you have dynamic DNS. Don’t expect things to work well if IP addresses change whilst Asterisk is running.

SDP is session description protocol and its messages are exchanged during the SIP dialogue as the body of SIP requests and responses. sip set debug on will provide the details. You an also get them using wireshark.

voipplanet.com/backgrounders … hp/3510741 is an introduction to SDP.

[quote=“david55”]I notice you have dynamic DNS. Don’t expect things to work well if IP addresses change whilst Asterisk is running.

SDP is session description protocol and its messages are exchanged during the SIP dialogue as the body of SIP requests and responses. sip set debug on will provide the details. You an also get them using wireshark.[/quote]
Thanks for your feedback.

I know that using dynamic DNS is not recommended. However, I’m pretty sure that this is not the problem as my ip is very stable and I always restart asterisk each time I am making a test. Also the ip I can see in the sip headers is mine.

So, in production I know I should prefer a fixed ip but this should not the be the cause of the problem right now.

Here’s what is displayed when I am placing a call from inside to an external number (and everthing is ok):

[quote] – Executing [the-external-number@numberplan-custom-1:1] Macro(“SIP/21-00199d18”, “trunkdial|SIP/trunk_1/the-external-number”) in new stack
– Executing [s@macro-trunkdial:1] Dial(“SIP/21-00199d18”, “SIP/trunk_1/the-external-number”) in new stack
– Called trunk_1/the-external-number
– SIP/trunk_1-001a1d40 is making progress passing it to SIP/21-00199d18
– SIP/trunk_1-001a1d40 is making progress passing it to SIP/21-00199d18
– SIP/trunk_1-001a1d40 is making progress passing it to SIP/21-00199d18
– SIP/trunk_1-001a1d40 answered SIP/21-00199d18
== Spawn extension (macro-trunkdial, s, 1) exited non-zero on ‘SIP/21-00199d18’ in macro ‘trunkdial’
== Spawn extension (macro-trunkdial, s, 1) exited non-zero on ‘SIP/21-00199d18’[/quote]

and here’s the opposite scenario: (I’m calling from my cell phone to the number assigned to me by my sip provider); the call is accepted on my x-lite (local extension 21) and there is the one-way audio problem:

[quote]Executing [21@DID_trunk_1:1] Goto(“SIP/my-external-number-00199d18”, “default|21|1”) in new stack
– Goto (default,21,1)
– Executing [21@default:1] Macro(“SIP/my-external-number-00199d18”, “stdexten|21|SIP/21”) in new stack
– Executing [s@macro-stdexten:1] Dial(“SIP/my-external-number-00199d18”, “SIP/21|20”) in new stack
– Called 21
– SIP/21-0019dc90 is ringing
– SIP/21-0019dc90 answered SIP/my-external-number-00199d18
[Jun 8 14:23:36] WARNING[17048]: channel.c:2813 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x4 (ulaw)
[Jun 8 14:23:36] WARNING[17048]: channel.c:2813 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x8 (alaw)
[Jun 8 14:23:36] WARNING[17048]: chan_sip.c:3724 sip_write: Asked to transmit frame type 8, while native formats is 0x1 (g723)(1) read/write = 0x4 (ulaw)(4)/0x8 (alaw)(8)
[/quote]

Thanks for your time.

You seem to be missing the sip.conf for the “trunk”. It looks like you are allowing G.723, explicitly or by default, but you don’t have G.723 codec support in the code and the extension doesn’t support G.723. You need to ensure that you have allow and disallow settings that do not permit G.723, or any other codec for which you do not have support.

Turn off allowguest NOW! It is a security problem and it may be causing calls from your service provider to bypass the specific configuration for the “trunk”.

(“trunk” is not an Asterisk concept, but is used in many Asterisk GUIs.)

Hello,
I finally found the solution:

I had a problem with a codec conversion.
So I replaced this in my users.conf:

[quote][trunk_1]
allow = all[/quote]

[quote][trunk_1]
allow = alaw
allow = ulaw
allow = gsm[/quote]

and the same for

[quote][21]
allow = alaw
allow = ulaw
allow = gsm[/quote]

It now works like a charm…
Thanks to david55 for giving me the way to debug my sip calls…
For the newbies like me, I launched asterisk using “asterisk -vvvvc” to see the error messages.

[quote=“david55”]You seem to be missing the sip.conf for the “trunk”. It looks like you are allowing G.723, explicitly or by default, but you don’t have G.723 codec support in the code and the extension doesn’t support G.723. You need to ensure that you have allow and disallow settings that do not permit G.723, or any other codec for which you do not have support.

Turn off allowguest NOW! It is a security problem and it may be causing calls from your service provider to bypass the specific configuration for the “trunk”.

(“trunk” is not an Asterisk concept, but is used in many Asterisk GUIs.)[/quote]

allowguest is now set to no :unamused:
and everything is still working. Thanks a lot for your complete, correct and fast answers :wink: