Inbound calls being rejected by FreePBX

I am quite new to FreePBX. I am using Asterisk (Ver. 11.13.1). My server registers without a problem with the SIP provider, and I can make outbound calls with the trunk config I have. I cannot receive calls though.

When I configure the Grandstream GXP1405 to connect to the provider directly, I can make and receive calls, so it doesn´t appear to be a NAT or Firewall issue. Using Zoiper, I can also connect, make and receive calls without a problem.

The provider uses g729 - I have a license installed on my server that I bought from Digium (and on Zoiper, purchased from Apple Store).

The pcap logs from the provider end show FreePBX dropping the call when it comes in (a BYE message) - the caller gets a BUSY message/tone.

There are a variety of logs in FreePBX, but am unsure what to post to help with troubleshooting. Can anyone suggest what I can do to work out and resolve the problem please?

The very first place to start is to talk to the provider. They will have FreePBX setup instructions.

Secondly, I’m not much of a fan of G729. Unless you’re behind a dialup modem, it’s often not worth the heartache.

Thanks for the fast reply Rob - the provider has shown that they feel it´s my setup that is at fault, as the service works on Zoiper and the Grandstream when connected directly. They are not familiar with FreePBX (I´m living in Brazil, and the market is not as developed here it would seem) but have some basic guidelines for setting up the Trunk, inbound and outbound details.

As for g729 - as above…much of Brazil´s IP connectivity feels like it IS on a dialup modem!

What information can I share from the logs or setup that might shed some light on what the problem is?

There are some generic tips here that may help - https://sysadminman.net/blog/2012/freepbx-inbound-number-not-working-help-4435 and here - https://sysadminman.net/blog/2013/inbound-number-ddidid-with-freepbx-2-10-5251

If you run the tcpdump you’ll probably want interface eth0 (-i eth0)

It’s the Asterisk logs you’ll want to check to see what’s going on.

You could -

asterisk -rv
core set verbose 20 (and probably core set verbose 0 after)

and maybe

sip set debug on ( to see the SIP packets. Switch it off after).

Then try a test call.

Some common causes are -

You haven’t set the correct IP in the trunk to allow calls from that IP
You’ve not set the context on the trunk to "from-trunk"
You haven’t allowed the codecs on the trunk (try allow=all)

But really just check the logs to see what’s going on with Asterisk when the call comes in.

You need to post logs, what is the message when you call the number?

As of right now with no proof, I can only guess you have no inbound routes set up. With no inbound routes, the calls do not know where to go, so termination is imminent.

Click here for some info on inbound routes

If you need more help on inbound routes, I will give you a decent example.

Many thanks deanot26508.

I am actually going to put the project on hold until I have more time, as I cannot even pinpoint a specific failure right now - it is totally random, and therefore near-impossible to identify what the problem is, let alone how to start asking for help for it!

Thank you for the offer of support anyway, and hope to come back to this once I have some more time.

Alex,

Are you in Brazil? Anything I can help you! My skype is jersonjunior

Hi Jerson - yes, I am in Sao Paulo. Can you recommend a good DDI provider in Brazil who has good support for FreePBX? I am using DirectCall from Curitiba at the moment, and they seem ok, but I am not totally sure the problem isn’t on their side. If you recommend any others that can give me a DDI for inbound/outbound calls, that would be a great help!

Try to use SIPSTATION of FreePBX!

Thanks - I did have a think about them, as I guess they have the best integration, but they only seem to do local numbers in the USA and Canada, so all my local calls would be international rates. I looked at Vono too, from GVT but don’t know what other options there are in Brazil.

Either you haven’t set-up your inbound route correctly, or you’ve got something in your PEER details that’s wrong. You might wish to consult these instructions to setup your trunk:

http://wiki.freepbx.org/display/F2/Trunk+Sample+Configurations

You may also wish to set-up a catchall Inbound Route. That will catch and route inbound calls that don’t match anything else. If you route it to a special message, you’ll be able to determine if your inbound route is configured incorrectly. See this wiki page for an example catchall (called Deadrestricted in this example):

http://wiki.freepbx.org/display/F2/Inbound+Routes+Examples