VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
jbr at consiglia.dk Guest
|
Posted: Thu Sep 11, 2008 8:16 am Post subject: [Freeswitch-users] Possible to use fresh channelvariables in |
|
|
I have tried this:
<condition field="${SHOWANUMBER}"
expression="^(2015[0-9][0-9][0-9][0-9])$">
<action application="eval" data="ACTION=${SHOWANUMBER}"/>
<anti-action application="eval"
data="ANTI_ACTION=${SHOWANUMBER}"/>
</condition>
It runs through the conditions, but the channel variable SHOWANUMBER is
not initiated at that time. When it comes to the code above, it chooses
the anti-action. It looks as if the condition-mechanism cannot be used
if the channel variable is not defined when the system goes through the
conditions in the first run? Are there any alternative ways - except for
using a script language?
Thanks, Jon
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Thu Sep 11, 2008 8:35 am Post subject: [Freeswitch-users] Possible to use fresh channelvariables in |
|
|
You'll need to use execute_extension
<action application="execute_extension" data="eval_data XML features"/>
Then in extension eval_data you'll have it... but you do realize that
you can just: <action application="eval" data="Number: $1"/>
So you have that data from the regular expression capture.
FreeSWITCH doesn't traverse the dialplan in realtime. Its done once
at the start of the call and all the actions are put into a todo list
so to speak and the session is sent into the state machine never to
return unless you transfer it back to the dialplan for any reason. ie
execute_extension, transfer, uuid_transfer and so on.
/b
On Sep 11, 2008, at 8:13 AM, Jon Bruel wrote:
Quote: | <condition field="${SHOWANUMBER}"
expression="^(2015[0-9][0-9][0-9][0-9])$">
<action application="eval" data="ACTION=${SHOWANUMBER}"/>
<anti-action application="eval"
data="ANTI_ACTION=${SHOWANUMBER}"/>
</condition>
|
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|