Skip to content

Commit

Permalink
simple address book dialer for use with Mac OS X Address Book using …
Browse files Browse the repository at this point in the history
…xml_rpc to issue the request to your web server... the rest is up to you

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17063 d0543943-73ff-0310-b7d9-9358b9ac24b2
  • Loading branch information
briankwest committed Mar 22, 2010
1 parent 7c4f013 commit 0aeb564
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Binary file added scripts/applescript/FreeSWITCH Dialer.scpt
Binary file not shown.
28 changes: 28 additions & 0 deletions scripts/perl/rpc.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/perl
use Frontier::Responder;
use Data::Dumper;
require ESL;
#For use with FreeSWITCH Dialer.scpt in applescripts
#
# Install FreeSWITCH Dialer.scpt into ~/Library/Address Book Plug-Ins/
#


sub MakeCall {
my $hash = shift;
my $c = new ESL::ESLconnection("localhost", "8021", "ClueCon");
my $number = $hash->{phoneNumber};
my $user = $hash->{userExtension};
my $gateway = $hash->{useGateway};
$number =~ s/\D//g; # Remove nasties.
my $e = $c->sendRecv("bgapi originate {ignore_early_media=true,origination_caller_id_number=$number,effective_caller_id_number=19183029101}$user &bridge({ignore_early_media=false,sip_authorized=true}$gateway/$number)");
$e->getBody();
}

my $res = Frontier::Responder->new(
methods => {
MakeCall => \&MakeCall,
},
);

print $res->answer;

0 comments on commit 0aeb564

Please sign in to comment.