when you say execute an application do you mean literally a dp application like set or voicemail ?<div>transfer takes an extension as an arg not an application and when you do run that transfer command you must exit your script so the transfer can take place.</div>
<div><br></div><div>session.execute(&quot;transfer&quot;, &quot;&lt;SOME EXTENSION NUMBER&quot;);</div><div>//exit the script asap</div><div><br></div><div><br></div><div>if you want to just execute an app do</div><div><br>
</div><div>session.execute(&quot;&lt;some app&quot;, &quot;&lt;some args&gt;&quot;);</div><div>// control returns here </div><div><br></div><div><br></div><div>or if you want to run an extension like an app and return to your script do</div>
<div><br></div><div>session.execute(&quot;execute_extension&quot;, &quot;&lt;SOME EXTENSION NUMBER&gt;&quot;);<br>// control returns here</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>
<br><div class="gmail_quote">On Wed, Jun 9, 2010 at 6:05 PM, David Swardstrom <span dir="ltr">&lt;<a href="mailto:dswardstrom@remotelink.com">dswardstrom@remotelink.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have been working on a small Javascript application to determine<br>
the specific Javascript application to execute based on the DNIS.<br>
The goal is:<br>
* Provide an entry in a dialplan public XML file to invoke the application.<br>
* Use a database lookup (ODBC) using DNIS.<br>
* Fail if the DNIS is not found (hangup the session)<br>
* If the DNIS is found:<br>
** use another entry in the database to determine<br>
** the working application and any static parameters.<br>
* Invoke/Transfer to/Activate the other application.<br>
<br>
It is fairly simple to do all but the first step.<br>
I have been having problems trying to get the last step to work.<br>
<br>
What I would like is something like this:<br>
session.execute(&quot;transfer&quot;, transfer_string);<br>
Where transfer_string is the string from the Database.<br>
Or where transfer_string is the string from the DB<br>
plus some fixed options.<br>
<br>
I would prefer not to have to add entries into<br>
the dialplan/pubic/00_xx.xml file but will if I have to.<br>
I did notice an option called &quot;inline&quot; which potentially avoid this.<br>
<br>
I suspect part of my problem is not quite understanding the transfer syntax.<br>
<br>
If I ever get this running properly, I will provide a Wiki example of a<br>
simplified version of this (ie, without some of work specific code).<br>
<br>
Regards,<br>
David Swardstrom<br>
(profile)<a href="http://wiki.freeswitch.org/wiki/User:Dswardstrom" target="_blank">http://wiki.freeswitch.org/wiki/User:Dswardstrom</a><br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>