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 ======= Does someone have some similar code that I could use? Thank you.
On Friday 09 November 2007 06:07:04 Vincent wrote:> 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:Actually, it DOES return, but because you have no further instructions and since autofallthrough is set to "yes", it hangs up at that point.> =======> exten => 777,1,Set(CALLERIDNUM=${CALLERID(num)}) > exten => 777,n,GosubIf($[${LEN(${CALLERIDNUM})} != 10 ]?nocid,1:cid,1)exten => 777,n,WaitExten(10)> ;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}) > 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})This won't work, EXTEN is "cid" at this point. If you want it continuous, use the Read application again.> exten => cid,n,Hangup > =======-- Tilghman
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 > ========