Outbound calls have no "inbound" audio until placed on and off hold

Ok, so my inbound calls are working fine on the audio side… but when I call out… the person can hear me but I can’t hear them… so no inbound audio on an outbound call until I put them on hold and take them off… then the audio works fine for some reason…

Here’s what I have in sip.conf

[general]
register=asterisk:password@voiphost.com

[TRUNK]
type=peer
port=5060
nat=auto
insecure=port,invite
host=voiphost.com
username=asterisk
fromuser=asterisk
fromdomain=voiphost.com
secret=password
context=from-trunk
canreinvite=no
disallow=all
allow=ulaw
sendrpid=yes

[INBOUND]
disallow=all
type=peer
port=5060
nat=auto
insecure=invite
host=voiphost.com
dtmfmode=rfc2833
context=from-trunk
canreinvite=nonat
allow=ulaw

[friends_internal] (!)
type=friend
host=dynamic
context=from-internal
allow=all
canreinvite=no
directmedia=no
busylevel=1
allowsubscribe=yes

[100] (friends_internal)
secret=password
mailbox=100@default
qualify=yes

On this particular Grandstream phone I have other accounts registered to other servers and I don’t have the same issue… Looked at the firewall settings and the ports are indeed open on this particular server… The audio works fine on inbound calls after all…

Don’t know what else to look at… any help greatly appreciated.

Thanks!

If this is a new installation, you should be using chan_pjsip, not chan_sip.

You haven’t identified the version.

There is no documented nat=auto option.

canreinvite has been renamed, although I think the obsolete name still works.

canreinvite and directmedia are the same, so it does not make sense to include both.

Best practice is to use type=peer for everything unless multiple peers share an IP address.

Best practice is not to use insecure=port unless using TCP, or you actually have problems with varying remote port numbers.

What else to look at is the sip protocol traces, in particular the SDP, and the RTP trace, to see the addresses actually used. Also, I seem to remember this complaint coming up before, so googling the forum would be a good idea.

Still having issues with audio on outbound calls…

Have made these changes to the internal context and extension… but doesn’t seem to improve anything…

[friends_internal](!)
type=peer
host=dynamic
context=from-internal
allow=all
;canreinvite=no
directmedia=no
busylevel=1
allowsubscribe=yes

[100](friends_internal)
secret=password
mailbox=100@default
qualify=yes
keepalive=yes

No inbound audio until i put the call on hold and then pick it back up… then the audio is fine both ways… Incoming calls don’t have this issue at all… really can’t make heads or tails or it…

Because this is a NAT issue. I take it the phones are remote to the PBX or this is happening with calls over the trunks from the PSTN. The SDP of the initial INVITE/200 OK probably has internal IP details in it and when the call is put on hold and taken off a hold it forces new INVITES/200 OK along with SDP which at this point now has the right details in it.

So are all the phones remote and this is happening with all calls? Or are the phones local, Asterisk is behind NAT and this happens with calls over the PSTN?

The phones are remote to the Asterisk box and yes it happens to all calls to the remote phones.

I am not sure how to fix the NAT issue…

Since you’re using Chan_SIP you would set nat=force_rport,comedia on the peers and that will tell Asterisk the peer is behind NAT. Do that with a few devices and the trunk peer and see what happens.

Thank you! That seems to have fixed it… added nat=force_rport,comedia and voila… sound both ways…

I hate dealing with NAT… i appreciate the help!

Rick

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.