[Freeswitch-users] Notify of a missed call (no voicemail left)
Avi Marcus
avi at avimarcus.net
Tue Jan 10 10:34:35 MSK 2012
As of Jan 4th, mod_voicemail now sets the channel variable
"voicemail_message_len" with the message length of the voicemail that
was left.
So now all you need is a post-call processor. E.g. you can have your
xml_cdr script check - if the call had normal_clearing with last_app
of bridge, then someone picked up. (I think... I didn't get around to
making this yet.)
If it was last_app of voicemail, and voicemail_message_len is set,
then an email already went out via the voicemail application.
Otherwise it's a missed call and run you script.
Or I suppose you could do this as a lua script in the hangup hook with
session_in_hangup hook or something.
If someone can wikify dialplan code and a lua script we can get it working...
I suppose the email would go to the same place as the voicemail goes
to. It would be based on a separate user variable about "mail on
missed call" though..
-Avi Marcus
On Tue, Jan 10, 2012 at 9:22 AM, Ryan How <rhow at exemail.com.au> wrote:
> Hi,
>
> Is there any way to send an email notification of a missed call, no
> voicemail left?. Or even if a voicemail is left I guess, that isn't a
> biggy... just so if someone rings and hangs up, or rings and voicemail
> answers but no message.
>
> I'm thinking something that goes in here like: <action
> application="email" data="something here"/>
>
> <action application="bridge"
> data="user/${dialed_extension}@${domain_name}"/>
> <insert in here>
> <action application="answer"/>
> <action application="sleep" data="1000"/>
> <action application="bridge" data="loopback/app=voicemail:default
> ${domain_name} ${dialed_extension}"/>
>
>
> But that wouldn't capture when they hang up before voicemail answering
> would it ?
>
> I guess I could do something like application="socket" and then write an
> event socket program that sends an email. If there isn't already
> something out there that does it. Otherwise I'll leave this for another
> day coz it is a bit beyond my current magic ability, I need to level up :P
>
> Thanks again!
>
> Ryan
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list