In order for the following CCXML statement to work, I
had to add the code listed below to TransValidator.
Otherwise, the transition was never found dispite the
state being set correctly.
The CCXML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ccxml PUBLIC "CCXML/1.0/DTD" "ccxml.dtd" >
<ccxml version="1.0">
<!-- Lets declare our state var -->
<var name="current_state" expr="'init'"/>
<log expr="'I just made a state variable: ' +
current_state"/>
<eventprocessor statevariable="current_state">
<!-- Process the incoming call -->
<transition state="'init'"
event="connection.ALERTING">
<accept/>
</transition>
The change to TransitionValidator around line 38:
vxistring temp;
And the other change around line 41:
elem.GetAttribute( ATTRIBUTE_STATE, temp );
script->EvalScriptToString(temp, matchState);
With those changes the CCXML worked fine.
The debug code I used showed that ATTRIBUTE_STATE was
'init' and the stateVal was init before the change.
Logged In: YES
user_id=263731
i think rightnow, as per the spec, state attribute cannot be
a javascript expression. it must be one or more event names
(static) seperated by space.
However, the actual bug in TransitionValidator is that,
right now it doesnot work with mutiple states seperated by
space. It works only if one state is specified. you can
expect a fix in the next release candidate.
and one more thing. next time you post a bug, please assign
it to phonetik (me) ... so that i will get notified