Skip to content

Registration blocks indefinitely when 401 Unauthorized is received as response to authenticated registration request #18

@sischnei

Description

@sischnei

Using SipPhone.register(...) with wrong credentials results in indefinitely blocking the calling thread and sending infinitely many REGISTER requests, if the other party responds with "401 Unauthorized" instead of "403 Forbidden".

The issue can be reproduced with pjsip on Asterisk 13, trying to register with invalid credentials. See the attached wireshark trace.

I think the solution could be as easy as checking the result of the authenticated registration message, and if it is a "401 Unauthorized" then exit the registration sending loop.

sip_registration_loop.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions