Check account registration status

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

 



Have you tried this?
pjsua_acc_get_info(acc_id, &acc_info);
return (acc_info.status/100 == 2 && acc_info.expires > 0);

Regards,
nanang

On Sat, Oct 11, 2008 at 9:01 PM, Alexei Kuznetsov <eofster at gmail.com> wrote:
> I've tried it and figured out that when account is unregistered,
> expires == -1. Is it enough to check just this value or there must be
> any additional checks? I'm writing simple isRegistered() function and
> I'm a little stuck. :)
>
> On Fri, Oct 10, 2008 at 7:52 PM, Nanang Izzuddin <nanang at pjsip.org> wrote:
>> Hi,
>>
>> Regarding [un]registration status, perhaps by additional checking if
>> the registration expiration period == 0?
>>
>> Regards,
>> nanang
>>
>> On Fri, Oct 10, 2008 at 6:33 AM, Alexei Kuznetsov <eofster at gmail.com> wrote:
>>> Hello,
>>>
>>> I'm using pjsua-lib. The documentation states that
>>> value zero of the field "status" in pjsua_acc_info structure means
>>> that account is unregistered. However I'm getting 200 after
>>> unregistration call using pjsua_acc_set_registration(). I guess that
>>> this is a success code on unregistering attempt. But is there a way to
>>> figure out reigstration status of the account without knowing previous
>>> calls which can change this status?
>>>
>>> Best regards,
>>>
>>> Alexei
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[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