[pjsip] Impossible to register when you receive message 500

Benny Prijono bennylp at pjsip.org
Fri May 16 03:07:03 EDT 2008


On Fri, May 16, 2008 at 1:30 AM, Samuel Vinson <samuelv at laposte.net> wrote:
> Hi,
>
>  Thanks Benny to resolve the syntax error exception in message 500
>  Registering glare condition.
>
>  But now I have a new problem. Schema 1 is normal process, and schema 2
>  describes erroneous process. The last number is expiration delay.
>
>  1/ When I register my SIP account to server, the system uses two
>  CALL-ID, because there is an IP address change detected. The normal
>  exchange is presented below:
>
>   client              server
>      | register,id1,1800 |
>      |------------------>|
>      | 401,id1           |
>      |<------------------|
>      | register,id1,1800 |
>      |------------------>|
>      | 200,id1,1800      |
>      |<------------------|
>      |                   | IP address change detected
>      |                   | Updating registration
>      | register,id1,0    |
>      |------------------>|
>      | register,id2,1800 |
>      |------------------>|
>      | 401,id1           |
>      |<------------------|
>      | register,id1,0    |
>      |------------------>|
>      | 401,id2           |
>      |<------------------|
>      | register,id2,1800 |
>      |------------------>|
>      | 200,id1,0         |
>      |<------------------|
>      | 200,id2,1800      |
>      |<------------------|
>
>  2/ Sometimes register step for id2 comes before unregister step for id1.
>  PjSip receive the error message 500, but it never retry after delay.
>  So the account is never registered :-(
>
>   client              server
>      | register,id1,1800 |
>      |------------------>|
>      | 401,id1           |
>      |<------------------|
>      | register,id1,1800 |
>      |------------------>|
>      | 200,id1,1800      |
>      |<------------------|
>      |                   | IP address change detected
>      |                   | Updating registration
>      | register,id1,0    |
>      |------------------>|
>      | register,id2,1800 |
>      |------------------>|
>      | 401,id1           |
>      |<------------------|
>      | register,id1,0    |
>      |------------------>|
>      | 401,id2           |
>      |<------------------|
>      | register,id2,1800 |
>      |------------------>|
>      | 500,id2           |500 Registering glare condition
>      |                   |Already Pending Register
>      |                   |Retry after 'delay'
>      |<------------------|
>      | 200,id1,0         |
>      |<------------------|
>
>  - So I think there is bug when new call-id comes before unregister old
>  call-id, isn't it ? Maybe, application should manage this situation and
>  tries re-register after delay ?
>

Normally this scenario should work okay, the registrar should treat
this as normal multiple registrations (that is, the same AOR is
registered by more than one user agents), delete the binding of the
old call-id and add new binding for the new call-id. Unless of course
if the registrar doesn't support multiple registrations. What server
is this?

>  - Why when IP address change detected you need to create a new call-id,
>  and you can't use same with new ip ?
>

It's because currently our registration client session doesn't support
updating binding. But I can add this as I'm currently modifying it for
other purpose (see "re: [pjsip] Parsing expires from REGISTER reply"
thread).

Cheers
 Benny

>  Thanks
>
>  Samuel
>




More information about the pjsip mailing list