[Freeswitch-users] JavaScript control Transfer

David Swardstrom dswardstrom at remotelink.com
Wed Jun 9 17:14:25 PDT 2010


I really want to do the transfer and plan to exit() after the transfer takes
place.
What I have is a string like the following: "conf-ivr.js 6".
The conf-ivr.js is my version of the conf-ivr.js example. 
The value "6" indicates a sub-type of conference so that we can support
different flavors.
I guess I could use the following:
session.execute("transfer", "conf-ivr6");
Then put the following into the xml:
   <extension name="JavaScript Transfer to Conference application">
      <condition field="destination_number" expression="^conf-ivr6$">
         <action application="javascript" data="conf-ivr.js 6"/>
      </condition>
   </extension>
 
What I hoped for was a way to avoid putting specific stuff for each
application into the XML.
I just wanted to be able to provide a new JS application or a new flavor of
a JS application
without having to also modify the XML and get the XML reloaded into
FreeSwitch.

Is it possible to pass parameters via the transfer so the XML would look
like this:
   <extension name="JavaScript Transfer to JS application">
      <condition field="destination_number" expression="^myjsapp$">
         <action application="javascript" data="$1"/>
      </condition>
   </extension>

There was a hint about using something called "inline" which indicated that
an XML dialplan 
would not be needed.
-- 
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/JavaScript-control-Transfer-tp5160890p5161043.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



More information about the FreeSWITCH-users mailing list