First a caveat - I have not looked at this in a while so things may have 
changed. On the other hand I wrote the timeout code originally and it probably 
still works the same way.

 

The problem with optional sequences is that the state machine normally sits at 
the first option, but may move to any of the optional or the final 
(non-optional) line. Hence you need to put the timeout on all the optional 
lines as well as the final (non-optional) line.

 

In your particular case, since you are breaking out of the optional, you could 
probably get away with just putting the timeout on the first optional line.

 

Just to complete the explanation - if you are not jumping out of the optionals, 
then the timeout could vary between the value used and n times that value.

 

Regards,

Peter
 


Date: Fri, 11 Sep 2009 19:12:43 +0530
From: hspah...@gmail.com
To: sipp-users@lists.sourceforge.net
Subject: [Sipp-users] Expecting multiple incoming requests with timeout.

Hi All,

I am trying to design a generator script which after initiating the call, waits 
for an incoming reINVITE or a BYE. At the same time I want to have a timeout & 
then send a BYE message none of these messages arrive.

I tried using the following 2 sequences for the INVITE and BYE after generating 
the call:

SEQUENCE 1: this sequence works for receiving any of these 2 messages but gets 
stuck here; the timeout never fires & the script keeps sitting here. This 
sequence will never send a BYE.
  <recv request="BYE" optional="true" next="5" crlf="true">
  </recv>
  <recv request="INVITE" timeout="15000" ontimeout="4" next="3">
  </recv>

SEQUENCE 2: this sequence works but it will never send out a BYE message.
  <recv request="INVITE" optional="true" next="3">
  </recv>
  <recv request="BYE" optional="true" next="5">
  </recv>

Is there a way to design a script which can wait for 2 incoming messages (out 
of which one would arrive) & if the wait is times-out then scrip should send a 
BYE.

Thanks in Advance.
Harry


_________________________________________________________________
Save time by using Hotmail to access your other email accounts.
http://clk.atdmt.com/UKM/go/167688463/direct/01/
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to