"The Cable Guy" <> wrote in message
news:iSfqe.48253$ k...
> Hello.
>
> I am struggling to set up an inbound number that I can enter a PIN to
obtain
> a dial tone.........and then dial out on another trunk.
>
> I've followed instructions for Asterisk, however, the Asterisk Management
> Portal doesn't seem to cope (or is it me?)
>
Hi
Once you want to do the more complex dialplans then it may be worth sticking
to vi and the command line.
Here is the way i dial out FYI.
The passwords and CLI number is held in a database, so access can be tightly
controlled, using the accountcode means a cdr record is created for that
account.
;password system
exten => 567,1,Answer ; Answer the line
exten => 567,2,DBget(passkey=auth_user/${CALLERIDNUM})
exten => 567,3,Authenticate(${passkey})
exten => 567,4,SetAccount(${CALLERIDNUM})
exten => 567,5,Goto(ivr,s,1)
[ivr]
exten => s,1,Background(please_choose)
exten => s,2,DigitTimeout,5
exten => s,3,ResponseTimeout,15
;Option1 allows outdialing
exten => 1,1,Goto(ivr_dial,s,1)
;Option2 goes to vmail
exten => 2,1,Goto(demo,1571,1)
;Option3 reads last two numbers then goes to vmail
exten => 3,1, DBget(num=called/99) ;sets spnum to be the required bin number
exten => 3,2, SetVar(count=1.000000)
exten => 3,3, DBget(cnum=called/${num})
exten => 3,4, Playback(beep)
exten => 3,5, SayDigits(${cnum})
exten => 3,6, GotoIf($[${num} = 1.000000]?99

exten => 3,7, Math(num,${num}-1)
exten => 3,8, Math(count,${count}+1)
exten => 3,9, GotoIf($[${count} < 3.000000]?3)
exten => 3,10, Goto(demo,1571,1)
exten => 3,998,SetVar(num=10.000000)
exten => 3,999,Goto(3)
exten => 9,1,Goto(demo,s,1)
;Option0 Goes back to the begining
exten => 0,1,Goto(ivr,s,1)
exten => t,1,hangup
exten => i,1,Goto(s,1)
[ivr_dial]
include => international
exten => s,1,Background(please_dial)
exten => s,2,DigitTimeout,5
exten => s,3,ResponseTimeout,15
exten => t,1,hangup
exten => i,1,Goto(s,1)
Hope it will give you an idea of what is possible
Ian