<div> <font face="Arial, Helvetica, sans-serif">Hi Tony,<br>
<br>
But I thought we settled on "Janitor." ;-)<br>
BTW, it was the other point about keeping the FS founders involved or not in the documentation process that concerned much much more. That was the big issue that got me going on that thread.<br>
<br>
Anyway, I appreciate your help and will do some "document engineering" but need one further elaboration on de-referencing the original session object since I tried the execute("transfer" ...) before and couldn't get that to work. Can you show me an example and I can then put up both approaches.<br>
<br>
Mark.<br>
</font></div>
<div> <br>
</div>
<div> <br>
</div>
-----Original Message-----<br>
From: Anthony Minessale <anthony.minessale@gmail.com><br>
To: freeswitch-users@lists.freeswitch.org<br>
Sent: Thu, 9 Apr 2009 6:09 am<br>
Subject: Re: [Freeswitch-users] Problem with originate in javascript.<br>
<br>
<div id="AOLMsgPart_3_087c9c6c-d896-452e-ac7c-db7f216ddbc9">
The 2nd 2 examples you provided are invalid, they depict the usage of the originate api command in the context of the constructor<br>
to a JS session.<br>
<br>
If you want to send the call to another extension you have to create the channel like you did in the first example followed by<br>
session.execute("transfer", "<font face="Arial, Helvetica, sans-serif">GINO_ANS XML default</font>");<br>
at which time it would be wise if you deref the session object because its thread will be running in the new extension.<br>
<br>
<br>
A better way would be to do both in one with a single call to the originate api command<br>
<br>
apiExecute("originate", <font face="Arial, Helvetica, sans-serif">"{id_name='${caller_id_name}',id_number=${caller_id_number}}sofia/gateway/spa3102PSTN/<a target="_blank" href="http://14082031170@10.0.0.5:5061/">14082031170@10.0.0.5:5061</a>
GINO_ANS XML default"</font>);<br>
<br>
This never gives you a session object it just creates a channel and transfers it to the desired extension.<br>
<br>
<br>
A Documentation Re-factorial Engineer may be able to add it to the relevant page on the wiki if it is not already present.<br>
<br>
<br>
<br>
<div class="gmail_quote">On Wed, Apr 8, 2009 at 6:15 PM, <span dir="ltr"><<a href="mailto:mszlazak@aol.com">mszlazak@aol.com</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;">
<font face="Arial, Helvetica, sans-serif">I want to run a script with a scheduler but I'm having a problem with how to set up the originate in Javascript.<br>
<br>
The originate would go something like:<br>
<br>
originate {id_name='${caller_id_name}',id_number=${caller_id_number}}sofia/gateway/spa3102PSTN/<a target="_blank" href="http://12223334444@10.0.0.5:5061">12223334444@10.0.0.5:5061</a> GINO_ANS<br>
<br>
I can get this to work:<br>
<br>
session = new Session("{id_name='${caller_id_name}',id_number=${caller_id_number}}sofia/gateway/spa3102PSTN/<a target="_blank" href="http://14082031170@10.0.0.5:5061">14082031170@10.0.0.5:5061</a>");<br>
<br>
But I want to "drop" that into an extension that runs another script and can't get either of these to work:<br>
<br>
session = new Session("{id_name='${caller_id_name}',id_number=${caller_id_number}}sofia/gateway/spa3102PSTN/<a target="_blank" href="http://14082031170@10.0.0.5:5061">14082031170@10.0.0.5:5061</a> GINO_ANS"); <br>
<br>
</font><font face="Arial, Helvetica, sans-serif">session = new
Session("{id_name='${caller_id_name}',id_number=${caller_id_number}}sofia/gateway/spa3102PSTN/<a target="_blank" href="http://14082031170@10.0.0.5:5061">14082031170@10.0.0.5:5061</a>
GINO_ANS XML default");<br>
<br>
Also, will I have problems running the second script from the first script?<br>
<br>
Thanks.<br>
<br>
<br>
</font>
<div><br>
<font style="color: black; font-family: arial,san-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> <hr style="margin-top: 10px;">
<a target="_blank" href="http://pr.atwola.com/promoclk/100126575x1219939010x1201342897/aol?redir=http:%2F%2Fad.doubleclick.net%2Fclk%3B213771626%3B35379597%3Bw">New Deals on Dell Netbooks - Now starting at $299</a></font> </div>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br>
</blockquote></div>
<br>
<br clear="all"><br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>
ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</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 target="_blank" 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 target="_blank" href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br>
</div>
<!-- end of AOLMsgPart_3_087c9c6c-d896-452e-ac7c-db7f216ddbc9 -->
<div id="AOLMsgPart_4_087c9c6c-d896-452e-ac7c-db7f216ddbc9" style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="font-size: 9pt;"><tt>_______________________________________________<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>
</tt></pre>
</div>
<!-- end of AOLMsgPart_4_087c9c6c-d896-452e-ac7c-db7f216ddbc9 -->
<div id='MAILCIADA048-5bbb49de20d9234' class='aol_ad_footer'><br/><font style="color:black;font:normal 10pt arial,san-serif;"> <hr style="margin-top:10px"/><A HREF=http://pr.atwola.com/promoclk/100126575x1220635155x1201407495/aol?redir=http:%2F%2Fad.doubleclick.net%2Fclk%3B213771973%3B35379628%3Bw>New Deals on Dell Netbooks - Now starting at $299</A></font> </div>