<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On Monday 06 December 2010 12:19 PM, lakshmanan ganapathy wrote:
<blockquote
cite="mid:AANLkTi=m0ww373iFn0nrZQ4hofyAp6duN=-Y4G-wyPgt@mail.gmail.com"
type="cite">Hi all,<br>
I was experimenting the bind_mea_app and I have a doubt.<br>
There is a call from 1000 to FreeSwitch extension and it is connecting
to event outbound socket.<br>
I've the following script in place.<br>
<br>
#!/usr/bin/perl<br>
use strict;<br>
use warnings;<br>
use Data::Dumper;<br>
use lib '/usr/src/freeswitch/libs/esl/perl/';<br>
use IO::Socket::INET;<br>
use ESL;<br>
<br>
my $SOCK = new IO::Socket::INET ( LocalHost => 'localhost',
LocalPort => '8447', Proto => 'tcp', Listen => 10, Reuse
=> 1 );<br>
unless ($SOCK) {<br>
print("Could not create socket: $!");<br>
exit(2);<br>
}<br>
<br>
while (1) {<br>
# Wait for any client through accept function in socket
module.<br>
my $new_sock = $SOCK->accept();<br>
next if (not defined($new_sock));<br>
# Get socket host <br>
my $host = $new_sock->sockhost();<br>
print("Got a client accepted from $host\n");<br>
my $pid = fork();<br>
if ($pid) {<br>
close($new_sock);<br>
next;<br>
}<br>
my $fd = fileno($new_sock);<br>
print("Newly forked child, pid: $$\n");<br>
my $EslCon = new ESL::ESLconnection($fd);<br>
print "Connection created successfully\n";<br>
my $info = $EslCon->getInfo();<br>
$EslCon->setEventLock("true");<br>
my $uuid = $info->getHeader("unique-id");<br>
print Dumper $info->serialize();<br>
$EslCon->execute("set","bind_meta_key=#");<br>
$EslCon->execute("bind_meta_app","1 b o
event::appli=testing");<br>
my $api =
$EslCon->execute("bridge","{ignore_early_media=true}freetdm/1/a/xxxxxxxxx");<br>
}<br>
<br>
The script called to the number that was dialed. In that number I
pressed #1, but the event was not sent,<br>
and I assume that the bridge application is executing in the A leg ( is
it correct?? ) . So only after that bridge application gets completed
the event gets triggered out.<br>
<br>
If I execute the application in the B leg, then it is working fine,
since there is no application that is running at that time.<br>
Now I wanted to know if there is any way to run the application on A
leg, I need that application to be executed even the bridge is not
completed.<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
Try after running the answer application in leg A <br>
<br>
<pre class="moz-signature" cols="72">--
Best regards,
N.Abubacker ,
Associate system engineer ,
bk systems pvt ltd ,
Ph : 9144-43902701
Disclaimer: <a class="moz-txt-link-freetext" href="http://www.bksystems.co.in/email-policy">http://www.bksystems.co.in/email-policy</a>
</pre>
</body>
</html>