Joseph Tanner
2006-Jan-25 19:30 UTC
[Asterisk-Users] Want to automatically park call and have caller hear ring tones
Here's the short of it. I have an Asterisk 1.2.1 system setup to handle both personal and business calls. Now, the business callers will hear music while on hold, so the default MOH needs to play regular music. Personal callers should hear rings, not music. I have this working except for one specific case. If someone calls during the day (we're night people), asterisk will not ring the phones. Often we'll be up before asterisk thinks we are, so we will miss quite a few calls. My solution was to have asterisk park the call for 15 seconds, send the callerid information to a YAC listener on my laptop and our TiVo, and I can pick up any phone and dial "4" to pick up the parked call. Works perfect, except parked callers hear music, not ringing. To make it a bit less confusing, I play a quick wav file saying to please hold while your call is connected, which sounds rather impersonal (at least for a personal call, it's fine for biz calls and is what I use there too). Is there a way to have a call parked, and have the caller hear the default ringing tones, and not have to mess around with MOH? Currently I'm using ParkAndAnnounce, and just announcing it to /dev/null (which it complains about, but it works). Here's the specific section of my extensions.conf file if anyone's curious: [asleep] exten => s/_931555XXXX,1,NoOp exten => s/7205879978,1,NoOp exten => s/4025179978,1,NoOp exten => s,1,System(/bin/echo -n -e "'${CALLERIDNAME} ${CALLERIDNUM}'" | nc -w 1 192.168.1.16 10629) exten => s/_931555XXXX,2,NoOp exten => s/7205879978,2,NoOp exten => s/4025179978,2,NoOp exten => s,2,System(/bin/echo -n -e "'${CALLERIDNAME} ${CALLERIDNUM}'" | nc -w 1 192.168.1.19 10629) exten => s,3,NoOp exten => s,4,NoOp exten => s/_731584XXXX,5,NoOp exten => s/7205879978,5,NoOp exten => s/4025179978,5,NoOp exten => s,5,Playback(custom/pleasehold) exten => s,6,ParkAndAnnounce(pbx-transfer:Parked|15|/dev/null|asleep,s,8) exten => s,7,NoOp exten => s,8,Playback(custom/voicemail) exten => s,9,Voicemail(s1) exten => s,10,Hangup exten => s,107,NoOp exten => s,108,Playback(custom/voicemail) exten => s,109,Voicemail(s1) exten => s,110,Hangup Note that the call doesn't start here, rather it starts in another context which checks the hours, then if it's in the middle of the day it'll pass it off to the asleep context. Here's what each line does. The first four lines are for s,1, basically if the callerid matches one of the first three numbers, it does a NoOp. Otherwise, it performs the normal s,1 line which uses echo and nc (netcat) to send the callerid information to my TiVo. The s,2 lines are the same thing, except it sends the info to my laptop (I changed the first number to something generic, that's not what's actually in my config; the other two are from calling cards that an annoying member of our family uses, basically I'm ignoring all calls from them). s,3 and s,4 are both NoOp in for future expansion. s,5 gives the Please Hold message, otherwise suddenly hearing music would be confusing. s,6 parks the call for 15 seconds, after which time it returns to the asleep context, line s,8. s,7 is for future use. s,8 plays back a custom voicemail greeting, s,9 is for the caller to leave a voicemail (vm doesn't give its own greeting, just starts with a beep). s,10 hangs up. s,107 is in case the parkandannounce doesn't work for whatever reason, it's a NoOp which passes it to s,108 which as before plays the vm greeting, s,109 is the actual voicemail, s,110 hangs up. BTW, I just noticed I need to add those bad callerids between s,5 and s,6, else they will be parked but not hear the please hold message (I want those numbers to go straight to voicemail, I'll clean it up later so I'm not repeating myself all the time). Is there an easy way to do what I want, parking these calls automatically and the caller just hears the normal ringing tone? Thanks!
David S. Madole
2006-Jan-25 19:57 UTC
[Asterisk-Users] Want to automatically park call and have callerhear ring tones
From: "Joseph Tanner" <joseph@thetechguide.com>> > Here's the short of it.I don't think so!> I have an Asterisk 1.2.1 system setup to > handle both personal and business calls. Now, the business callers > will hear music while on hold, so the default MOH needs to play > ... > My solution was to have asterisk park the call for 15 seconds, send > the callerid information to a YAC listener on my laptop and our TiVo, > and I can pick up any phone and dial "4" to pick up the parked call. > Works perfect, except parked callers hear music, not ringing. > ... > Is there a way to have a call parked, and have the caller hear the > default ringing tones, and not have to mess around with MOH?How about you just don't answer the call in the first place? Ring it through to an extension that doesn't actually ring (maybe the console?) and then use pickup to answer from another phone in the same pickup group. This could be used for your music on hold case also by using the "m" modifier on the Dial command to the non-ringing extension. David