Adding PIN + 8 digit of number to outbound call

How can I add a PIN followed by phone number?

For example:
1 is the pin
87654321 is the telephone number.

So when I want to do an outbound call, I have to dial 187654321 correctly to successfully call outbound. Or else, the operator will tell me, “please enter your password followed by the pound key” or “password is incorrect”

So, basically, the “please enter your password followed by the pound key”, will only trigger if you dialed only the 8 digit number. And if you correctly dialed the pin+8 numbers, no operator will trigger and gonna proceed to the outbound call.

What i tested:

Already tried to add a PIN in ‘route password’ in outbound routes. But, when i tried to dial 187654321 the call didn’t proceed and “please enter your password followed by the pound key” is triggered. I still tried to dial 187654321, still gives me "Your password is incorrect. Please enter your password followed by the pound key"

This is my dial pattern.

I saw some comments to use authenticate, but i don’t know how should i do it. I’m new to this… :frowning:

You’ve mentioned “outbound routes”. Are you using FreePBX or another GUI?

Yes, and my friend told me, if it is about this matter, it’s about asterisk.

In Asterisk, you use the D option on Dial.

[ It is looking like I misunderstood the requirement, and this is on the inbound leg, not the outbound leg. Basically I put too much weight on the subject. ]

exten =>  87654321,1,Read(password,<enter password gsm file>,1) ; Prompt the user to enter the password 1 digits 
exten =>  87654321,2,GotoIf($password = 1,4) ; goto 4 if password is 1
 exten =>  87654321,3,Hangup(); 
 exten =>  87654321,4,Dial(PJSIP/87654321); dial the number
 exten =>  87654321,5,Hangup();

you can make it generic

exten =>  _X,.,1,Read(password,<enter password gsm file>,1) ; Prompt the user to enter the password 1 digits 
exten =>  _X,.,2,GotoIf($password = 1,4) ; goto 4 if password is 1
 exten =>  _X,.,3,Hangup(); 
 exten =>  _X,.,4,Dial(PJSIP/(EXTEN}); dial the number
 exten =>  _X,.,5,Hangup();

Your friend lied. Asterisk does not know what an ‘outbound route’ is nor what a ‘route password’ is. Thus, any suggestion presented here may prove difficult to integrate into FPBX. That’s why we refer FPBX users to the FPBX forum.

I think the OP wants to enter a single digit ‘password’ and an 8 digit DID as 9 contiguous digits.

Thus, the dialplan should match on 1xxxxxxxx and dial the last 8 digits.

If the caller dialed 9 digits not starting with 1, eg. matching nxxxxxxxx, play ‘Your password is incorrect.’ It’s not clear if the dialplan should hang up or ask for the passdigit.

If the caller dialed 8 digits (matching xxxxxxxx), play ‘Please enter your really weak password followed by the pound key’ and if they enter 1#, dial the 8 digits. Again, not clear what to do if the wrong passdigit is entered.

So, the OP should cobble up some dialplan and then put it some place where FPBX will not clobber it.

For future reference, dialplan snippets and console log snippets (cut and paste) wrapped in pre-formatted text tags is preferred to screenshots. And screenshots of web pages mean nothing.

(The forum thinks this post is too close to the one I just deleted above.)

Rats. I forgot about 0, so a pattern matching [02-9] should be used.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.