|
Here is an example of a dialplan that looks up a post dial code in a mysql database and updates the accountcode accordingly.
exten => _1XXXXXXXXXX,1,Read(postcode|beep|3||1|10) exten => _1XXXXXXXXXX,2,set(level_auth=0) exten => _1XXXXXXXXXX,3,Realtime(postcodes|postcode|${ACCOUNTCODE}${postcode}|level_) exten => _1XXXXXXXXXX,4,GotoIf($[${level_auth} > 0]?7) exten => _1XXXXXXXXXX,5,Congestion(5) exten => _1XXXXXXXXXX,6,Hangup() exten => _1XXXXXXXXXX,7,playback(beep) exten => _1XXXXXXXXXX,8,Set(CDR(accountcode)=${ACCOUNTCODE}${postcode}) exten => _1XXXXXXXXXX,9,Dial(LOCAL/[EMAIL PROTECTED])
The values in the db for the field auth are 1 and 2, 1 allows this dialplan to run (US national calls) and 2 is used in similar dialpna to allow international calls (_011.)
If you are not enforcing strict accountcodes, so the user can enter any code they want, you do not need the database.
The authenticate application command was too cumbersome for our use, it shares prompts with another application (which really should be changed).
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pietro U
On 6/9/06, Doug Lytle <[EMAIL PROTECTED]> wrote:
|
_______________________________________________ --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
