mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
example click to call using new ESL lib in perl
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12079 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7fb9f7dae8
commit
065dec4baa
25
scripts/call.cgi
Executable file
25
scripts/call.cgi
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/perl
|
||||
use CGI qw(:standard);
|
||||
use ESL;
|
||||
|
||||
my $gateway = "sofia/gateway/my_gateway/";
|
||||
my $aleg_cid_num = "0987654321";
|
||||
my $bleg_cid_num = "1234567890";
|
||||
|
||||
my $q = new CGI;
|
||||
my $c = new ESL::eslConnection("localhost", "8021", "ClueCon");
|
||||
print $q->header;
|
||||
|
||||
if($q->param()) {
|
||||
my $numbera = $q->param('numbera');
|
||||
my $numberb = $q->param('numberb');
|
||||
my $e = $c->sendRecv("api originate {ignore_early_media=true,origination_caller_id_number=$aleg_cid_num,effective_caller_id_number=$bleg_cid_num}$gateway$numbera &bridge($gateway$numberb)");
|
||||
print "API Sent:" . $e->getBody();
|
||||
exit;
|
||||
}
|
||||
|
||||
print $q->start_form, $q->h1("Click to Call Example"), br,
|
||||
"First Party:", $q->textfield('numbera'), br,
|
||||
"Second Party:", $q->textfield('numberb'),br,
|
||||
$q->submit, $q->end_form;
|
||||
|
Loading…
x
Reference in New Issue
Block a user