Hi Suryaveer,
I understand that the reponse is sent to the via header address and
the via on |NOTIFY| msg is of the presence server then why the
response is sent to dispatcher?
Your understanding is correct in terms what RFC3261 requires. However,
SIPp does not follow these rules automatically - after all, it is a test
tool, so you want to be able to test various "what if this is incorrect"
scenarios.
Therefore, SIPp sends all messages of a given call to the same IP
address and port until you use the |<setdest>| action to change that for
that particular call. The initial values common for all calls are given
at the command line.
So before sending the first |200| to the |NOTIFY|, you have to use
|<setdest>| to change the peer's address and port. The manual recommends
not to use |<setdest>| too often because it is a resource-expensive
operation, so I would do something like
|<nop hide="true" condexec="setdest_done" condexec_inverse="true">||
|| <action>||
|| <setdest host="[$host]" port="[$port]" protocol="[$transport]"/>||
|| <assignstr assign_to="setdest_done" value="any_string" />||
|| </action>||
||</nop>||
|
between receiving the |NOTIFY| (from which you may eventually extract
the host and port using |<ereg>| necessary) and sending the |200| to it.
P.
Dne 18.10.2016 v 7:22 Suryaveer Chauhan napsal(a):
Hi,
I have a simple presence test setup as below:
Sipp --> opensips_dispatcher --> opensips_presence_server
The SUBSCRIBE request and its 200 response pass thru dispatcher while
the NOTIFY goes directly to the Sipp.
The problem is, the 200 OK response to NOTIFY is sent to dispatcher
instead of the presence server, the dispatcher rejects the response as
it does not finds any transaction for it.
I understand that the reponse is sent to the via header address and
the via on NOTIFY msg is of the presence server then why the response
is sent to dispatcher?
Below is the command I used:
*./sipp 172.17.0.6 -sf ../SubscribeNotify.xml -m 1 -i 172.17.0.5*
*
*
and the used scenario file:
*
*
-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="subscribe">
<send start_rtd="1">
<![CDATA[
SUBSCRIBE sip:[service]-[call_number]@opensipstest.org
<http://opensipstest.org> SIP/2.0
Via: SIP/2.0/[transport]
[local_ip]:[local_port];branch=[branch];rport
Max-Forwards: 20
From: <sip:[service]@opensipstest.org
<http://opensipstest.org>>;tag=[call_number]
To: <sip:[service]-[call_number]@opensipstest.org:[remote_port]>
Call-ID: [call_id]
CSeq: 1 SUBSCRIBE
Contact:
<sip:[service]@[local_ip]:[local_port];transport=[transport]>
Expires: 3600
Accept: multipart/related, application/rlmi+xml,
application/pidf+xml
Event: presence
Content-Length: 0
User-Agent: Sipp v1.1-TLS, version 20061124
Supporte: path
]]>
</send>
<recv response="200">
</recv>
<recv request="NOTIFY" rtd="1">
</recv>
<send crlf="true">
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: Sipp v1.1-TLS, version 20061124
Content-Length: 0
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 200"/>
-------------------------------------------------------------------------------------------------
If required I can provide pcap too.
Please help me understand the issue.
Thanks & Regards,
Suryaveer Singh Chauhan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users