Eric Jacksch
2004-Sep-04 22:25 UTC
[Asterisk-Users] Wildcards and variable number of digits
Greetings, I'm having a miserable time getting Asterisk working with FWD. All the samples show something like... exten => _7., .... How do I get Asterisk to wait until the user is finished dialing instead of trying as soon as it gets the second digit? I can use _7XXX, and dial the FWD 3-digit test numbers fine, but I'd like to be able to dial others... Same problem for outside analog line...how do I convince Asterisk to send anything that starts with a "9" to it? If it makes a difference, I'm playing with some QuickNet cards to learn the system...then I'll likely buy some other cards with higher capacity. Thanks, Eric -------------- 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/5f02eaed/smime.bin
Marconi Rivello
2004-Sep-04 23:01 UTC
[Asterisk-Users] Wildcards and variable number of digits
See if it helps you:
exten => _0.,1,Dial(Zap/1/${EXTEN:1})
exten => _7.,1,Dial(SIP/${EXTEN:1}@fwd.pulver.com)
If you want to call FWD# 55555 then you dial: 755555. If you want to
call 911 then: 0911.
You must have registered to FWD in the sip.conf.
If there are other extensions starting with 7 or 0, you will have a
problem... unless you know exactly what you're doing. Try commenting
them out first. You should check the Asterisk handbook, as it explains
the extensions, wildcards, etc really well.
Hope I did help :)
Marconi.
On Sun, 05 Sep 2004 01:25:21 -0400, Eric Jacksch <jacksch@tenebris.ca>
wrote:> Greetings,
>
> I'm having a miserable time getting Asterisk working with FWD. All the
> samples show something like...
>
> exten => _7., ....
>
> How do I get Asterisk to wait until the user is finished dialing instead of
> trying as soon as it gets the second digit?
>
> I can use _7XXX, and dial the FWD 3-digit test numbers fine, but I'd
like to
> be able to dial others...
>
> Same problem for outside analog line...how do I convince Asterisk to send
> anything that starts with a "9" to it?
>
> If it makes a difference, I'm playing with some QuickNet cards to learn
the
> system...then I'll likely buy some other cards with higher capacity.
>
> Thanks,
> Eric
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>
Eric Jacksch
2004-Sep-05 05:48 UTC
[Asterisk-Users] Wildcards and variable number of digits
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
[tovpc]
exten => _81XXXXXXXXXX,1,Macro(dialvpc,${EXTEN:1},70)
Change the above to one X with a . after it. Right now, it will accept 10
digits, no more, no less. Putting the period in
makes that 81 plus at least 1 digit until we timeout looking for more
digits.
New line:
exten => _81X.,1,Macro(dialvpc,${EXTEN:1},70)
exten => _7.,1,Macro(dialwfd,${EXTEN:1},60)
Same here. In this line, you wait for the 7 and then continue one. You are
not requiring any more digits.
New line:
exten => _7X.,1,Macro(dialwfd,${EXTEN:1},60)
Try these.
Lyle
----- Original Message -----
From: "Eric Jacksch" <jacksch@tenebris.ca>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users@lists.digium.com>
Sent: Sunday, September 05, 2004 7:48 AM
Subject: Re: [Asterisk-Users] Wildcards and variable number of digits
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
The problem you are having is due to the way chan_phone was designed. The distributed driver does not buffer the entire phone number dialed and then send it on to the PBX, like a SIP phone would, but instead scans the dial plan after every digit is entered to look for a match. The solution is to only use fixed length extension patterns, but at the same time requires different dial plans for the Phone/phoneX devices. I you're only dialing PSTN numbers it's not so bad, but many VOIP providers have all kinds of numbering plans. On the other hand, fixed patterns are nice since you don't have to press any "call" or "dial" buttons to make the call. I have a new chan_phone driver which solves this issue by buffering the dial string until the user presses the pound (#) key to send the phone number to the pbx. The features can be toggled on/off any time by dialing *1# or *0# or in the config file with a mode "buffered" which is otherwise the same as "dialtone" Eric Jacksch wrote:>Greetings, > >I'm having a miserable time getting Asterisk working with FWD. All the >samples show something like... > > exten => _7., .... > >How do I get Asterisk to wait until the user is finished dialing instead of >trying as soon as it gets the second digit? > >I can use _7XXX, and dial the FWD 3-digit test numbers fine, but I'd like to >be able to dial others... > >Same problem for outside analog line...how do I convince Asterisk to send >anything that starts with a "9" to it? > >If it makes a difference, I'm playing with some QuickNet cards to learn the >system...then I'll likely buy some other cards with higher capacity. > >Thanks, >Eric > > >------------------------------------------------------------------------ > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Eric Jacksch
2004-Sep-05 14:16 UTC
[Asterisk-Users] Wildcards and variable number of digits
Here are the snippets...I changed things to "9" just in case...
No matter what I do, I get to dial 9 plus two more digits...
[internal]
;include => extensions
;include => tovpc
include => tofwd
; this should just dial myself
exten => _999XXX,1,Dial,${P1}
....
[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 9 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 => _9X.,1,Macro(dialwfd,${EXTEN:1},60)
-----Original Message-----
From: Brian West [mailto:brian@bkw.org]
Sent: Sun 2004-09-05 15:55
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Cc:
Subject: RE: [Asterisk-Users] Wildcards and variable number of digits
Actually it does the proper usage of the "." char in your dial plan
should
solve this problem. It's not the channel driver that's doing this its
asterisk. You need to sandbox a wildcard into its own context then include
it. Otherwise it wins NO MATER WHAT. This way an extension defined within
the current context wins over the included wildcard context.
Sbkw
> -----Original Message-----
> From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-
> bounces@lists.digium.com] On Behalf Of Eric Jacksch
> Sent: Sunday, September 05, 2004 2:50 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Wildcards and variable number of digits
>
> Not sure I understand..does that help my problem of not being able to
> enter
> sufficient digits, or is that a consideration once I get a driver that
> allows me to # terminate the dialing string?
>
>
> On 2004-09-05 15:00, "Brian West" <brian@bkw.org> wrote:
>
> > Just to clarify the usage of the . wildcard in your dialplan.
> >
> > Here is the proper usage of this feature which seems to not be
> documented
> > ANYWHERE very well.
> >
> > [default]
> > include => other
> > exten => _712XXX,1,NoOp,Blah
> >
> > [other]
> > exten => _7.,1,NoOp,somethingelse
> >
> >
> > The extensions in the current context win over an include.. only if
> > something doesn't specifically match in [default] but does as a
wildcard
> as
> > an include then it will work. Remember includes are your friend.
> >
> > bkw
> >
> >
> >> -----Original Message-----
> >> From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-
> >> bounces@lists.digium.com] On Behalf Of Karl Brose
> >> Sent: Sunday, September 05, 2004 1:50 PM
> >> To: Asterisk Users Mailing List - Non-Commercial Discussion
> >> Subject: Re: [Asterisk-Users] Wildcards and variable number of
digits
> >>
> >>
> >> The problem you are having is due to the way chan_phone was
designed.
> >> The distributed driver does not buffer the entire phone number
dialed
> >> and then send it on to the PBX,
> >> like a SIP phone would, but instead scans the dial plan after
every
> >> digit is entered to look for a match.
> >> The solution is to only use fixed length extension patterns, but
at the
> >> same time requires different dial plans
> >> for the Phone/phoneX devices. I you're only dialing PSTN
numbers it's
> >> not so bad, but many VOIP providers
> >> have all kinds of numbering plans. On the other hand, fixed
patterns
> are
> >> nice since you don't have to
> >> press any "call" or "dial" buttons to make the
call.
> >>
> >> I have a new chan_phone driver which solves this issue by
buffering the
> >> dial string until the user presses
> >> the pound (#) key to send the phone number to the pbx. The
features
> can
> >> be toggled on/off any time by dialing
> >> *1# or *0# or in the config file with a mode
"buffered" which is
> >> otherwise the same as "dialtone"
> >>
> >>
> >>
> >>
> >> Eric Jacksch wrote:
> >>
> >>> Greetings,
> >>>
> >>> I'm having a miserable time getting Asterisk working with
FWD. All
> the
> >>> samples show something like...
> >>>
> >>> exten => _7., ....
> >>>
> >>> How do I get Asterisk to wait until the user is finished
dialing
> instead
> >> of
> >>> trying as soon as it gets the second digit?
> >>>
> >>> I can use _7XXX, and dial the FWD 3-digit test numbers fine,
but I'd
> like
> >> to
> >>> be able to dial others...
> >>>
> >>> Same problem for outside analog line...how do I convince
Asterisk to
> send
> >>> anything that starts with a "9" to it?
> >>>
> >>> If it makes a difference, I'm playing with some QuickNet
cards to
> learn
> >> the
> >>> system...then I'll likely buy some other cards with higher
capacity.
> >>>
> >>> Thanks,
> >>> Eric
> >>>
> >>>
> >>>
----------------------------------------------------------------------
> --
> >>>
> >>> _______________________________________________
> >>> Asterisk-Users mailing list
> >>> Asterisk-Users@lists.digium.com
> >>> http://lists.digium.com/mailman/listinfo/asterisk-users
> >>> To UNSUBSCRIBE or update options visit:
> >>> http://lists.digium.com/mailman/listinfo/asterisk-users
> >>>
> >>>
> >> _______________________________________________
> >> Asterisk-Users mailing list
> >> Asterisk-Users@lists.digium.com
> >> http://lists.digium.com/mailman/listinfo/asterisk-users
> >> To UNSUBSCRIBE or update options visit:
> >> http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users@lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> Eric Jacksch, CISSP, CISM
> Tenebris Technologies Inc.
> http://www.tenebris.ca
> +1 613 860-0964
> jacksch@tenebris.ca
>
> Information security consulting, investigations, and forensics.
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users