Try this (update to svn trunk first)<br><br>&lt;action application=&quot;bridge&quot; data=&quot;{api_hangup_hook=jsapi::foo.js}sofia/default/<a href="mailto:user@dest.com">user@dest.com</a>&quot;/&gt;<br><br>then place your call as usual<br>
<br>then in foo.js<br><br><br>// dumps the event to text/plain<br>env = request.dumpENV(&quot;text&quot;);<br><br>// dumps the event to text/xml<br>xmlenv = request.dumpENV(&quot;xml&quot;);<br><br>// makes an XML obj from the xml text<br>
xinfo = new XML(&quot;&lt;root&gt;&quot; + xmlenv + &quot;&lt;/root&gt;&quot;);<br><br>// dump the plain text event data<br>consoleLog(&quot;info&quot;, env + &quot;\n&quot;);<br><br>// dump the xml event data<br>consoleLog(&quot;info&quot;, xmlenv + &quot;\n&quot;);<br>
<br>// Get a header from the event object<br>consoleLog(&quot;warning&quot;, &quot;media ip was [&quot; + request.getHeader(&quot;local_media_ip&quot;) + &quot;]\n&quot;);<br><br>// Get the same header from the xml object<br>
consoleLog(&quot;warning&quot;, &quot;media ip was [&quot; + xinfo.event.headers.local_media_ip + &quot;]\n&quot;);<br><br><br><br><br><div class="gmail_quote">On Thu, Jan 22, 2009 at 2:24 PM, Sias Mey <span dir="ltr">&lt;<a href="mailto:sias@cpdata.co.za">sias@cpdata.co.za</a>&gt;</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;">Hi,<br>
<br>
Im trying to originate calls from a conference and use javascript to<br>
watch out for hangup events so I can use the data in the session to<br>
flesh out some database info. However it seems that Im having some<br>
strangeness. It might just be my code. So I include that.<br>
<br>
I run FreeSwitch Version 1.0.trunk (11226)<br>
<br>
Dialplan:<br>
&lt;extension name=&quot;js_logtodb&quot;&gt;<br>
 &nbsp;&lt;condition field=&quot;destination_number&quot; expression=&quot;^confout-(10\d{2})$&quot;&gt;<br>
 &nbsp; &nbsp;&lt;action application=&quot;javascript&quot; data=&quot;confout.js&quot;/&gt;<br>
 &nbsp;&lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
confout.js:<br>
 &nbsp;is attached<br>
<br>
I use API calls to pull one user into a conference. Then I use more api calls to do a conference dial to loopback/confout-1001<br>
<br>
This should run the js and then bridge extension 1001 into the same conference.<br>
(I have hardcoded the additional extension for testing). I dont know if there is another way to get a conference dial to run a javascript file for information logging, but I am open to enlightenment.<br>
<br>
Oh im using conference dial because that provides clear audible progress to the other conference memebers as to what is actually happening with the new call.<br>
<br>
Any help would be greatly apreciated, Thanks in advance.<br>
<font color="#888888">Sias<br>
</font><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>
<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>
<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="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>