[asterisk-users] Prompting for number when CID number not sent?

Vincent vincent.delporte at bigfoot.com
Sun Oct 21 10:22:43 CDT 2007


Hi

	The first step I have to go through when users call into our
IVR is to handle the case where users' PBX hides their CID number. In
that case, I need to have them type their phone number (ten digits).

OTOH, those who call without hiding their CID number are sent directly
to the main menu.

How would I go about prompting users for their phone number?

Here's what I have at this point:
========
exten => s,1,Answer

;CID sent : go to main_menu
exten => s,n,Background(/root/asterisk_sound_files/main_menu)
;CID hidden : prompt for CID and loop until ok
exten => s/,n,Playback(/root/asterisk_sound_files/no_cid)

exten =>
_[1-4],1,Playback(/root/asterisk_sound_files/you_can_record_msg)
exten => _[1-4],n,Record(/tmp/asterisk-msg:wav)
exten => _[1-4],n,Wait(1)
exten => _[1-4],n,Playback(/tmp/asterisk-msg)
exten => _[1-4],n,wait(1)

;here, rewrite CID name by looking up CID # in database
;put CID name + number in variables
;exten => _[1-4],n,SetVar(cid=${callerid})
;send e-mail with CID name + number and link to WAV file to people in
charge of selected software

exten => _[1-4],n,Hangup
========

Thanks for any tip.




More information about the asterisk-users mailing list