All,

I have been working for a few months with a more complex means of managing my calls and blocking or filtering calls that don't have caller ID or have private caller ID. Right now I am using a solution that plays back a recording that states that calls that don't have Caller-ID are blocked. What I have been trying to figure out now, is how to announce calls to the phones in my house, in order to play back a recorded message from the blocked calls, after they record it. Most of the information in the Wiki, on Google, and other sources online are sketchy at best, in direct relation on how to do this with CallWeaver, though I see plenty of things for Asterisk, but using functions that CallWeaver doesn't use, like ParkAndAnnouce.

Basic call flow from my extensions.conf is:

Start of the call, all calls by default are routed through this:
[from-internal]
exten => 111,1,Zapateller(answer|nocallerid)
exten => 111,2,Wait(1)
exten => 111,3,SetMusicOnHold(default)
exten => 111,4,GotoIf($["${CALLERIDNUM}" = ""]?who-r-u,s,1)
exten => 111,5,GotoIf($["foo${CALLERIDNUM}" = "foo"]?who-r-u,s,1)
exten => 111,6,GotoIf($["${CALLERIDNAME:0:9}" = "Anonymous"]?who-r-u,s,1)
exten => 111,7,GotoIf($["${CALLERIDNAME:0:7}" = "Unknown"]?who-r-u,s,1)
exten => 111,8,GotoIf($["${CALLERIDNUM:0:7}" = "Private"]?who-r-u,s,1)
exten => 111,9,GotoIf($["${CALLERIDNAME:0:7}" = "Private"]?who-r-u,s,1)
exten => 111,10,GotoIf($["${CALLERIDNUM:0:10}" = "Restricted"]?who-r-u,s,1)
exten => 111,11,GotoIf($["${CALLERIDNAME:0:11}" = "OUT OF AREA"]?who-r-u,s,1)
exten => 111,12,GotoIf($["${CALLERIDNUM:0:4}" = "98028"]?who-r-u,s,1)
exten => 111,13,GotoIf($["${CALLERIDNAME:0:4}" = "PSTN"]?who-r-u,s,1)
exten => 111,14,GotoIf($["${CALLERIDNAME:0:4}" = "Unavailable"]?who-r-u,s,1)
exten => 111,15,GotoIf($["${CALLERIDNUM:0:7}" = "90000000000"]?who-r-u,s,1)
exten => 111,16,GotoIf($["${CALLERIDNAME:0:7}" = "Name Unavailab"]?who-r-u,s,1)
exten => 111,17,Set(TIMEOUT(digit)=3)
exten => 111,18,Set(TIMEOUT(response)=3)
exten => 111,19,Background(welcome)

[who-r-u]
exten => s,1,Playback(no-callid-blocked)
exten => s,2,Hangup



what I want to do is something a little more complex with the who-r-u, which is to allow the caller to announce who they are in a short message, place them either in a parking lot, or in a queue, and then dial the phones in the house, playback the file that was created when the caller recorded their information, and set up an option to either connect that call, or drop it, with a polite message and hang up.

The Asterisk config I tried is:


[who-r-u]
exten => s,1,Background(privacy-unident)
exten => s,2,Background(vm-rec-name)
exten => s,3,Wait(2)
exten => s,4,Record/tmp/callweaver-stranger:gsm|5|15)
exten => s,5,Background(pls-hold-while-try)
exten => s,6,Goto(ext-park,70,1)
exten => s,7,VoiceMail(u8203)
exten => s,8,Playback(Goodbye)
exten => s,9,Hangup

[ext-park]
exten => 70,1,Answer
exten => 70,2,SetMusicOnHold(default)
exten => 70,3,ParkAndAnnounce(asterisk-friend:/tmp/callweaver-stranger:vm-isonphone:at-following-number:PARKED|40|local/2...@from-internal|who-r-u,s,7)
exten => 70,4,Hangup



My current though is to try to use a system command to play the file back after dialing the extension for all the phones. I am not sure how this would work in the call flow. I am thinking something like this:

[ext-park]
exten => 70,1,Answer
exten => 70,2,SetMusicOnHold(default)
exten => 70,3,Dial(SIP/housephones,10,m)
exten => 70,4,System(aplay /tmp/${CALLERIDNUM}.gsm)
exten => 70,5,Background(AcceptOrReject)
exten => 70,6,Playback(Goodbye)
exten => 70,7,Hangup

exten => 80,1,Answer
exten => 80,2,<some connection logic>
exten => 80,3,Goto(ext-park,70,1)







Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Callweaver-users mailing list
Callweaver-users@callweaver.org
http://lists.callweaver.org/mailman/listinfo/callweaver-users

Reply via email to