pjsip freeze problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>  However, I notice that for besides 408 and 503 final responses (which 
>> the
>>  stack generates when network/proxy connectivity is an issue), pjsip 
>> seems to
>>  freeze (high CPU usage). The 2 cases I noticed were for final responses 
>> 404
>>  and 401 (when credentials are not proper).
>
> I don't think I've ever heard any reports similar to this, and I just
> tried with simulating REGISTER timeout with pjsua, the freeze didn't
> happen either. So for now I tend to think it must have something to do
> with your code. What if you remove your timer, does it still freeze?

I will show you what I did. This is what I added in function tsx_callback() 
in sip_reg.c

if(tsx->status_code/200 == 2)
{
    //do something
}
else
{
    rdata = (event->body.tsx_state.type==PJSIP_EVENT_RX_MSG) ?
        event->body.tsx_state.src.rdata : NULL;

    //added - Start
    pj_time_val delay = { DEFAULT_RETRY_TIME, 0 };
    regc->timer.cb = &regc_refresh_timer_cb;
    regc->timer.id = REFRESH_TIMER;
    regc->timer.user_data = regc;
    if (pjsip_endpt_schedule_timer( regc->endpt, &regc->timer, &delay) != 
PJ_SUCCESS)
    {
        PJ_LOG(5,(THIS_FILE, "pjsip_endpt_schedule_timer FAILED!!"));
    }
    pj_gettimeofday(&regc->last_reg);
    regc->next_reg = regc->last_reg;
    regc->next_reg.sec += delay.sec;
    //added - End
}

>From what I have seen, with this code pjsip freezes when I get a 404 for 
REGISTER (at the 2nd retry).

Hope you can reproduce it.

Thanks,
Anshuman




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux