Hi, I have a need of using last_bridge_hangup cause in a condition statement to activate a second call leg but I can’t get it to work.

The log line prints the correct values of last_bridge_hangup_cause, “NO_ANSWER” , but when I use it in the condition it’s not working and the same if I try to assign it to another variable.

Here is a code snippet I use in the dialplan:

 

     <action application="set" data="hangup_after_bridge=false"/>    

     <action application="bridge" data="sofia/gateway/mygateway_1/1234567"/>

      <action application="log" data="INFO Last bridge hangup ${last_bridge_hangup_cause}"/>

       …. Do some stuff …….

       <condition field="${last_bridge_hangup_cause}" expression="NO_ANSWER">

             <action application="bridge" data="sofia/gateway/ mygateway_2/1234567"/>

        </condition>

 

I would prefer using the dialplan without implementing this in lua if possible.

 

Any help appreciated /Olle