Dialing Rules per User PIN

Dear All,

All users are require to enter their PIN for outgoing call, I need to set the Dialing Rules per User PIN basis?

for example:

User with PIN 8899 can only do to local and mobile call
User with PIN 6780 can only do local call only

They should be able to use it on any SIP station with their own Dialing Rules.

Please help

Thanks & Regards

Winanjaya

This can be easily done using the PHPAGI class, but you can too do it using the the Asterisk dial plan only. Where exactly do you need help, post what have you done to achieve this task and we can give you a push to get your goal

Hello

Thanks,
What I have now is only have create their PIN, and I dont know to set the dial plan per user PIN basis.
Could you please help?

I am running Asterisk 1.8.x

Many thanks in advance.

Regards

Winanjaya

If you know how to use the PHPAGI class i can share some piece of code …

No tested and just thinking fast, this could be another way of the infinitive ways to to get this work
[mycontext]
;disa
exten=>*4,1,Authenticate(/etc/asterisk/premiun_pass.conf,a)
same=n,Disa(no-password,mobile)

exten=>*5,1,Authenticate(/etc/asterisk/local_pass.conf,a)
same=n,Disa(no-password,localphone)

Create 2 password files, one with the premium pins, for call to mobiles and local and the second one just with the pins for local calls.

User with pins for calls to mobiles dial *4 and Asterisk will ask for the pin if the pin it is correct will be get access to the mobile context.

User with pins for just dial local dial *5 and Asterisk will ask for the pin if the pin it is correct will get access to the local context.

Hi… Thanks a lot :smile: for the hints
I will try it… get back to you soon.

Regards

Winanjaya

Welcome, remember this is just an idea, you can improve it or modify it. Just let me know please if it work for you.

Hello,
could you please advise, where should I define the localphone?

same=n,Disa(no-password,localphone)

sorry, may be I am asking a basic question… (I am still learning)

Thanks a lot in advance

[localphone]
exten=>_x.,1,Dial(SIP/${EXTEN}@${MYTRUNK},25)
same=>n,Playtones(congestion)
same=>n,Congestion(5)
same=>n,Hangup()

Any other question here you can find the answer
http://ofps.oreilly.com/titles/9781449332426/