baresip: REGISTER_OK event missing when un-registering

REGISTER_OK event is produced when ua registers, but not when ua un-registers:

/uareg 1800 0
sip:test@test.tutpro.com: selected for request
registering sip:test@test.tutpro.com with interval 1800 seconds
ua: ua_register sip:test@test.tutpro.com
presence: ua=0x555a1ab9c2c0 got event 0 (REGISTERING)
test@test.tutpro.com: (prio 0) {1/TCP/v4} 200 OK (OpenSIPg SIP Proxy (5.6.0-0b31 (x86_64/linux))) [1 binding]
presence: ua=0x555a1ab9c2c0 got event 1 (REGISTER_OK)
/uareg 0 0
sip:test@test.tutpro.com: selected for request
unregistering sip:test@test.tutpro.com
presence: ua=0x555a1ab9c2c0 got event 3 (UNREGISTERING)

Trace shows that 200 OK is received.

So is it not possible to find out if un-register succeeded. Is this a bug or intentional?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30

Most upvoted comments

Currently function reg_unregister is used only by menu and serreg modules. Would it suffice that in those modules only unregistering is done, not also destruction of register client?

@cspiel1 Thanks for the code. Summer has finally arrived here in the north and I’ll go to high country for 2-3 days. I’ll try your suggestion when I return.