On Fri, Jun 17, 2011 at 9:23 PM, Gauri Kshirsagar <ksh....@gmail.com> wrote:
> Hi,
>
> I am writing a UAS scenario where SIPp expects a REGISTER followed by
> SUBSCRIBE followed by some other messages like PUBLISH and INVITE all with
> different CallIds.
>
>
> UAC SIPp
>
> Regsiter (callid1)
> ------------>
> 200 OK
> <-----------
>
> Subscribe (callid2)
> ---------->
> 200 OK
> <-----------
>
> Attached is the scenario file.
>
> After receving REGISTER request when SIPp gets SUBSCRIBE it complaints with
> the following message
> *Aborting call on unexpected message for Call-Id callid2 : while expecting
> 'REGISTER' (index 0), received 'SUBSCRIBE'.*
>
> Is there a way to handle different messages like REGISTER and SUBSCRIBE
> with different call ids in a single SIPp script? (The script works fine if
> call-id for register and subscribe are same)
>
> One way could be to modify the script as
>
> <recv request="REGISTER|SUBSCRIBE" crlf="true" regexp_match="true">
> </recv>
>
> <send>
> <![CDATA[
>
> SIP/2.0 200 OK
> [last_Via:]
> [last_From:]
> [last_To:];tag=[call_number]
> [last_Call-ID:]
> [last_CSeq:]
> [last_Contact:]
> Content-Length: [len]
>
> ]]>
> </send>
>
> Is there any other or better way since the responses that need to be sent
> might not be same on receiving different messages.
>
Hello,
yes.
just set one of the messages as optional and do a jump to a label that will
handle it.
It would be like this (from memory, check proper syntax):
<recv request="REGISTER" optional="true" next="handle_register"/>
<recv request="SUBSCRIBE" />
<send>
200 OK to SUBSCRIBE
</send>
<nop next="finished"/>
<label id="handle_register".>
<send>
200 OK to REGISTER
</send>
<label id="finished"/>
regards,
takeshi
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users