mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
* Revert "Update dial.js (#1243)"
This reverts commit 259dedcded.
* add to .gitignore
* when we receive a REFER on the parent leg, after adulting the child the dial task in the parent session should end
117 lines
3.0 KiB
XML
117 lines
3.0 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
<!DOCTYPE scenario SYSTEM "sipp.dtd">
|
|
|
|
<scenario name="UAS that accepts call and sends REFER">
|
|
<!-- Receive incoming INVITE -->
|
|
<recv request="INVITE" crlf="true">
|
|
<action>
|
|
<ereg regexp=".*" search_in="hdr" header="Subject:" assign_to="1" />
|
|
<ereg regexp=".*" search_in="hdr" header="From:" assign_to="2" />
|
|
</action>
|
|
</recv>
|
|
|
|
<!-- Send 180 Ringing -->
|
|
<send>
|
|
<![CDATA[
|
|
SIP/2.0 180 Ringing
|
|
[last_Via:]
|
|
[last_From:]
|
|
[last_To:];tag=[pid]SIPpTag01[call_number]
|
|
[last_Call-ID:]
|
|
[last_CSeq:]
|
|
[last_Record-Route:]
|
|
Subject:[$1]
|
|
Content-Length: 0
|
|
]]>
|
|
</send>
|
|
|
|
<!-- Send 200 OK with SDP -->
|
|
<send>
|
|
<![CDATA[
|
|
SIP/2.0 200 OK
|
|
[last_Via:]
|
|
[last_From:]
|
|
[last_To:];tag=[pid]SIPpTag01[call_number]
|
|
[last_Call-ID:]
|
|
[last_CSeq:]
|
|
[last_Record-Route:]
|
|
Subject:[$1]
|
|
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
|
|
Content-Type: application/sdp
|
|
Content-Length: [len]
|
|
|
|
v=0
|
|
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
|
|
s=-
|
|
c=IN IP[media_ip_type] [media_ip]
|
|
t=0 0
|
|
m=audio [media_port] RTP/AVP 0
|
|
a=rtpmap:0 PCMU/8000
|
|
]]>
|
|
</send>
|
|
|
|
<recv request="ACK" rtd="true" crlf="true">
|
|
<action>
|
|
<!-- Check if this is NOT the first call (tag ends with 012 or higher) -->
|
|
<ereg regexp="tag=1SIPpTag01[2-9]" search_in="hdr" header="To:" assign_to="3" />
|
|
<log message="Not first call check result: [$3]"/>
|
|
</action>
|
|
</recv>
|
|
|
|
<!-- Skip REFER if we found a non-first call tag -->
|
|
<nop next="skip_refer" test="3" value="" compare="not_equal">
|
|
<action>
|
|
<log message="Found non-first call tag [$3], skipping REFER"/>
|
|
</action>
|
|
</nop>
|
|
|
|
<!-- Wait a moment, then send REFER (only on first call) -->
|
|
<pause milliseconds="1000"/>
|
|
|
|
<nop>
|
|
<action>
|
|
<log message="Sending REFER for first call"/>
|
|
</action>
|
|
</nop>
|
|
|
|
<!-- Send REFER (only on first iteration) -->
|
|
<send retrans="500">
|
|
<![CDATA[
|
|
REFER sip:service@[remote_ip]:[remote_port] SIP/2.0
|
|
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
|
|
From: <sip:[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
|
|
To: [$2]
|
|
[last_Call-ID:]
|
|
CSeq: 2 REFER
|
|
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
|
|
Max-Forwards: 70
|
|
X-Call-Number: [call_number]
|
|
Refer-To: <sip:+15551234567@example.com>
|
|
Referred-By: <sip:[local_ip]:[local_port]>
|
|
Content-Length: 0
|
|
]]>
|
|
</send>
|
|
|
|
<!-- Expect 202 Accepted (only on first iteration) -->
|
|
<recv response="202"/>
|
|
|
|
<label id="skip_refer"/>
|
|
|
|
<!-- Wait for BYE from feature server -->
|
|
<recv request="BYE"/>
|
|
|
|
<!-- Send 200 OK to BYE -->
|
|
<send>
|
|
<![CDATA[
|
|
SIP/2.0 200 OK
|
|
[last_Via:]
|
|
[last_From:]
|
|
[last_To:]
|
|
[last_Call-ID:]
|
|
[last_CSeq:]
|
|
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
|
|
Content-Length: 0
|
|
]]>
|
|
</send>
|
|
|
|
</scenario> |