[Freeswitch-svn] [commit] r5516 - in freeswitch/trunk/scripts/contrib/trixter/xml-curl: modules templates/switch1/dialplan

Freeswitch SVN trixter at freeswitch.org
Sun Jul 8 16:03:23 EDT 2007


Author: trixter
Date: Sun Jul  8 16:03:23 2007
New Revision: 5516

Modified:
   freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php
   freeswitch/trunk/scripts/contrib/trixter/xml-curl/templates/switch1/dialplan/frompstn.tpl

Log:
fxed a problem with the way the dialplans worked - now you can do the same command multiple times in a dialplan


Modified: freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php	Sun Jul  8 16:03:23 2007
@@ -15,13 +15,11 @@
         // we might check a database for  the route, but in this example we hardcode it
         $template = 'frompstn.tpl'; // one can exist for each profile or channel type or ...
 
-
-        $ACTION['answer']='';
-
-        $ACTION['phrase']='spell,abcdef';
-
-        $ACTION['javascript']="somethingcool.js";
-        $ACTION['bridge']="sofia/external/".$_POST['destination_number']."@myprovider.tld";
+        // simulate a database query for the dialplan
+        $ACTION[]=Array('answer','');
+        $ACTION[]=Array('phrase','spell,abcdef');
+        $ACTION[]=Array('javascript','somethingcool.js');
+        $ACTION[]=Array('bridge','sofia/external/$_POST[destination_number]@myprovider.tld');
         $smarty->assign('ACTION',$ACTION);
 
     } // end - they were logged in

Modified: freeswitch/trunk/scripts/contrib/trixter/xml-curl/templates/switch1/dialplan/frompstn.tpl
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-curl/templates/switch1/dialplan/frompstn.tpl	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-curl/templates/switch1/dialplan/frompstn.tpl	Sun Jul  8 16:03:23 2007
@@ -5,7 +5,7 @@
       <extension name="myextension">
       <condition field="destination_number" expression="^.*$">
 {foreach key=k item=v from=$ACTION}
-          <action application="{$k}" data="{$v}"/>
+          <action application="{$v[0]}" data="{$v[1]}"/>
 {/foreach}
         </condition>
       </extension>



More information about the Freeswitch-svn mailing list