Vincent
2007-Oct-21 15:22 UTC
[asterisk-users] Prompting for number when CID number not sent?
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.
Doug Lytle
2007-Oct-21 17:31 UTC
[asterisk-users] Prompting for number when CID number not sent?
Vincent wrote:> How would I go about prompting users for their phone number? > >You'll want to look at the Privacy Manager: http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+PrivacyManager Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Jared Smith
2007-Oct-22 14:14 UTC
[asterisk-users] Prompting for number when CID number not sent?
On Sun, 2007-10-21 at 17:22 +0200, Vincent wrote:> ;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 softwareInstead of ${callerid} here (which probably isn't working for you anyway), you probably want to use the CALLERID dialplan function to retrieve the CallerID number, like this: exten => _[1-4],n,Set(cid=${CALLERID(num)}) -- Jared Smith Community Relations Manager Digium, Inc.