<html><body bgcolor="#FFFFFF"><div><div><br><br>Sent from my iPhone</div><div><br>On Aug 27, 2009, at 10:01 PM, lakshmanan ganapathy <<a href="mailto:lakindia89@gmail.com"><a href="mailto:lakindia89@gmail.com">lakindia89@gmail.com</a></a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>No. In the dial plan I said, application="perl" data="The perl script".<br>I also checked $session->execute("bridge","user/1010"). This is working fine.<br>But originate is not working as I expected.<br>
<br></div></blockquote>I think you might be confusing Dialplan apps with API commands. The $session object represents an existing channel and therefore it uses Dialplan apps. Originate is an API, that is, it is a command that you type at the CLI. <div><br></div><div>You need an API object to use originate from a script:</div><div>my $api = new $freeswitch::API();</div><div>my $res = $api->executeString("originate user/1010 &bridge(user/1000);</div><div><br></div><div>What kind of application are you developing? I'm curious why you need an originate to create a whole new call.</div><div><br></div><div>-MC</div><div><br></div><div><blockquote type="cite"><div><div class="gmail_quote">On Thu, Aug 27, 2009 at 9:46 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org"></a><a href="mailto:msc@freeswitch.org"><a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a></a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote">On Wed, Aug 26, 2009 at 9:38 PM, lakshmanan <span dir="ltr"><<a href="mailto:lakindia89@gmail.com" target="_blank"></a><a href="mailto:lakindia89@gmail.com"><a href="mailto:lakindia89@gmail.com">lakindia89@gmail.com</a></a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
When I give the following from the command line it calls to 1010 extension<br>
and once answered, it calls to 1000 and bridge the connection.<br>
originate user/1010 &bridge(user/1000)<br>
But I want to do this in perl. So I have given as follows<br>
$session->originate($session,"user/1010 &bridge user/1000");<br>
But it is not working. It says "user/1010 &bridge user/1000 is invalid<br>
user".<br>
How to do this in perl. pls help.</blockquote><div><br>Are you calling this perl script from the CLI? If so you won't have the $session object because a channel does not exist for a simple API call. <br>-MC<br><br>
</div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org"></a><a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"></a><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"></a><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br>
<a href="http://www.freeswitch.org" target="_blank"></a><a href="http://www.freeswitch.org"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a><br>
<br></blockquote></div><br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a></span><br><span>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"></a><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a></span><br><span><a href="http://www.freeswitch.org"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a></span><br></div></blockquote></div></div><div></div></body></html>