Hi all, I am hitting a dial plan using a command. And the application defined in the dial plan is running successfully with the argument passed. Below is the illustration. *Command* originate sofia/gateway/gizmo1/848458448557 121 *Dial Plan* <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"/> </condition> </extension> My Java program successfully showing me the argument "abcdefgh". Now I want to pass a variable, not a fixed like "abcdefgh", as an argument. How can I do it. Thanks. -- Best, Adeel Ansari http://www.linkedin.com/in/adeelansari
${variable_name} On Wed, Sep 10, 2008 at 4:55 AM, Adeel Ansari <adeel.gnome@gmail.com> wrote:
Hi all,
I am hitting a dial plan using a command. And the application defined in the dial plan is running successfully with the argument passed. Below is the illustration.
*Command* originate sofia/gateway/gizmo1/848458448557 121
*Dial Plan* <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"/> </condition> </extension>
My Java program successfully showing me the argument "abcdefgh". Now I want to pass a variable, not a fixed like "abcdefgh", as an argument. How can I do it.
Thanks.
-- Best, Adeel Ansari
http://www.linkedin.com/in/adeelansari
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@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@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Not getting you. I need to pass a variable/value in *originate* command, then get that in dial_plan, and then pass it to Java program. Now, where to put this thing, ${variable_name}, and how about the variable_value? On Wed, Sep 10, 2008 at 9:10 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
${variable_name}
On Wed, Sep 10, 2008 at 4:55 AM, Adeel Ansari <adeel.gnome@gmail.com>wrote:
Hi all,
I am hitting a dial plan using a command. And the application defined in the dial plan is running successfully with the argument passed. Below is the illustration.
*Command* originate sofia/gateway/gizmo1/848458448557 121
*Dial Plan* <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"/> </condition> </extension>
My Java program successfully showing me the argument "abcdefgh". Now I want to pass a variable, not a fixed like "abcdefgh", as an argument. How can I do it.
Thanks.
-- Best, Adeel Ansari
http://www.linkedin.com/in/adeelansari
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@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@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Best, Adeel Ansari http://www.linkedin.com/in/adeelansari
Is this what you want? On Sep 11, 2008, at 3:56 AM, Adeel Ansari wrote:
Command originate {foo=bar}sofia/gateway/gizmo1/848458448557 121
Dial Plan <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/ freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh ${foo}"/> </condition> </extension>
Brian West sip:brian@freeswitch.org
Yup. Thanks. On Thu, Sep 11, 2008 at 5:40 PM, Brian West <brian@freeswitch.org> wrote:
Is this what you want? On Sep 11, 2008, at 3:56 AM, Adeel Ansari wrote:
*Command* originate {foo=bar}sofia/gateway/gizmo1/848458448557 121
*Dial Plan* <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh ${foo}"/> </condition> </extension>
Brian West sip:brian@freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Best, Adeel Ansari http://www.linkedin.com/in/adeelansari
Can you add <params /> to <action /> ?? something like: <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"> <param name="attr1" value="1 /"> <param name="attr2" value="3 /"> </action> Regards, Gayatri Kulkarni ----- Whenever you find yourself on the side of the majority, it is time to pause and reflect. From: Adeel Ansari Sent: Wednesday, September 10, 2008 2:55 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Passing variable argument in a dial plan Hi all, I am hitting a dial plan using a command. And the application defined in the dial plan is running successfully with the argument passed. Below is the illustration. Command originate sofia/gateway/gizmo1/848458448557 121 Dial Plan <extension name="java_test" continue="true"> <condition field="destination_number" expression="121"> <action application="java" data="/home/adeel/programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"/> </condition> </extension> My Java program successfully showing me the argument "abcdefgh". Now I want to pass a variable, not a fixed like "abcdefgh", as an argument. How can I do it. Thanks. -- Best, Adeel Ansari http://www.linkedin.com/in/adeelansari -------------------------------------------------------------------------------- _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Nope. This should be handled inside mod_java to parse and pass the args into the java env. /b On Sep 10, 2008, at 10:41 PM, Gayatri Kulkarni wrote:
Can you add <params /> to <action /> ??
something like: <action application="java" data="/home/adeel/ programs/freeswitch/scripts/freeswitch.jar net.digitalapps.freeswitch.CallTest abcdefgh"> <param name="attr1" value="1 /"> <param name="attr2" value="3 /"> </action>
Regards, Gayatri Kulkarni
participants (4)
-
Adeel Ansari
-
Anthony Minessale
-
Brian West
-
Gayatri Kulkarni