Thomas,

You'll go partially cross eyed if you try to use the sample extensions.conf
provided with Asterisk.  It's "too" modular with regards to outbound calls
in my opinion.  Here's some dumbed-down necessary bits from my
extensions.conf with some explanation on each.  Please note I'm using a PRI
(which allows me to set Caller ID's) and I'm not requiring a leading "9" to
make a call.  Also, you should read Chapter 5 of "Asterisk* The Future of
Telephony".  Google for it, it's a free download.




First, let's make a context that allows 7-digit, 10 digit, 1+10 digit,
311/411/611/911 calls, and 011+ calls out.  Yes, all in one section.

[out-pstn]
exten = _NXXXXXX,1,Macro(trunkdial,${GLOBAL(TRUNK)}/${EXTEN})
exten = _NXXNXXXXXX,1,Macro(trunkdial,${GLOBAL(TRUNK)}/${EXTEN})
exten = _[3469]11,1,Macro(trunkdial,${GLOBAL(TRUNK)}/${EXTEN})
exten = _1NXXNXXXXXX,1,Macro(trunkdial,${GLOBAL(TRUNK)}/${EXTEN})
exten = _011.,1,Macro(trunkdial,${GLOBAL(TRUNK)}/${EXTEN})


Here's the trunkdial macro used above.  I modified it to re-write my caller
id when the extension making the call is in the range of my DID block.  If
you don't need this functionality, find the original [macro-trunkdial]
section in the extensions.conf sample.

[macro-trunkdial]
;
; Standard trunk dial macro (hangs up on a dialstatus that should 
; terminate call)
;   ${ARG1} - What to dial
;
exten = s,1,GotoIf($[$[${CALLERID(num)} >= 2000] & $[${CALLERID(num)} <=
2049]]?s-SETDID|1:s-SETDATEX|1)
exten = s-SETDATEX,1,Set(CALLERID(num)=9058222300)
exten = s-SETDATEX,n,Goto(s-MAKETHECALL|1)

exten = s-SETDID,1,Set(CALLERID(num)=905491${CALLERID(num)})
exten = s-SETDID,n,Goto(s-MAKETHECALL|1)

exten = s-MAKETHECALL,1,Dial(${ARG1})
exten = s-MAKETHECALL,n,Goto(s-${DIALSTATUS}|1)
exten = s-NOANSWER,1,Hangup
exten = s-BUSY,1,Hangup
exten = _s-.,1,NoOp


Include the [out-pstn] context in the context of your extensions.  Mine is
called [default]

[default]
include = out-pstn


Lastly (but first in the file), configure your trunk in a global variable.
The "1" is the group = 1 declaration inside your zapata.conf.  If group =
<something-else> inside zapata.conf then change the "1" to
"<something-else>".

[globals]
TRUNK = Zap/1  ; Trunk interface  




Marc Carrafiello
Datex
 




> -----Original Message-----
> From: Thomas Keats [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, June 03, 2007 4:23 AM
> To: [email protected]
> Subject: [on-asterisk] RE: The Calling/Dialing Plan
> 
> I've been having problems understanding the calling plan.  I 
> am able to 
> get the asterisk box to accept calls (and in the middle of 
> creating the 
> IVR directories now)...
> 
> However, For some reason I can not get it to dial an outside line.
> 
> Can someone direct me to a very simple 'dial anything' plan 
> that I can 
> build off.?  I work straight to pstn and have long distance 
> blocked at 
> the provider so long distance is not an issue.
> 
> Thomas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to