[Asterisk-Users] long distance ask for pin

Damon Estep damon at suburbanbroadband.net
Fri Jun 9 07:25:08 MST 2006


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}|lev
el_)

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/${EXTEN}@subscriber)

 

 

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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Pietro U
Sent: Friday, June 09, 2006 7:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] long distance ask for pin

 

On 6/9/06, Doug Lytle <support at drdos.info> wrote:

	Pietro U wrote:
	> hi all i have my asterisk work perfectly thanks to you now i
need to
	> apply some improvements like PIN :(
	>
	> i need to add somenthing in here or in other section in the
conf?
	>
	
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Authenticate



yes but this is for extensions numbers, not for longdistance calls,
because the same user can call in my city but i need to asterisk ask a
pin when this people dial a longdistance 

 

	 

	Doug
	
	
	--
	
	Ben Franklin quote:
	
	"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety." 
	
	
	_______________________________________________
	--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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060609/9b49b1bb/attachment.htm


More information about the asterisk-users mailing list