Call from '2701' to extension '+18008765432' rejected because extension not found

I am trying to set up an outbound route for 800 calls.

I found some tips at: http://pbxinaflash.com/forum/showthread.php?t=2750&page=2

,Set up a custom trunk to sip.tollfreegateway.com, then an outbound route to the trunk. So my custom trunk is, well where is the custom trunk info in extensions_additional.conf? I did find the following:

OUT_4 = AMP:sip/[email protected]
OUTPREFIX_4 =
OUTMAXCHANS_4 = 4
OUTCID_4 =
OUTKEEPCID_4 = off
OUTFAIL_4 =
OUTDISABLE_4 = off
PREFIX_TRUNK_4 = 4

and in localprefixes.conf

[trunk-4]
rule1=800NXXXXXX
rule2=866NXXXXXX
rule3=877NXXXXXX
rule4=888NXXXXXX

The out bound info is:

include => outrt-001-800-custom
exten => _1800NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _1800NXXXXXX,n,Set(_NODEST=)
exten => _1800NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _1800NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN:1},)
exten => _1800NXXXXXX,n,Macro(outisbusy,)
exten => _1866NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _1866NXXXXXX,n,Set(_NODEST=)
exten => _1866NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _1866NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN:1},)
exten => _1866NXXXXXX,n,Macro(outisbusy,)
exten => _1877NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _1877NXXXXXX,n,Set(_NODEST=)
exten => _1877NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _1877NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN:1},)
exten => _1877NXXXXXX,n,Macro(outisbusy,)
exten => _1888NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _1888NXXXXXX,n,Set(_NODEST=)
exten => _1888NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _1888NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN:1},)
exten => _1888NXXXXXX,n,Macro(outisbusy,)
exten => _800NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _800NXXXXXX,n,Set(_NODEST=)
exten => _800NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _800NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},)
exten => _800NXXXXXX,n,Macro(outisbusy,)
exten => _866NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _866NXXXXXX,n,Set(_NODEST=)
exten => _866NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _866NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},)
exten => _866NXXXXXX,n,Macro(outisbusy,)
exten => _877NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _877NXXXXXX,n,Set(_NODEST=)
exten => _877NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _877NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},)
exten => _877NXXXXXX,n,Macro(outisbusy,)
exten => _888NXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _888NXXXXXX,n,Set(_NODEST=)
exten => _888NXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _888NXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},)
exten => _888NXXXXXX,n,Macro(outisbusy,)

; end of [outrt-001-800]

When I try dialing a an 800# from a SIP extension, all I get is a busy signal and the following in the log:

[Apr 28 12:34:36] NOTICE[2971] chan_sip.c: Call from ‘2701’ to extension ‘+18004964518’ rejected because extension not found.

So why are the dial patterns not working? I have the 800 route first (route 0), and I included the dial patterns in the trunk as well (I added that after it not working).

strip the + off before sending it to the trunk.

What is adding the + ?

I don’t see it in my dial pattern.

Possibilities are:

The phone or device you are placing the call from - may be an error in the dial plan.

If you are using a “return last call” feature, the + may have been in the Caller ID of the original call.

See How to strip or replace the + character at the beginning of a called number

I have no idea. with only one line to go by. A full call trace attempt could help. But based on the wording of that error it has added it and that’s why.

+18004964518 will not match the 1800NXXXXXXX pattern because of it.

The custom context worked.

I was beginning to suspect the phone, the ATA is a Grandstream HT386 and there is nothing in its setup to indicate it adding the +.

The phone is a GE 2 line phone, and I was getting the + whether I pressed redial or entered the number. Any 800 number at that too. With or without a ‘1’ at the beginning. So go figure, but it is ‘fixed’ now…

But now do I ‘register’ this custom context in ‘Custom Destinations’ or ‘Custom Extensions’? I would think not…

No. You only use the “Custom …” modules to register an extension number associated with a context, or to make it available as a destination from other modules. Since this particular custom context doesn’t have an extension number associated with it, and isn’t something you’d select in a destination dropdown, there’s no need to register it.