Custom User Dialplan

Hello,

I’m fairly new with Asterisk. I am using Asterisk NOW as a SIP gateway to an Avaya IP Office via H323. Everything works great. I have SIP phones on the asterisk and they draw dial tone from the Avaya, and can pass calls back and forth.

I would like to create a custom dial plan for one user, x0601, so that when this user dials outbound calls, Asterisk will prepend a trunk access code to the dial string, in order to allow this user to make calls over a privliaged trunk.

My current dial plan is as follows:

[default]
exten=8500,1,VoicemailMain
exten=8500,n,Hangup
include=voicemenu-custom-1
exten=_1XXXXXXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_2XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_3XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_4XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_5XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_6XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_7XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_8XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_9XXXXXX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_911,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_2500,1,dial(h323/0717@192.168.2.230)
exten=_02XX,1,dial(h323/${EXTEN}@192.168.2.230)
exten=_07XX,1,dial(h323/${EXTEN}@192.168.2.230)

I would like it so that when extension 0601 dials 1+area code + number for the system to prepend access code 0044 to the dial string and send the call out over the same trunk as shown above.

Any assistance would be greatly appreciated!

Thanks,

Avrohom
[/b]

Use contexts.

Thanks for your reply. I don’t know how to use contexts. Can you please send me a code snippet that I could use?

Thanks!

http://svn.digium.com/view/asterisk/branches/1.4/configs/extensions.conf.sample?revision=130042&view=markup

http://svn.digium.com/view/asterisk/branches/1.4/configs/sip.conf.sample?revision=142865&view=markup