Internal calls not working

We run Asterisk 1.6 with PIAF 1.755, FreePBX 2.8, enumplus and custom contexts 2.8.0 rc1.1

I recently I noticed that internal calls from one extension to the other on the same system use outbound routes and trunks. Shouldn’t this bypass outbound routes and simply be routed internal without using any provider? In trixbox 2.6 calls from one extension to another were internal (free) calls. My extensions are 10-digits (local phone numbers) and there is a matching dial pattern in outbound routes but it should never even check the outbound routes if you dial from one extension to another.

FYI changing the priority of [ext-local] in custom contexts fixed my issue.

Before I reply to your comments I want to thank you and all others in this forum for their help. I appreciate the feedback even if you disagree with how we setup or use our system.

The only reason I mentioned “my customers” is to explain the application not to make the message sound more important. Every question in this forum is of equal importance to the user asking the question.

DCI has been in the service provider business for more than 15 years. That’s considerably longer than 90% of the telecom providers in Canada so we probably know what we are doing.

While our competitors used $300,000 switches we found a way to do the same (and more) with $15,000 switches. We did it again when we entered the cell phone market and we are now doing it in the voip market. That’s why we are still around and they are not.

You can not make a blanket statement that we do a disservice to our customers when you don’t know anything about our application and quality of service we provide.

In fact, our application works extremely well, we have no performance issues and the questions I ask in the forum simply help us to understand the system and architecture better so that we can implement new ideas and come up with alternative solutions to the issues we face from time to time.

Thanks again for all your help and don’t feel too bad about helping out :slight_smile:

I am also very hesitant to support so called “service providers” who think that FreePBX is a carrier softswitch. I bristle every time I read “my customer” as if to imply a greater importance to the problem.

The issue is you are using a PBX as a softswitch and you are doing yourself and your customers a major disservice.

It is ever more criminal now that Kamailio/Siremis and A2Billing form a compelling Open Source softwitch solution with SBC, Charging Gateway and Rating Engine functionality with a web interface! If you are in the business of providing VoIP you should be thinking it terms of those functional building blocks.

Flavios Goncalves wrote a terrific book on how to build an Open Source Softswitch Platform:

Lastly you should always be building loop around routes for your DID’s in case your users try and call each other. If you were performing this best practice then this issue would not exist. Simply create a loop around trunk and point all of your DID’s at that loop around in the inbound route.

I hope I don’t regret giving you the answer and it lulls you back to a sense of complacency. You need to look at your provider platform and start building a sustainable solution.

The only reason I have Asterisk still in the core is for IAX support to my feature servers that run Asterisk and FreePBX.

I don’t know the answer to your question, however using the ‘dialplan show [email protected]’ will give you a clue as to what is wrong. Substitute the xx’s for your 10 digit dialed number.

This command is useful for troubleshooting any dial plan anomalies.

Thanks. That helps a bit.
So extension 1234 (extension changed to protect my customer privacy)
which is always dialed local, gives

[ Included context ‘ext-local’ created by ‘pbx_config’ ]
‘1500’ => hint: SIP/1500&Custom:DND1500 [pbx_config]
1. Set(__RINGTIMER=20) [pbx_config]
2. Macro(exten-vm,1500,1500) [pbx_config]
3. Goto(vmret,1) [pbx_config]

[ Included context ‘bad-number’ created by ‘pbx_config’ ]
’_X.’ => 1. ResetCDR() [pbx_config]
2. NoCDR() [pbx_config]
3. Progress() [pbx_config]
4. Wait(1) [pbx_config]
5. Progress() [pbx_config]
6. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer) [pbx_config]
7. Wait(1) [pbx_config]
8. Congestion(20) [pbx_config]
9. Hangup() [pbx_config]

-= 2 extensions (13 priorities) in 2 contexts. =-

but extension 5141234567 gives the following (I have custom contexts installed)

[ Included context ‘ext-local’ created by ‘pbx_config’ ]
‘5141234567’ => hint: SIP/5141234567&Custom:DND5141234567 [pbx_config]
1. Macro(exten-vm,5141234567,5141234567) [pbx_config]
2. Goto(vmret,1) [pbx_config]

[ Included context ‘outrt-7’ created by ‘pbx_config’ ]
’_514XXXXXXX’ => 1. Macro(user-callerid,SKIPTTL,) [pbx_config]
2. Noop(Calling Out Route: Montreal) [pbx_config]
3. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
4. Set(_NODEST=) [pbx_config]
5. Macro(record-enable,${AMPUSER},OUT,) [pbx_config]
6. Macro(dialout-trunk,7,${EXTEN},) [pbx_config]
7. Macro(dialout-enum,6,${EXTEN},) [pbx_config]
8. Macro(dialout-trunk,2,${EXTEN},) [pbx_config]
9. Macro(dialout-trunk,11,${EXTEN},) [pbx_config]
10. Macro(dialout-trunk,4,${EXTEN},) [pbx_config]
11. Macro(dialout-trunk,10,${EXTEN},) [pbx_config]
12. Macro(dialout-trunk,8,${EXTEN},) [pbx_config]
13. Macro(outisbusy,) [pbx_config]

[ Included context ‘outrt-19’ created by ‘pbx_config’ ]
’_514NXXXXXX’ => 1. Macro(user-callerid,SKIPTTL,) [pbx_config]
2. Noop(Calling Out Route: Rest_of_Canada) [pbx_config]
3. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
4. Set(_NODEST=) [pbx_config]
5. Macro(record-enable,${AMPUSER},OUT,) [pbx_config]
6. Macro(dialout-enum,6,${EXTEN},) [pbx_config]
7. Macro(dialout-trunk,11,${EXTEN},) [pbx_config]
8. Macro(dialout-trunk,4,${EXTEN},) [pbx_config]
9. Macro(dialout-trunk,5,${EXTEN},) [pbx_config]
10. Macro(dialout-trunk,13,${EXTEN},) [pbx_config]
11. Macro(outisbusy,) [pbx_config]

[ Included context ‘bad-number’ created by ‘pbx_config’ ]
’_X.’ => 1. ResetCDR() [pbx_config]
2. NoCDR() [pbx_config]
3. Progress() [pbx_config]
4. Wait(1) [pbx_config]
5. Progress() [pbx_config]
6. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer) [pbx_config]
7. Wait(1) [pbx_config]
8. Congestion(20) [pbx_config]
9. Hangup() [pbx_config]

-= 4 extensions (36 priorities) in 4 contexts. =-

What you’re seeing is the expected behavior when a dialed number matches a pattern in an outboud route. If they changed it for you, then users who depend on that behavior would complain. Seriously, there’s no reason your extensions need to be a full ten digits long, because if your inbound routes are set up properly with proper DID matching then incoming calls should go to the proper extensions.

Since you apparently don’t want to listen to the people who are telling you that you’re doing it wrong, I can only offer one other possible suggestion and then I’m done. If you create a CUSTOM trunk, and in the Dial string field put Local/[email protected], and then create an outbound route with all your local numbers and make the destination of the outbound route that custom trunk, and make that outbound route higher in priority than your regular outbound routes, it should pick off those calls and then treat them as if they were coming in from outside your system, which means they would not be allowed to use an outside route. I’ve used that technique to stop people who dial one of our DID’s from going off the system and coming back in, so it would probably work in this situation. In the outbound route you can specify dial patterns in the form 1|1234567890 so you catch calls dialed with or without the leading 1.

If that’s not an adequate solution for you then I don’t know what to tell you, but I sure would not expect the FreePBX developers to support something that’s bad practice to begin with.

The phones are registered in freepbx so that’s not it. I can’t give 4 digit extensions since my application demands 10 digits and i don’t want to have to create a custom destinations for every extension. I know work arounds for this issue but the point is there should not be any need for work arounds. FreePbx is supposed to recognize internal extensions by default. No? It can’t be simply a function of the length of the extension.

You have provided very little details about your setup.
We are not doctors nor magicians, we can only give answers based on the question.

Have you looked at the log files to see the trace of the call?
Set verbosity of Asterisk to 5, dial an internal extension and then look at the log file.

I will look at the log. Thanks.
I was just hoping that someone knows how FreePBX recognizes internal extensions and differentiates between internal and external numbers. That would really help.

I have seen this behavior when the phone is not registered, that is you have setup the phone but you have not set it up in FreePBX.

Obviously it doesn’t work the way you think it should, which is why giving your extensions 10-digit numbers is a bad idea. Your extensions should be for example the last four digits of the DID number, then you would not have this problem. My other suggestion was to try putting the 10 digit number in a misc application, make the destination the extension, and see if that will catch the call before it hits the outbound routes, without putting the system into an endless loop (watch the CLI!)

anything?