[asterisk-users] How to get ten-digit number?

Baji Panchumarti baji.panchumarti at gmail.com
Fri Nov 9 07:10:56 CST 2007


 could it be  Return() is missing the parenthesis.

  On Nov 9, 2007 8:07 AM, Vincent  wrote:

> Hello
>
>         Instead of using PrivacyManager, I'd rather use my own
> dialplan to prompt the user for a ten-digit number if they called
> while blocking CID.
>
> This code does prompt the user, but
> 1) hangs up if the user didn't type the ten digits before the timeout
> 2) if the user did type the right number of digits, it still hangs up
> instead of Returning and then jumping forth to the "cid" extension:
>
> ========
> exten => 777,1,Set(CALLERIDNUM=${CALLERID(num)})
> exten => 777,n,GosubIf($[${LEN(${CALLERIDNUM})} != 10 ]?nocid,1:cid,1)
>
> ;prompt user for 10-digit #, and Return to GosubIf()
> exten =>
> nocid,1,Read(CALLERIDNUM,/root/asterisk_sound_files/no_cid,10)
> exten => nocid,n,Verbose(User typed ${CALLERIDNUM})
> ;Why does it hang up instead of jumping back to GosubIf?
> exten => nocid,n,Return
>
> exten => cid,1,Set(CALLERIDNAME = ${DB(cidname/${CALLERIDNUM})})
> exten => cid,n,Background(/root/asterisk_sound_files/main_menu)
> exten => cid,n,Set(SOFTWARE=${EXTEN})
> exten => cid,n,Hangup
> ========



More information about the asterisk-users mailing list