Hello All,
I keep getting this error -
Variable $dialog_id is set but never checked, most likely indicating an
error. If this was the intended behaviour, you may use the <trim> action to
reference the variable a second time..
The objective of using the $dialog_id is to increment it each time a new
call arrives.
I am not sure, how to use <trim> action in my script.
Please provide some example on using <trim> action in script.
I have attached my script above for your reference.
Thanks,
Anjana
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="Example of how to have a multipe branch point like an if/elsif/else structure" parameters="-aa -mc" xmlns:xi="http://www.w3.org/2001/XInclude">
<label id="1"/>
<!-- It is the "next" keyword that determines where the script will go if the described message type is received -->
<recv request="REGISTER" next="10" optional="true" dialog="1"/>
<recv request="SUBSCRIBE" crlf="true" rrs="true" next="A0" optionl="true" dialog="2">
<action>
<ereg regexp=".*" search_in="hdr" header="From:" assign_to="FROM_2" />
<log message="From is [$FROM_2]"/>
<ereg regexp=".*" search_in="hdr" header="To:" assign_to="TO_2" />
<log message="To is [$TO_2]"/>
</action>
</recv>
<label id="10"/> <!-- If a REGISTER was received -->
<send next="1" dialog="1">
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:6667753163@[local_ip]:[local_port];transport=[transport]>
Expires: 3600
Content-Length: 0
]]>
</send>
<label id="B0"/> <!-- If a INVITE was received -->
<xi:include href="./100.xml" dialogs="3"/>
<xi:include href="./180.xml" dialogs="3"/>
<pause milliseconds="1500"/>
<xi:include href="./200.xml" dialogs="3"/>
<recv request="ACK" dialog="3"/>
<recv request="BYE" dialog="3"/>
<xi:include href="./200.xml" dialogs="3"/>
<label id="A0"/> <!-- If a SUBSCRIBE was received -->
<send next="30" dialog="2">
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[call_number]
[last_Call-ID:]
[last_CSeq:]
Event: dialog
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Expires: 3600
Content-Length: 0
]]>
</send>
<label id="30"/>
<send dialog="2">
<![CDATA[
NOTIFY sip:6667753163@[local_ip] SIP/2.0
Via:SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
To:[$FROM_2]
From:[$TO_2]
[last_Call-ID:]
CSeq: 10 NOTIFY
Event: dialog
Require: eventlist
Subscription-State: active; expires=3599
Contact: <sip:private-ac@[local_ip]:[local_port]>
]]>
</send>
<recv response="200" next="A1" dialog="2">
</recv>
<label id="A1"/>
<pause milliseconds="100"/>
<!-- Send a NOTIFY with early state -->
<send dialog="2">
<![CDATA[
NOTIFY sip:6667753163@[local_ip] SIP/2.0
Via:SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
To:[$FROM_2]
From:[$TO_2]
[last_Call-ID:]
CSeq: 15 NOTIFY
Event: dialog
Require: eventlist
Subscription-State: active; expires=3599
Contact: <sip:private-ac@[local_ip]:[local_port]>
Content-Type:application/dialog-info+xml
Content-Length: [len]
<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:private-ac@[local_ip]">
<dialog id="2" call-id="def" local-tag="b-tag" remote-tag="c-tag" direction="receiver">
<state>early</state>
<local><identity display="private-ac">sip:private-ac@[local_ip]</identity><target uri="sip:private-ac@[local_ip]"/></local>
<remote><identity display="C">sip:[email protected]</identity> <target uri="sip:[email protected]"/></remote>
</dialog>
</dialog-info>
]]>
</send>
<recv response="200" next="A2" dialog="2">
</recv>
<label id="A2"/>
<pause milliseconds="1000"/>
<!-- Send a NOTIFY with confirmed state -->
<send dialog="2">
<![CDATA[
NOTIFY sip:6667753163@[local_ip] SIP/2.0
Via:SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
To:[$FROM_2]
From:[$TO_2]
[last_Call-ID:]
CSeq: 20 NOTIFY
Event: dialog
Require: eventlist
Subscription-State: active; expires=3599
Contact: <sip:private-ac@[local_ip]:[local_port]>
Content-Type:application/dialog-info+xml
Content-Length: [len]
<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="1" state="full" entity="sip:private-ac@[local_ip]">
<dialog id="2" call-id="def" local-tag="b-tag" remote-tag="c-tag" direction="receiver">
<state>confirmed</state>
<local><identity display="private-ac">sip:private-ac@[local_ip]</identity></local>
<target uri="sip:private-ac@[local_ip]"/></local>
<remote><identity display="C">sip:[email protected]</identity> <target uri="sip:[email protected]"/></remote>
</dialog>
</dialog-info>
]]>
</send>
<recv response="200" dialog="2"/>
<recv request="INVITE" next="B0" dialog="3"/>
<!-- Definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- Definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users