Simply adding this -m 1 flag kept SIPp from sending over and over SIP
Registration request.

Thank you very much, Pavel, for spotting this !


Le jeu. 25 oct. 2018 à 20:26, Šindelka Pavel <sinde...@ttc.cz> a écrit :

> This time the -m 1 is missing on your command line, so sipp sends new
> "calls" (actually, runs the scenario with new Call-ID values) without any
> limit.
>
> P.
>
> Dne 25.10.2018 v 18:25 Olivier napsal(a):
>
> Thanks Pavel for replying.
>
> Thanks to your advice, I restarted all over, using another Asterisk client
> instance as a guide to a canonical REGISTER dialog.
> When I got a successful REGISTER dialog between 2 Asterisk instances, I
> stopped Asterisk on client host and used SIPp instead.
> I progressed step by step to the point I saw my Asterisk server replying
> with a 200OK to the REGISTER !
>
> I'm very happy with this result but the issue is that this REGISTER dialog
> is repeated many times while I would like to play it only once.
> How can I do that ?
>
>
> SIPp is invoked with:
> sipp 192.168.64.46:5062 -sf /home/foobar/my-uac-auth.xml -ap passsipp -s
> sipp -i 192.168.64.45 -p 5062
>
>
> My /home/foobar/my-uac-auth.xml
> file is now:
>
> <scenario name="Basic Sipstone UAC">
>   <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
>   <!-- generated by sipp. To do so, use [call_id] keyword.
> -->
>
>
>   <send retrans="500">
>     <![CDATA[
>
>       REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
>       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
>       From: <sip:[service]@[remote_ip]>;tag=[pid]SIPpTag00[call_number]
>       To: <sip:[service]@[remote_ip]>
>       Call-ID: [call_id]
>       CSeq: 1 REGISTER
>       Contact: <sip:s@[local_ip]:[local_port]>
>       Max-Forwards: 70
>       Subject: Performance Test
>       Content-Type: application/sdp
>       Content-Length: [len]
>     ]]>
>   </send>
>
>   <recv response="200"
>         optional="true"
>         next="auth_done">
>   </recv>
>
>   <recv response="401"
>         auth="true">
>   </recv>
>
>   <send retrans="500">
>     <![CDATA[
>
>       REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
>       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
>       From: <sip:[service]@[remote_ip]>;tag=[pid]SIPpTag00[call_number]
>       To: <sip:[service]@[remote_ip]>
>       Call-ID: [call_id]
>       CSeq: 1 REGISTER
>       Contact: <sip:s@[local_ip]:[local_port]>
>       Max-Forwards: 70
>       [authentication username=sipp password=passsipp]
>       Subject: Performance Test
>       Content-Type: application/sdp
>       Content-Length: [len]
>     ]]>
>   </send>
>
>   <recv response="200">
>   </recv>
>
>   <label id="auth_done" />
>
>   <pause milliseconds="5000"/>
>
> </scenario>
>
>
> Here is a trace of corresponding REGISTER dialog (captured on Asterisk and
> received on SIPp host):
>
> <--- SIP read from UDP:192.168.64.45:5062 --->
> REGISTER sip:192.168.64.46:5062 SIP/2.0
> Via: SIP/2.0/UDP 192.168.64.45:5062;branch=z9hG4bK-19512-22-0
> From: <sip:sipp@192.168.64.46>;tag=19512SIPpTag0022
> To: <sip:sipp@192.168.64.46>
> Call-ID: 22-19512@192.168.64.45
> CSeq: 1 REGISTER
> Contact: <sip:s@192.168.64.45:5062>
> Max-Forwards: 70
> Subject: Performance Test
> Content-Type: application/sdp
> Content-Length: 0
>
> <------------->
> --- (11 headers 0 lines) ---
> Sending to 192.168.64.45:5062 (no NAT)
> Sending to 192.168.64.45:5062 (no NAT)
>
> <--- Transmitting (no NAT) to 192.168.64.45:5062 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 192.168.64.45:5062
> ;branch=z9hG4bK-19512-22-0;received=192.168.64.45
> From: <sip:sipp@192.168.64.46>;tag=19512SIPpTag0022
> To: <sip:sipp@192.168.64.46>;tag=as41ad7250
> Call-ID: 22-19512@192.168.64.45
> CSeq: 1 REGISTER
> Server: Asterisk PBX 13.23.1~dfsg-1
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH, MESSAGE
> Supported: replaces, timer
> WWW-Authenticate: Digest algorithm=MD5, realm="canonical", nonce="3386ce74"
> Content-Length: 0
>
>
> <------------>
> Scheduling destruction of SIP dialog '22-19512@192.168.64.45' in 32000 ms
> (Method: REGISTER)
>
> <--- SIP read from UDP:192.168.64.45:5062 --->
> REGISTER sip:192.168.64.46:5062 SIP/2.0
> Via: SIP/2.0/UDP 192.168.64.45:5062;branch=z9hG4bK-19512-22-3
> From: <sip:sipp@192.168.64.46>;tag=19512SIPpTag0022
> To: <sip:sipp@192.168.64.46>
> Call-ID: 22-19512@192.168.64.45
> CSeq: 1 REGISTER
> Contact: <sip:s@192.168.64.45:5062>
> Max-Forwards: 70
> Authorization: Digest username="sipp",realm="canonical",uri="sip:
> 192.168.64.46:5062
> ",nonce="3386ce74",response="b0388098db7f3fd69dbd4c8a030d8d28",algorithm=MD5
> Subject: Performance Test
> Content-Type: application/sdp
> Content-Length: 0
>
> <------------->
> --- (12 headers 0 lines) ---
> Sending to 192.168.64.45:5062 (no NAT)
>
> <--- Transmitting (no NAT) to 192.168.64.45:5062 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 192.168.64.45:5062
> ;branch=z9hG4bK-19512-22-3;received=192.168.64.45
> From: <sip:sipp@192.168.64.46>;tag=19512SIPpTag0022
> To: <sip:sipp@192.168.64.46>;tag=as41ad7250
> Call-ID: 22-19512@192.168.64.45
> CSeq: 1 REGISTER
> Server: Asterisk PBX 13.23.1~dfsg-1
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Expires: 120
> Contact: <sip:s@192.168.64.45:5062>;expires=120
> Date: Thu, 25 Oct 2018 16:08:24 GMT
> Content-Length: 0
>
>
>
> Any clue ?
>
> Le jeu. 25 oct. 2018 à 13:26, Šindelka Pavel <sinde...@ttc.cz> a écrit :
>
>> Hi Olivier,
>>
>> looking at your command line with -m=1 and at the scenario, I suppose
>> that the repeated REGISTER requests without the authentication header you
>> can see are retransmissions of the initial one, implying that the sipp
>> machine/process does not receive the responses from the Asterisk.
>>
>> This can have a number of reasons:
>>
>>    - wrong population of the headers in the messages generated from the
>>    scenario (should not be the case as you've specified -i on the
>>    command line)
>>    - routing issue (unlikely unless you've intentionally split
>>    192.168.64.0/24 into several subnets or misconfigured the network
>>    mask on either machine unintentionally)
>>    - Asterisk configuration issue (not permitting incoming registrations
>>    from this address/subnet)
>>    - firewall issue on either machine
>>
>> So SIPp logs, Asterisk logs, and tcpdump/Wireshark are your best friends.
>> See whether the REGISTER arrives to the Asterisk, what is its contents, and
>> whether the Asterisk responds at all and where it sends the responses.
>>
>> Pavel
>>
>> Dne 25.10.2018 v 11:17 Olivier napsal(a):
>>
>> Hello,
>>
>> I'm quite new to SIPp.
>> I've just discovered [1].
>> I'm testing this uac-auth.xml file with the bellow command against an
>> Asterisk instance:
>>
>> sipp -sf uac-auth.xml 192.168.64.250 -au 7005 -ap 7005 -s 7005 -i
>> 192.168.64.45 -m 1
>>
>> I see that Asterisk challenges incoming REGISTER with a WWW-Authenticate
>> but SIPp does not reply with any new REGISTER with an Authorization header.
>> Instead, it keeps sending first REGISTER.
>>
>> 1. Am I correct to expect, with referenced uac-auth.xml, SIPp to send a
>> REGISTER with an Authorization header ?
>>
>> 2. If negative, what should be changed to in uac-auth.xml to implement
>> this ? If positive, is it correct to expect [authentication] lines in a
>> REGISTER to be replaced with an Authorization built with data coming from
>> matching 401 reply (nonce, realm, ...) ?
>>
>> Best regards
>>
>> [1] https://github.com/rkday/sipp-samples/blob/master/uac-auth.xml
>>
>>
>>
>>
>> _______________________________________________
>> Sipp-users mailing 
>> listSipp-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sipp-users
>>
>>
>> _______________________________________________
>> Sipp-users mailing list
>> Sipp-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sipp-users
>>
>
>
>
>
> _______________________________________________
> Sipp-users mailing 
> listSipp-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sipp-users
>
>
> _______________________________________________
> Sipp-users mailing list
> Sipp-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to