Robert La Ferla
2006-Jul-02 12:42 UTC
[Asterisk-Users] how to ask for number to dial and then dial it?
I want to create an extension say "8000" that prompts the user to enter a number and then dial that entered number according to a set of rules. The rules for dialing out are in different context (dial- out-rules). [mymenu] exten => 8000,1,Answer() ???? [dial-out-rules] ; toll-free numbers out pots line exten => _1800XXXXXXX,1,Dial(${ANALOG_POTS}/${EXTEN}) exten => _1800XXXXXXX,n,Hangup() ; long-distance out voip line exten => _NXXXXXXXXX,1,Dial(SIP/${EXTEN}@myprovider.com,30) exten => _NXXXXXXXXX,n,Hangup() etc... How do I do it?
Cory Forsyth
2006-Jul-02 12:48 UTC
[Asterisk-Users] how to ask for number to dial and then dial it?
You could do this: [mymenu] exten => 8000,1,Answer() exten => 8000,n,GoTo(dial-out-rules,s,1) [dial-out-rules] ; you'll have to record a prompt, or find an appropriate one in the distribution exten => s,1,Playback(dial_number_after_the_beep) exten => s,n,Playback(beep) exten => s,n,WaitExten(5) ; toll-free numbers out pots line exten => _1800XXXXXXX,1,Dial(${ANALOG_POTS}/${EXTEN}) exten => _1800XXXXXXX,n,Hangup() ; long-distance out voip line exten => _NXXXXXXXXX,1,Dial(SIP/${EXTEN}@myprovider.com,30) exten => _NXXXXXXXXX,n,Hangup() On 7/2/06, Robert La Ferla <robertlaferla@comcast.net> wrote:> I want to create an extension say "8000" that prompts the user to > enter a number and then dial that entered number according to a set > of rules. The rules for dialing out are in different context (dial- > out-rules). > > > > etc... > > > How do I do it? > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- web: corybantic.us
El Flynn
2006-Jul-02 19:19 UTC
[Asterisk-Users] how to ask for number to dial and then dial it?
Robert La Ferla wrote:> I want to create an extension say "8000" that prompts the user to enter > a number and then dial that entered number according to a set of > rules. The rules for dialing out are in different context (dial- > out-rules). >[some-context] exten => 8000,1,Playback(please-enter-the-number) ; toll-free numbers out pots line exten => _1800XXXXXXX,1,Dial(${ANALOG_POTS}/${EXTEN}) exten => _1800XXXXXXX,n,Hangup() ; long-distance out voip line exten => _NXXXXXXXXX,1,Dial(SIP/${EXTEN}@myprovider.com,30) exten => _NXXXXXXXXX,n,Hangup() exten => i,1,Playback(that-number-is-invalid-ha-ha) exten => i,2,Congestion And point the related extensions to [some-context]. Flynn