先看一段简单的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为true之后,如果呼叫用户1001失败,fs会继续执行,也就是先打印日志,再呼叫用户1002
反之,如果continue_on_fail不为true(默认值),log和bridge这二个app就没有执行的机会了
continue_on_fail这个名字起的不错
当然也可以指定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这二个通道变量