Hello folks, I would appreciate if somebody can help me with some basic dial
plan issues I have. Please be addvised that I am a newbie to asterisk..

I have these voxbone DID's, The way I m using these DID's now that I forward
it to an extension (e.g: [EMAIL PROTECTED]) where 192.168.1.1 is my asterisk
box, then I have a dial plan for each extension which dials to a pst number
through a trunk I am using.

E.g: exten 
Exten => 300,1,Answer()
exten => 300,2,Wait(2)
exten => 300,3,NoOp(${CALLERID})
exten => 300,4,Dial(SIP/[EMAIL PROTECTED])
exten => 300,5,Hangup()

What I really want is that I want to map the actual PSTN number in the sip
URI for each DID (e,g: [EMAIL PROTECTED]). Then I want to write a
dialplan in my asterisk box which should terminate all these calls through
this trunk 202.202.202.202

I was thinking to do this and wanted you guys to validate it:

In my extension.conf

[globals]
;define trunck as global variable
Trunka=192.168.1.1
prefix=12345

[Voxbone context]

Any call which starts with 1416,1=> Answer()
                                   1416,2=> Dial(${TrunkA})

I believe this will work but I have 2 questions:

1. How am I suppose to tell the asterisk that all calls received form this
context should be terminated by this truck. Is my dialplan is correct? Can
somebody write me the right syntax?

2.The trunk which I am using requires me to use prefix before dialing any
number.. E.g.: [EMAIL PROTECTED], So how am I suppose to set
the prefix in a variable so I don't need to hard code it in all the uri's?

Thanks and looking forward for your response

Thanks

Syed


Reply via email to