SIP Wrong state

Hi ,I need help to understand this case where Janus responses with this error

{
    "janus": "ack",
    "session_id": 8286593828297388,
    "transaction": "m477s7q3RuySsRBoS3Mc3Wu0sl2RGyBpMAGTHH1y",
    "plugin": "janus.plugin.sip",
    "data":
    {
        "sip": "event",
        "error_code": 447,
        "error": "Wrong state (not registered)"
    }
}

initially, I thought It meant my sip user got unregistered but it seems like I am not getting unregistered because I am not getting the unregistered event first , because I have a function to register as soon as I get the register event . Please can you assist in this regard .

Which request is causing this? Which Janus version?

I at the moment don’t have the request as this happening remotely hard to get this info ,but it seems it is happening after a long time of inactivity but the session is kept alive

"janus": "server_info",
    "transaction": "mRvVbHBD95X",
    "name": "Janus WebRTC Server",
    "version": 1300,
    "version_string": "1.3.0",
    "author": "Meetecho s.r.l.",
    "commit-hash": "dfd86e34112f512b3a15ba6b7b52a3aa01ea347a",
    "compile-time": "Wed Nov 27 11:26:06 UTC 2024"

Also as a question does the SIP plugin re-register automatically as long as the handle is valid ? because there are instances were I see a register event with no transaction id string

I don’t know if Sofia SIP automatically re-registers when the registration expires: IIRC it does, but the plugin itself definitely doesn’t. You may want to monitor the SIP traffic when the expiration is close, and check if you see a new REGISTER.