[Freeswitch-users] mod_perl multiple bindings

regs at kinetix.gr regs at kinetix.gr
Thu Nov 20 23:41:17 PST 2008


That's great. And how do I pass the parameters when calling the script 
from my dialplan?

e.g.

<action application="perl" data="/root/test_perl.pl" />

Anthony Minessale wrote:
> currently it would entail binding everything to 1 script and detecting 
> which kind of section it
> was in the script.  Making it support many would require some coding 
> which would need to be done in every language module to keep them 
> uniform and we don't have the time for it right now.  you can provide 
> a patch or post a bounty and maybe someone can work on it.
>
> there is a magic env obj created in your script that has all the params
>
> print $env->serialize();
> print $env->serialize("xml");
>
> $info = $env->getHeader("info");
>
>
>
> On Thu, Nov 20, 2008 at 8:34 AM, regs at kinetix.gr 
> <mailto:regs at kinetix.gr> <regs at kinetix.gr <mailto:regs at kinetix.gr>> wrote:
>
>     What if I want to use one binding for "directory", one for
>     "configuration" and one for "dialplan"?
>
>     While we are at it, how can I pass parameters so that I can "fill
>     up" my %XML_REQUEST when
>     the perl script is called from the xml dialplan? e.g. :
>
>     <context name="route">
>             <extension name=default>
>                     <condition field="destination_number"
>     expression="^.*$">
>                             <action application="perl"
>     data="/root/test_perl2.pl" />
>                     </condition>
>             </extension>
>     </context>
>
>
>
>     Anthony Minessale wrote:
>>     no the languages only have one binding.
>>     Do you really need more than one binding?
>>
>>     On Thu, Nov 20, 2008 at 6:20 AM, regs at kinetix.gr
>>     <mailto:regs at kinetix.gr> <regs at kinetix.gr
>>     <mailto:regs at kinetix.gr>> wrote:
>>
>>         Hi,
>>
>>            Is there a way to declare more than one script with its
>>         binding in
>>         perl.conf.xml?
>>         Because from what I understood by reading the documentation,
>>         is that
>>         there are
>>         no different sections to define different perl scripts with
>>         bindings
>>         like for example in the
>>         xml_curl.conf.xml :
>>
>>         <configuration name="xml_curl.conf" description="cURL XML
>>         Gateway">
>>          <bindings>
>>            <binding name="binding1">
>>                ...
>>            </binding>
>>            <binding name="binding2">
>>                ...
>>            </binding>
>>
>>                ...
>>
>>          </bindings>
>>         </configuration>
>>
>>
>>
>>
>>
>>         _______________________________________________
>>         Freeswitch-users mailing list
>>         Freeswitch-users at lists.freeswitch.org
>>         <mailto:Freeswitch-users at lists.freeswitch.org>
>>         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>         UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>         http://www.freeswitch.org
>>
>>
>>
>>
>>     -- 
>>     Anthony Minessale II
>>
>>     FreeSWITCH http://www.freeswitch.org/
>>     ClueCon http://www.cluecon.com/
>>
>>     AIM: anthm
>>     MSN:anthony_minessale at hotmail.com
>>     <mailto:MSN%3Aanthony_minessale at hotmail.com>
>>     GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>>     <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
>>     IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
>>
>>     FreeSWITCH Developer Conference
>>     sip:888 at conference.freeswitch.org
>>     <mailto:sip%3A888 at conference.freeswitch.org>
>>     iax:guest at conference.freeswitch.org/888
>>     <http://iax:guest@conference.freeswitch.org/888>
>>     googletalk:conf+888 at conference.freeswitch.org
>>     <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
>>     pstn:213-799-1400
>>     ------------------------------------------------------------------------
>>     _______________________________________________ Freeswitch-users
>>     mailing list Freeswitch-users at lists.freeswitch.org
>>     <mailto:Freeswitch-users at lists.freeswitch.org>
>>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>     http://www.freeswitch.org
>
>
>     _______________________________________________
>     Freeswitch-users mailing list
>     Freeswitch-users at lists.freeswitch.org
>     <mailto:Freeswitch-users at lists.freeswitch.org>
>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     http://www.freeswitch.org
>
>
>
>
> -- 
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com 
> <mailto:MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com 
> <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org 
> <mailto:sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888 
> <http://iax:guest@conference.freeswitch.org/888>
> googletalk:conf+888 at conference.freeswitch.org 
> <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:213-799-1400
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081121/3fa7d2ba/attachment-0002.html 


More information about the FreeSWITCH-users mailing list