SIP call connected no voice


#1

Dear Asterisk Users,

I am using a VOIP account to call a GSM number through asterisk … when I register a softphone in any pc inside my LAN call connects successfully with audio on both ways.

but when i try registering a phone on some external public IP … the phone gets registered successfully to asterisk … but when i try calling on the GSM number call comes to the GSM number but with no voice on either side … fire walls are disabled … and as in rtp.conf rtpstart=10001 and rtpend=20000… i have port forwarded that range in my router settings… Please HELP guys!!

below are my configuration files.

SIP.CONF

[general]
context=default
allowguest=no
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no
externaddr=x.x.x.x:5060
localnet=x.x.x.x.0/255.255.0.0
register=>abc:password@domainname.com

sipphone
type=friend
context=LocalSets
host=dynamic
nat=yes
dtmfmode=rfc2833
disallow=all
allow=alaw
canreinvite=no
allow=ulaw
allow=alaw
qualify=yes

[sip.voipdiscount.com]
type=peer
context=LocalSets
host=domainname.com
username=abc
secret=password
dtmfmode=rfc2833
insecure=port,invite
canreinvite=no
disallow=all
nat=yes
allow=ulaw
allow=alaw

paras
secret=password123

EXTENSIONS.CONF

[LocalSets]
exten=>_X.,1,Dial(SIP/${EXTEN}@domainname.com)

RTP.CONF

[general]
rtpstart=10001
rtpend=20000


#2

Maybe the problem is in the provider you are using for Outbound calls.
Try to contact them and then you will see if they can fix or give you some advices!
I will be close this forum… Feel free to write the post.


#3

Try to change Your Dial-Command to something like

and give it a try. (Use any option to Dial which will force Asterisk to stay in the media path)
Check a outbound call by looking at the Asterisk-CLI with at least verbosity 3 and have a look for a line like

“Locally bridging …” or “Remote bridging …”

just after call is setted up (connected) for both parties.
In a NAT-environment the best thing You could do is to force Asterisk to stay in the media path thus the packets are running from Your client via the Asterisk-server to the provider and vice versa.
You may also check the correct function by issuing a

and have a look wheter packets are visible and from/for which destination they are.


#4

directmedia=no (canreinvite=no in older versions) is a more direct way of staying in the media path.


#5

That’s basically correct, however we’ve noticed at customer installations, that setting directmedia=no (or canreinvite=no in older versions) combined with nat=yes still caused audio problems (even with nothing else than correct configured routers between the endpoints and asterisk), but an explicit option within the Dial-Command forcing asterisk to stay in the media path independet of the before mentioned settings did the trick and audio worked.

This behaviour is indeed not the expected once, however it helped very often …