Sorry please use this script in place of earlier script i have sent.

On Fri, Nov 14, 2014 at 3:58 PM, Anjana Rao <linkanj...@gmail.com> wrote:

> 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";>

<init>
<nop>
<action>
    <trim assign_to="dialog_id" value="4" />
</action>
</nop>
	</init>

<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" next="A0" optionl="true" dialog="2"/>


<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_wSDP.xml"  dialogs="3"/>
<recv request="ACK" dialog="3"/>

<recv request="BYE" dialog="3"/>
<send next="B2" dialog="3">
    <![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>

<recv request="INVITE" next="B1"  dialog="4"/>

<label id="B1"/> <!-- If a INVITE was received -->
<xi:include href="./100.xml" dialogs="4"/>
<xi:include href="./180.xml" dialogs="4"/>
<pause milliseconds="1500"/>
<xi:include href="./200_wSDP.xml"  dialogs="4"/>
<recv request="ACK" dialog="4"/>

<recv request="BYE" dialog="4"/>
<xi:include href="./200.xml"  dialogs="4"/>


<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"/> 
<pause milliseconds="1000"/>
<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 
	[last_From:]
	[last_To:]
	[last_Call-ID:]
	CSeq: 10 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="87134@192.0.2.23" local-tag="0" remote-tag="12345" direction="initiator">
	<state>confirmed</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:li...@acme.com</identity> <target uri="sip:li...@acme.com"/></remote>
	</dialog>
	</dialog-info>
	
	]]>
</send>
  

<recv response="200" dialog="2">
</recv>


<label id="B2"/>
<recv> <request="INVITE" next="B0"  dialog=3 />
</recv>

<!-- 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
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to