[Asterisk-Users] Wildcards and variable number of digits

Eric Jacksch jacksch at tenebris.ca
Sun Sep 5 05:48:56 MST 2004


Thanks Marconi,

That's pretty much what I'm doing, although I'm using IAX.  I've been over
the file several times and can't spot what I'm doing wrong...no use of the
"." seems to work properly.  My guess is that I've made a mistake somewhere
else in the file.  Nothing without a fixed number of digits works.  Any
ideas?

[globals]
P1=Phone/phone0
P2=Phone/phone1
EXTPHONE=6138600964
EXTNAME="Eric Jacksch"
VPC_ID=xxxxxxxxxxxxx
VPC_PW=xxxxxxxxxxxxx



; Free world dialup info

FWDNUMBER=483835

FWDCIDNAME="Eric Jacksch"

FWDPASSWORD=xxxxxxxxxxxx

FWDRINGS=${P1}

FWDVMBOX=2201



; extension with voicemail

[macro-extvm]

exten => s,1,Dial,${ARG2}|16

exten => s,2,Voicemail,u${ARG1}

exten => s,102,Voicemail,b${ARG1}

exten => s,999,Hangup



; extension with no voicemail

[macro-ext]

exten => s,1,Dial,${ARG2}|30

exten => s,2,Hangup



[extensions]

exten => 2201,1,macro(extvm,2201,${P1})

exten => 2202,1,macro(extvm,2202,${P2})



; Special extensions

exten => 2999,1,VoicemailMain



[incoming]

include => extensions


exten => s,1,Wait(1)

exten => s,2,Answer()

exten => s,3,Background(hello)



[internal]

include => extensions

include => tovpc

include => tofwd



; ---------------------------------------------------------

; This context is used to send all outgoing calls to the

; VoicePulse Connect! service for connection to the PSTN.

;

; Asterisk will attempt to dial out through gwiaxt01 first.

; If there is a problem, it will attempt to dial out

; through gwiaxt02.

;

;---------------------------------------------------------

[macro-dialvpc]

exten => s,1,SetCallerID(${EXTNAME} <${EXTPHONE}>)

exten => 
s,2,Dial(IAX2/${VPC_ID}:${VPC_PW}@gwiaxt01.voicepulse.com/${ARG1},${ARG2},Tr
)
exten => 
s,102,Dial(IAX2/${VPC_ID}:${VPC_PW}@gwiaxt02.voicepulse.com/${ARG1},${ARG2},
Tr)

exten => s,999,Hangup




; Prefix 8 to dial out via voicepulse connect

[tovpc]
exten => _81XXXXXXXXXX,1,Macro(dialvpc,${EXTEN:1},70)

[macro-dialwfd]

exten => s,1,SetCallerID(${FWDCIDNAME})

exten => 
s,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${ARG1},${ARG2},r)
exten => s,3,Hangup



; Prefix 7 to dial out to Free World Dial

[tofwd]

; when I do this, it gives me a ring (and then busy) as soon as I

; dial the second digit

exten => _7.,1,Macro(dialwfd,${EXTEN:1},60)


; when I do this, I can successfully call any three digit FWD number,

; proving that everything else is configured right

exten => _6XXX,1,Macro(dialwfd,${EXTEN:1},60)



[fromfwd]

exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)

exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}

exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}



[fromvpc]

exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)

exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}

exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}



[default]

include => extensions

------ End of Forwarded Message
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2802 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040905/5a4d3c70/smime.bin


More information about the asterisk-users mailing list