[SOLVED]Outbound call with extension

Hi guys,

i need to create a dial plan for route outbound call.

i want to direct call to different gsm with an extension for example:

number digit

111111111 dial normally

*66111111111 dial on gsm box *66 is the extension i want to use i do something like this:

[out-224]
exten => *66,1,Dial(SIP/${EXTEN:3}@gsm4-1)
exten => *66,n,Dial(SIP/${EXTEN:3}@gsm4-2)
exten => *66,n,Dial(SIP/${EXTEN:3}@gsm4-3)
exten => *66,n,Dial(SIP/${EXTEN:3}@gsm4-4)
exten => *66,n,Dial(SIP/${EXTEN:3}@gsm4-5)
exten => *66,n,Dial(SIP/${EXTEN:3}@gsm4-6)

but don’t work i hope somebody could help me thanks

exten => *66XXXXXXXXX,1,Dial(SIP/GSMTRUNK/${EXTEN:3})

Define GSMTRUNK in your sip.conf.

thanks for reply:

my edit:
extension_custom.conf
[out-224]

exten => *66XXXXXXXXXX,1,Dial(SIP/gsm1-1/${EXTEN:3})

sip_custom.conf
[gsm1-1]
type=friend
username=gsm1-1
fromuser=gsm1-1
regexten=gsm1-1
secret=Torino2006
context=from-gsm
dtmfmode=inband
call-limit=1
host=dynamic
nat=no
canreinvite=no
insecure=very
qualify=yes
;disallow=all
;allow=alaw
;allow=ulaw

but not work phone say NOT FOUND

You need an _ for patterns.

like this?

[out-224]

exten => _*66XXXXXXXXXX,1,Dial(SIP/gsm1-1/${EXTEN:3})

Yes, although you could have just tried it.

tried…but still not work :frowning:

Post your CLI Output

[2017-05-17 17:25:02] NOTICE[5211][C-00009415]: chan_sip.c:25649 handle_request_invite: Call from ‘282’ (192.168.5.187:5060) to extension ‘*66388XXXXXXX’ rejected because extension not found in context ‘from-internal1’.

Please supply the contents of your from_internal context, or, if using FreePBX, tell us that as it can completely disrupt the interpretation of dialplans

Your device looks inside from-internal context not in out-224, so according on that you are using a FreePBX based sterisk server.

You need to add those extensions in the extensions_custom.conf file under the context from-internal-custom.

If you are not using FreePBX, you will also need to explicitly include extensions_custom.conf, as the only file that Asterisk knows about is the one in asterisk.conf, which is normally extensions.conf.

extension_custom.txt (7.9 KB)

attached

Those context doesn’t include the rule *66 or for that matter the modification of the way of dialing. So its kind difficult to provide help with random data ¯_(ツ)_/¯

1 Like

there aren’t random data…this is the configuration of the context by the way i added the string you post on the context but still not work…

i search the solution in other way

thanks a lot for the…support