Passwording Outgoing PSTN call

Based on my configuration i will like to know if it was possible to put a password on outgoing calls to restrict outbound calls. If it was possible i will appreciate if someone could throw more light into this issue.

My present configuration looks like this:

[incoming]
exten => s,1,Answer()
exten => s,2,Playback(“access-greetings”)
exten => s,3,dial(SIP/100)

[outgoing]
include => intercome
exten => _XX…,1,Answer()
same => n,GotoIf($["${CALLERID(num)}" = “100”]?start:end")
same => n(start),dial(dahdi/g1/${EXTEN})
same => n,Goto(end)
same => n,Playback(invalid)
same => n(end),Hangup()

[intercome]
include => outgoing
exten => 100,1,dial(sip/100)
exten => 101,1,dial(sip/101)
exten => 102,1,dial(sip/102)
exten => 103,1,dial(sip/103)

hi,
it is possible to do that by entering pin numbers. you also can use elastix by set outgoing call with pin.

If possible can you please given me an hint or possibly guild me through.

Thanks

please check with this:
elastix.org/component/kunena … calls.html

You can also use the Authenticate command (voip-info.org/wiki/view/Aste … thenticate)
or you can us VMAuthenticate that authenticates against the voicemailpassword (voip-info.org/wiki/view/Aste … thenticate)

exten => _XX.,1,Answer()
same => n,GotoIf($["${CALLERID(num)}" = “100”]?start:end")
same => n(start),Authenticate(yourpassword)
same= >n,dial(dahdi/g1/${EXTEN})
same => n,Goto(end)
same => n,Playback(invalid)
same => n(end),Hangup()

Thanks for you reply. I actually tried the configuration you posted based on the issue i was facing. I replaced the (yourpassword) with (444). When i dial a number, it ask me password followed by the pound key. After doing all those i mean putting the password and the pound key(#), The call ends. I wont to ask if i was missing something out of the configuration.

Thanks for your kind support.

Tosin

There is a typo in mine
same= >n,dial(dahdi/g1/${EXTEN}) is wrong: mind the space between = and >

correct is: same=>n,dial(dahdi/g1/${EXTEN})

If it still doesn’t work, can you start the cli with asterisk -rvvvvvvdddddd and post the output when you make the call?

Caution: This high level of debug output will continue in /var/log/asterisk/* until the Asterisk daemon is restarted, or it is explicitly turned down.

Also, I suspect what is required here is a supervisor override (like with supermarket checkout cash registers), not a second barrier to the receptionist initiating outgoing calls.

The recursive include of the two contexts hasn’t been fixed, which is why ExecIf had to be used, rather than the more natural use of contexts to which I and James were pointing.