Asterisk – Outgoing calls rejected because extension not found

I had been having problems making external calls from my asterisk box. When I initially set it up, I used the asterisk-gui to setup a service provider for outgoing calls. This automatically appended the following context to extensions.conf

plancomment = Default DialPlan
include = default
include = parkedcalls
exten = _0XXXXX!,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
comment = _0XXXXX!,1,test,standard

However, since the default context for users is default, and the [default] context did not include this custom context, the calls weren’t being routed. This was giving the following error:

Call from '6000' to extension '08448160000' rejected because extension not found.

The simple way to fix it was to include the custom [numberplan-custom-1] context within the default context:

; By default we include the demo.  In a production system, you 
; probably don't want to have the demo there.
include => demo
include => numberplan-custom-1
exten => 1571,1,VoiceMailMain

8 thoughts on “Asterisk – Outgoing calls rejected because extension not found”

  1. This worked for me, Thanks for posting it. It still bugs me that It is not using the context I told it too though..

  2. this did not work for me. I am setting this up in Nigeria. Are there any conf to modify for my country?

  3. Many thanks, after a few hours searching your article was the one which fixed my vanilla installation of asterisk (had the extension defined under a macro, and this macro wasn’t defined under the default section).
    cheers Adrian

Leave a Reply

Your email address will not be published. Required fields are marked *