Our asterisk has a trunk which has been set up with a VoIP Provider (voip.ms). From internal, when we placed a called, it’s working. It’s going “through the trunk” and the call is established. But when someone call us by using the external phone number provided by this provider, the call cannot be established. It’s trying to call but then, automatically hung up.
I’m using Free PBX to control and manage Asterisk. In the “inbound Routes”, a route has been set up with the DID number and a ring group for the destination. If I specify an extension instead of using a ring group, it won’t immediately hang up but I’ll get a busy tone.
Asterisk version: 184.108.40.206
Do I have to add something in the “incoming settings” in the properties of the trunk ? Or in a asterisk properties file?
In my outgoing settings, this is what i have:
Peer details :
;nat=yes ;uncomment if behind nat
In my incoming settings:
User context: from-trunk
Thank you in advance for you help or your thoughts.
Please provide verbose console log output.
Have you communicated with your VOIP provider?
Usually they are great in helping with these issues as they can tell you if it is even hitting your box.
My guess is that you have some sort of network issue. Why? because you can connect out without any issue. This is because your firewall allows the communication as it was originated from internally. Coming back or the hand off from your VOIP trunk provider is another story. The ports must be forwarded appropriately.
When I have issues like this take the firewall/nat out of the equation. Don’t know your network but if you have a static IP address connect it directly to the asterisk box with not nat or router in between.
Couple other things to check. from ssh or the console directly(use putty for remote connections) type asterisk -rvvv make the call from out to in and see if you get any response. If nothing the call never is even making it to the asterisk box.
Also as to the firewall depending on whether you are using SIP or IAX for your trunk be sure to forward ports 5060 and 4569 to your asterisk box. I would also forward udp ports 10000 - 20000 for good measure to the box in case you want any offsite exten.
Take a look at sip_nat.conf also and make sure that looks correct.
The point is I’d bet you have some sort of network problem. I doubt it is related to your actual configuration.
It’s also common for people to get their contexts mixed up or not to define any extensions that match the incoming destination number at all.
Login to a shell on your asterisk box as root and attach to the console /usr/sbin/asterisk -rvvvvvvvvvvvvvvvvv. The v’s help you see whats going on. I just hold down the button and let the autorepeat deicde on how many. the r is for reconnect
Ring in to the asterisk box via the VoIP provider and see what happens.
One common problem is the standard g729 codec that comes stanardard only does passthough and not conversion so make sure your codec order is the same on both the handsets and the trunk (assuming you are using SIP handsets)
You’ll see that this is the case as your screen will go crazy with something about can’t match codec.
Also if you aren’t too stresed about bandwitdth, and your ITSP supports alaw/ulaw/g711, dump g729 and just use ulaw (for usa) or alaw for everyone else.
This is all based on you have your incoming context issues sorted.
And thanks a lot to have replied to my post and for your help. I really appreciated it.
It’s fixed now. In fact, the ports that you said, chazelton, was already opened on the firewall, we are using SIP. (5060, 10000-20000) . As suggested by Chris, it was indeed the g729 codec. As we’re having trouble with our g729 codec licences, I removed the g729 codec from “allow” and it’s working now. For g729 licences issues, I will contact the support.
Thank you (all of you) again for your help.
Nice to hear of another happy ending.