FreePBX can dial externally but can't receive incoming calls

Hi All

I need a little help here. I’ve setup freePBX with 3x Softphones and 2x Snom phones connected to it. Internal Calls work 100%.

I’m using Telfree as my SIP Provider.
I can make external calls via my SIP without any problem, but I can’t receive any incoming calls from the outside.

Here is my trunk configuration:

OUTGOING SETTINGS:
Trunk Name [Telfree49]

Peer Details:
disallow=all
allow=ulaw&alaw
context=DID_telfree
host=sip99.telfreesa.com
port=5060
secret=xxxxxxxxxx
username=877xxxxxx
callerid=877xxxxxx
fromuser=877xxxxxx
fromdomain=sip99.telfreesa.com
permit=196.46.138.29/29
insecure=very
type=peer

INCOMING SETTINGS:
User Context: 877xxxxxx

User Details:
disallow=all
allow=alaw&ulaw
context=from-trunk
host=sip99.telfreesa.com
port=5060
secret=xxxxxxxxx
username=877xxxxxx
callerid=877xxxxxx
fromuser=877xxxxxx
fromdomain=sip99.telfreesa.com
permit=196.46.138.29/29
insecure=very
type=friend

Register String:
877xxxxxx:[email protected]/877xxxxxx

Then under inbound routes I’ve got the following:

Description: 0877xxxxxx
DID Number: 877xxxxxx
Set Destination = Extention (With selected extention that will receive the
incoming call)

Can someone please have a look at this and guide me to what I’m doing wrong.

Thanks
Jeanne

You need to make sure what digits your provider is sending as the DID. It could be the full 10 digits, 7 digits, 4 digits, or something else. It might even be prepending a 1 before the number.

The DID Number must match exactly what the provider is sending. Do you have an Any/Any route set? This will match any incoming DID.

Bill

Hi Bill

I’ve change the DID number to the 10 digit (087754xxxx) number instead of the 9 digit (87754xxxx) that I had. I also change the User Context to the 10 digit number as I understand that the User Context and the DID number should be the same.

With these changes it still doesn’t work, I still get "the number you have dialed is incorrect.

How do I setup a Any/Any Route??

Thanks for you help so far!

did you actually look at the log file to see exactly what the carrier is sending you as DID?

did you actually look at the log file to see exactly what the carrier is sending you as DID?

Hi Mudslide567

Please can you direct me on howto check the log file? I’m not a Linux expert and was trying to find some log files, but couldn’t find it.

thanks

you can look at the log file using freePBX … under tools you should see a link to log file … place a call and then pull up the log file immediately after and you should see the tracks of the call

Hi Mudslide567

Here is the part of the logfile after I placed an inbound call from my cellphone.

[Sep 17 22:43:52] NOTICE[2938] chan_sip.c: Call from ‘877543849’ to extension ‘877543849’ rejected because extension not found.
[Sep 17 22:44:03] VERBOSE[9173] logger.c: == Parsing ‘/etc/asterisk/manager.conf’: [Sep 17 22:44:03] VERBOSE[9173] logger.c: Found
[Sep 17 22:44:03] VERBOSE[9173] logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: [Sep 17 22:44:03] VERBOSE[9173] logger.c: Found
[Sep 17 22:44:03] VERBOSE[9173] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [Sep 17 22:44:03] VERBOSE[9173] logger.c: Found
[Sep 17 22:44:03] WARNING[9173] config.c: Unknown directive ‘#permit=192.168.1.0/255.255.255.0’ at line 18 of /etc/asterisk/manager_custom.conf
[Sep 17 22:44:03] VERBOSE[9173] logger.c: == Manager ‘admin’ logged on from 127.0.0.1

Can you point me in a direction…??

the carrier is sending you 877543849 as the DID. The person who told you that it should be 10 digits was mistaken [probably assuming you were located in the US]. You should have an inbound route that is for 877543849 (with any CID) going to whatever destination you want. Should be straightforward. If there is still a problem, check and post the relevant log snippet again.

Hi Mudslide567

I get the same results… here is the log

[Sep 18 08:26:27] VERBOSE[10702] logger.c: == Manager ‘admin’ logged off from 127.0.0.1
[Sep 18 08:26:42] NOTICE[2938] chan_sip.c: Call from ‘877543849’ to extension ‘877543849’ rejected because extension not found.
[Sep 18 08:26:56] VERBOSE[10707] logger.c: == Parsing ‘/etc/asterisk/manager.conf’: [Sep 18 08:26:56] VERBOSE[10707] logger.c: Found
[Sep 18 08:26:56] VERBOSE[10707] logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: [Sep 18 08:26:56] VERBOSE[10707] logger.c: Found
[Sep 18 08:26:56] VERBOSE[10707] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [Sep 18 08:26:56] VERBOSE[10707] logger.c: Found
[Sep 18 08:26:56] WARNING[10707] config.c: Unknown directive ‘#permit=192.168.1.0/255.255.255.0’ at line 18 of /etc/asterisk/manager_custom.conf
[Sep 18 08:26:56] VERBOSE[10707] logger.c: == Manager ‘admin’ logged on from 127.0.0.1

I’m completely out of ideas

Why does it say “call from 877543849 to extention 877543849”???

Should the extention not be 1000 which will be my reception phone?

Regards

Hi guys

Anybody with some more help here… my incoming calls is still not coming trough and I’m on the brink of giving up on FreePBX.

I’m sure it must be some small setting or a Conf file that need to be edited - damn - I’ve spend days on this without any luck

please help :frowning:

Don’t enter anything in DID Number in Inbound routes. From the tooltip:

Leave this blank to match calls with any or no DID info.

By doing this all calls will enter the system. Make an inbound call to see if it is working.

If you need to look at the log files, in FreePBX, go to Tools and click on Asterisk Logfiles. If you don’t have Asterisk Logfile, click on Module Admin and download Asterisk Logfiles from there.

Hi Mikeal

I’ve removed the DID number and made a test call. I still get the message “the number you have dialed is incorrect”

here is the logfile… seems like there is something wrong with the extention??

[Sep 20 16:07:31] VERBOSE[13293] logger.c: == Manager ‘admin’ logged off from 127.0.0.1
[Sep 20 16:07:45] NOTICE[2947] chan_sip.c: Call from ‘877543849’ to extension ‘877543849’ rejected because extension not found.
[Sep 20 16:08:02] VERBOSE[13298] logger.c: == Parsing ‘/etc/asterisk/manager.conf’: [Sep 20 16:08:02] VERBOSE[13298] logger.c: Found
[Sep 20 16:08:02] VERBOSE[13298] logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: [Sep 20 16:08:02] VERBOSE[13298] logger.c: Found
[Sep 20 16:08:02] VERBOSE[13298] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [Sep 20 16:08:02] VERBOSE[13298] logger.c: Found
[Sep 20 16:08:02] WARNING[13298] config.c: Unknown directive ‘#permit=192.168.1.0/255.255.255.0’ at line 18 of /etc/asterisk/manager_custom.conf
[Sep 20 16:08:02] VERBOSE[13298] logger.c: == Manager ‘admin’ logged on from 127.0.0.1

What else is there to try?

regards
Jeanne

You are providing to little information.
What is your FreePBX version?
Is this a distribution of some sort? (AsteriskNOW, PBX in a Flash or trixbox)

From where did you get the settings for the trunk?

Hi Mikael

I’m using FreePBX 2.5.2.2

It shipped with Elastix 1.6

The trunk information I got is from other websites and via troubleshooting. So if you got any suggestions it will be much appreciated!

Regards