[Freeswitch-users] PC Based Caller-id Monitor?

Sean Devoy sdevoy at bizfocused.com
Tue Apr 29 01:09:22 MSD 2014


Thanks Nathan.  Email won't work for me, but your solution "made the light go on" for me.

-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Nathan Neulinger
Sent: Monday, April 28, 2014 2:35 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] PC Based Caller-id Monitor?

I do something like this - we call it a "Notify Call" hook, and just send an email notification with caller id info on any incoming call to an extension that has that hook enabled. I'm sure you could do something similar.

         <action application="set" data="notify_call_address=username at mst.edu" />
         <action application="perl" data="/local/freeswitch/bin/notify-call-hook.pl" />

and then:

--------------------------------------
#!/usr/bin/perl
use strict;
use MIME::Lite;
require "/local/freeswitch/bin/hook-libs.pl";

our $session;
my $addr     = $session->getVariable("notify_call_address");
my $to       = $session->getVariable("destination_number");
my $from     = $session->getVariable("effective_caller_id_number") || $session->getVariable("caller_id_number");
my $fromname = $session->getVariable("effective_caller_id_name") || $session->getVariable("caller_id_name");

my $time = scalar( localtime(time) );

freeswitch::console_log( "info", "sending notify for call from $from to $to to address $addr\n" );

my $msg = MIME::Lite->new(
     From    => "freeswitch\@mst.edu",
     To      => $addr,
     Subject => "Receiving call from ($from / $fromname) to ($to) at ($time)",
     Type    => "multipart/mixed"
);

my $content = <<EOF;
Call To: $to
Call From: $from

Caller Name: $fromname

Call Time: $time
EOF

$msg->attach(
     Type => 'TEXT',
     Data => $content,
);

&stack_max();
$msg->send();
&stack_restore();
--------------------------------------


-- Nathan

On 04/28/2014 11:26 AM, Sean Devoy wrote:
> Hi All,
>
> My client has their DID ringing 2 extensions.  He says "at night when 
> they are gone I would love to have caller id from their extension (aka did) to decide if I want to pick up the outside call"
>
> He does not want his phone to ring from the DID all the time, but 
> wants the caller-id on his phone or PC.  I need ideas how to 
> accomplish this.  ESL app?  The app would not necessarily have to monitor for incoming calls if there is a way to "query" the caller id of an incoming call to a given extension.
>
> Thanks,
>
> Sean
>
>
>
> ______________________________________________________________________
> ___ 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-use
> rs
> http://www.freeswitch.org
>

--
------------------------------------------------------------
Nathan Neulinger                       nneul at mst.edu
Missouri S&T Information Technology    (573) 612-1412
System Administrator - Architect

_________________________________________________________________________
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 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list