1002 和 1003 都注册到 FreeSWITCH
dialplan 设置为:
<extension name="test">
<condition field="destination_number" expression="^1003$">
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="disable_q850_reason=true"/>
<action application="bridge" data="user/1003"/>
<action application="set"><![CDATA[sip_rh_Reason=Q.850;cause=47;text="RESOURCE UNAVAILABLE, UNSPECIFIED"]]></action>
<action application="respond" data="503"/>
</condition>
</extension>
现在 1002 呼叫 1003
1003 正常应答,sip 流程跟以前一样
1003 拒绝呼叫,FreeSWITCH 给 1002 的 reply 是:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.1.128;branch=z9hG4bK86d54928a2d8b0366;rport=5060
Max-Forwards: 70
From: <sip:1002@192.168.99.206:5060>;tag=0a21b78827
To: "1003" <sip:1003@192.168.99.206:5060>;tag=1gDDKXHvK2FXS
Call-ID: 954fcfc9
CSeq: 2 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.10.11
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Reason: Q.850;cause=47;text="RESOURCE UNAVAILABLE, UNSPECIFIED"
Content-Length: 0
Remote-Party-ID: "1003" <sip:1003@192.168.99.206>;party=calling;privacy=off;screen=no