[SR-Users] Problem with MSRP AUTH

Muhammad Shahzad shaheryarkh at gmail.com
Wed Jun 11 19:18:12 CEST 2014


OK, let me upgrade my deployment.

Thank you.


On Wed, Jun 11, 2014 at 7:12 PM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

>  I added an enhancement to print the pointers involved in retrieving the
> method. Can you test with latest master or 4.1 branches from git?
>
> Cheers,
> Daniel
>
>
> On 11/06/14 18:35, Muhammad Shahzad wrote:
>
> Sent logs to private email of yours. Now there don't seem to be any
> parsing error however, method pv_www_authenticate2 still fails with same
> error,
>
>  ERROR: auth [auth_mod.c:690]: pv_www_authenticate2(): failed to get
> method value
>
>  Thank you.
>
>
>
>
> On Wed, Jun 11, 2014 at 5:55 PM, Daniel-Constantin Mierla <
> miconda at gmail.com> wrote:
>
>>  Are those all the log messages? Previously there were parsing errors in
>> the logs you sent to me.
>>
>> Get them with debug=3 in kamailio.cfg.
>>
>> Cheers, Daniel
>>
>>
>> On 11/06/14 17:51, Muhammad Shahzad wrote:
>>
>> Many thanks for your time and help.
>>
>>  I just tried with msrp:// scheme, still get same result,
>>
>>  --
>>      MSRP nv755d8c AUTH
>> To-Path: msrp://ms11.xyz.com
>> From-Path: msrp://xe4a9fqm.invalid:2855/bcuf2gk7co;ws
>> -------nv755d8c$
>>
>>
>>  MSRP nv755d8c 401 Unauthorized
>> To-Path: msrp://xe4a9fqm.invalid:2855/bcuf2gk7co;ws
>> From-Path: msrp://ms11.xyz.com
>> WWW-Authenticate: Digest realm="ms11.xyz.com",
>> nonce="U5h6tVOYeYl9e9/eI5iLI40pB4IJ4i+pE1crsYA="
>> -------nv755d8c$
>>
>>
>>  MSRP 5bn8rwst AUTH
>> To-Path: msrp://ms11.xyz.com
>> From-Path: msrp://xe4a9fqm.invalid:2855/bcuf2gk7co;ws
>> Authorization: Digest username="233100001176", realm="ms11.xyz.com",
>> nonce="U5h6tVOYeYl9e9/eI5iLI40pB4IJ4i+pE1crsYA=", uri="msrp://
>> ms11.xyz.com", response="2e03beb2c438548e91a4a21fb2b68c19"
>> -------5bn8rwst$
>>
>>
>>  MSRP 5bn8rwst 401 Unauthorized
>> To-Path: msrp://xe4a9fqm.invalid:2855/bcuf2gk7co;ws
>> From-Path: msrp://ms11.xyz.com
>> WWW-Authenticate: Digest realm="ms11.xyz.com",
>> nonce="U5h6tVOYeYmtyBVYHDeFOHDsXxftwsG/E1cssoA="
>> -------5bn8rwst$
>>
>>  --
>>
>>  Here are kamailio logs,
>>
>>  --
>> INFO: <script>: WS handshake successful for '/' from 'x.x.x.x:52014' to
>> null
>>  ERROR: auth [auth_mod.c:690]: pv_www_authenticate2(): failed to get
>> method value
>>  INFO: <script>: Generated www authenticate header for MSRP is
>> [WWW-Authenticate: Digest realm="ms11.xyz.com",
>> nonce="U5h6blOYeULQKGB/8QT4j0beeyTp6uzME1chp4A="#015#012]
>>  ERROR: auth [auth_mod.c:690]: pv_www_authenticate2(): failed to get
>> method value
>>  INFO: <script>: Generated www authenticate header for MSRP is
>> [WWW-Authenticate: Digest realm="ms11.xyz.com",
>> nonce="U5h6blOYeUI7nPMjnqlOXlFC0PbX5E71E1ciqIA="#015#012]
>>  INFO: <script>: WebSocket connection from x.x.x.x:52014 has closed
>>  --
>>
>> Thank you.
>>
>>
>>
>>  On Wed, Jun 11, 2014 at 5:36 PM, Daniel-Constantin Mierla <
>> miconda at gmail.com> wrote:
>>
>>>  The MSRP request is brocken, the value of To-Path header is missing
>>> msrp:// scheme, it is like:
>>>
>>> To-Path: ms11.xyz.com
>>>
>>> Should be like:
>>>
>>> To-Path: msrp://ms11.xyz.com
>>>
>>> See also the From-Path for comparison.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 11/06/14 17:16, Daniel-Constantin Mierla wrote:
>>>
>>> Caught by other stuff, I didn't have time to analyze it. On my way right
>>> now...
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 10/06/14 16:22, Muhammad Shahzad wrote:
>>>
>>> Any update? Do you need any additional info?
>>>
>>>  Thank you.
>>>
>>>
>>>
>>>
>>> On Fri, Jun 6, 2014 at 11:29 PM, Muhammad Shahzad <shaheryarkh at gmail.com
>>> > wrote:
>>>
>>>> I have sent you logs to your private email separately, did you get
>>>> them?
>>>>
>>>>  Thank you.
>>>>
>>>>
>>>>
>>>>
>>>>  On Fri, Jun 6, 2014 at 3:48 PM, Muhammad Shahzad <
>>>> shaheryarkh at gmail.com> wrote:
>>>>
>>>>> OK sure. I will provide it tonight.
>>>>>
>>>>>  Thank you.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 6, 2014 at 2:48 PM, Daniel-Constantin Mierla <
>>>>> miconda at gmail.com> wrote:
>>>>>
>>>>>>  In the code I couldn't spot what can be wrong at a quick look.
>>>>>>
>>>>>> Can you send the log messages with debug=3 in kamailio.cfg?
>>>>>>
>>>>>> Cheers,
>>>>>> Daniel
>>>>>>
>>>>>>
>>>>>> On 06/06/14 11:55, Muhammad Shahzad wrote:
>>>>>>
>>>>>> Nope, just WS handshake message,
>>>>>>
>>>>>>  INFO: <script>: WS handshake successful for '/' from
>>>>>> 'x.x.x.x:49509' to null.
>>>>>>
>>>>>>  No warning or error before this for last 100 lines of logs.
>>>>>>
>>>>>>  Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 6, 2014 at 11:01 AM, Daniel-Constantin Mierla <
>>>>>> miconda at gmail.com> wrote:
>>>>>>
>>>>>>>  Hello,
>>>>>>>
>>>>>>> is there any other error message before the one from auth module?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Daniel
>>>>>>>
>>>>>>>
>>>>>>> On 06/06/14 10:50, Muhammad Shahzad wrote:
>>>>>>>
>>>>>>>  Hi,
>>>>>>>
>>>>>>>  I am trying to authentication MSRP connection using the example
>>>>>>> code of msrp event route in module documentation here,
>>>>>>>
>>>>>>>  http://kamailio.org/docs/modules/4.1.x/modules/msrp.html#idp119248
>>>>>>>
>>>>>>>  --
>>>>>>> ...
>>>>>>>   } else if ($msrp(method)=="AUTH") {
>>>>>>> ...
>>>>>>>         if (!pv_www_authenticate("WEBRTC_SIP_REALM", "$var(passwd)",
>>>>>>> "0", "$msrp(method)"))
>>>>>>>         {
>>>>>>>              if (auth_get_www_authenticate("WEBRTC_SIP_REALM", "0",
>>>>>>> "$var(wauth)"))
>>>>>>>             {
>>>>>>>                 xlog("L_INFO", "Generated www authenticate header
>>>>>>> for MSRP is [$var(wauth)] \n");
>>>>>>>                 msrp_reply("401", "Unauthorized", "$var(wauth)");
>>>>>>>             } else {
>>>>>>>                  msrp_reply("500", "Internal Server Error");
>>>>>>>             };
>>>>>>>             exit;
>>>>>>>         };
>>>>>>>  ...
>>>>>>> --
>>>>>>>
>>>>>>>  However i see in logs following error message and authentication
>>>>>>> fails,
>>>>>>>
>>>>>>>  --
>>>>>>> ERROR: auth [auth_mod.c:690]: pv_www_authenticate2(): failed to get
>>>>>>> method value
>>>>>>>  --
>>>>>>>
>>>>>>>  Which is indicates that value of $msrp(method) is null. However,
>>>>>>> as you can see in example code in URL provided above we have an IF
>>>>>>> condition which explicitly checks $msrp(method) == "AUTH".
>>>>>>>
>>>>>>>  For the sake of testing i even replaced the variable with actual
>>>>>>> string value, and still get the same error. So i am guessing it is a bug.
>>>>>>>
>>>>>>>  What do you guys suggest?
>>>>>>>
>>>>>>>  Kamailio: v4.1.3 (i386/linux) 236326
>>>>>>>  MSRP Lib: Crocodile MSRP - v1.0.0
>>>>>>>
>>>>>>>  Thank you.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  _______________________________________________
>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>>> list
>>>>>>> sr-users at lists.sip-router.org
>>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>
>>>
>>> --
>>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>
>>>
>>
>> --
>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140611/d1a8ee58/attachment.html>


More information about the sr-users mailing list