先看一段简单的dialplan:
<action application="set" data="continue_on_fail=true"/>
<action application="bridge" data="user/1001"/>
<action application="log" data="ERR run here"/>
<action application="bridge" data="user/1002"/>
设置了continue_on_fail之后,如果呼叫用户1001失败,会接着execute,先打印日志,再呼叫用户1002
反之,如果不设置continue_on_fail,log和bridge这2个app就没有execute的机会了
当然也可以这样设置,指定hangup cause列表:
<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/>
<action application="bridge" data="user/1001"/>
<action application="log" data="ERR hcause = ${originate_disposition}"/><action application="log" data="ERR sip status code = ${sip_invite_failure_status}"/>
<action application="bridge" data="user/1002"/>
留意originate_disposition和sip_invite_failure_status这二个通道变量