0

As we were trying to setup our Asterisk server, we went on a huge problem: The inability to make call to or from external devices connected to the server. In fact, I can dial and answer the call on both side, but I can't hear anything.

I've browsed hours of content on the Internet, looking for tutorials on how to correctly setup the NAT with sip.conf, but without any effective results.

Here's our sip.conf

[general]
bindaddr=0.0.0.0
localnet=192.168.1.0/255.255.255.0
externhost=mydynhost.dyndns.org
externrefresh=10
nat=yes
register => username:****@montreal.voip.ms:5060
registertimeout=15
registerattempts=0

[voipms]
canreinvite=no
context=voipms
host=montreal.voip.ms
secret=****
type=peer
defaultuser=username
disallow=all
allow=ulaw
fromuser=username
trustrpid=yes
sendrpid=yes
insecure=invite
nat=yes

[1000]
type=friend
context=phones
host=dynamic
defaultuser=1000
secret=****

[1001]
type=friend
context=phones
host=dynamic
defaultuser=1001
secret=****

extensions.conf

[phones]
include => internal
include => voipms

[internal]
exten => _1XXX,1,Answer()
exten => _1XXX,n,Dial(SIP/${EXTEN})
exten => _1XXX,n,Hangup()

[voipms]
include => voipms-inbound
include => voipms-outbound

[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()

[voipms-inbound]
exten => somenumber,1,Answer()

In rtp.conf the following values are set:

  • rtpstart=10001
  • rtpend=20000

As you can see, we don't have a static IP address and we are using a dynamic DNS service to refresh it when it changes.

My question is simple, how can we make our current setup working with other devices not in our private network? Note that I only want to contact people using a 4 digit extension number. These extensions will allow "local" users to call themselves without using the VoIP.ms service. I'll test external calls after when the NAT will be working.

If you need more information, please just ask! Thanks! Dave

EDIT: Also, if it can help. I'm testing my calls with X-Lite (http://www.counterpath.com/x-lite-download.html) and my Android 4.2.2 device using the embedded SIP client available in the Phone.apk application.

  • I am not an telcom person. But... I don't see "allow" on your phones in sip.conf. Have you tried adding allow=ulaw on 1000 and 1001? – Edwin Apr 10 '13 at 7:21
  • Your hosts are on the inside, correct? You have a dynamic hostname on the outside, so that should mean you have a public IP and don't need NAT translation (as you're actually not behind NAT).. – NickW Apr 10 '13 at 8:36
  • @ Edwin: It seems like the "allow" keyword authorize the use of specific codecs. voip-info.org/wiki/view/Asterisk+config+sip.conf. @ NickW: Not all my clients are on the "inside". Our Asterisk server is setup in a private network ranged at 192.168.1.0/24. All our Internet activities are redirected by a router. Port forwarding were done. I've opened 5060 UDP and 10001-20000 UDP to the appropriate server hosting Asterisk. – David Apr 10 '13 at 8:43
  • I've had trouble with no audio over the outside trunk before, and specifying the codec has worked for me. It's worth a shot. – Edwin Apr 10 '13 at 12:00
  • @Edwin: I tried it once again, but without positive results. I've noted that codecs seems to work correctly when making calls behind my NAT. Without the disallow=all and allow=ulaw, internal calls are working flawlessly. – David Apr 10 '13 at 17:19
0

After asking directly to the community of forums.asterisk.org, the member david55 help me out to find my solution.

Click here to access it

-1

This works for me, http://community.freepbx.org/t/i-am-unable-to-hear-callers-voice-but-the-caller-able-to-hear-my-voice/11994/3 I set localnet and externaddr param in sip.conf and works perfecly

  • please, add more information beyond the link. – Crypt32 Dec 20 '15 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.