I'm using the on_reg_state2 callback. That will give you additional registration information, specifically code and status. On Tue, Apr 26, 2011 at 7:43 AM, anilgpt <anilgpt at yahoo.com> wrote: > Hi, > > I have compiled a sample application and need to know how to handle > on_reg_state. I need to get information whether the account registration > succeeded or failed. For the purpose, i googled and found that using > pjsua_acc_get_info(...), we can get the status of registration. This is what > i have done.. > > static void on_reg_state(pjsua_acc_id acc_id) > { > PJ_UNUSED_ARG(acc_id); > pjsua_acc_info acc_info; > pj_status_t status; > status = pjsua_acc_get_info(acc_id, &acc_info); > if (status != PJ_SUCCESS) > return; > > MessageBox(NULL,acc_info.status_test.ptr,"Test",MB_OK); > } > > Using the above block, even when registration failed or registration > succeeded, it gives acc_info.status_test.ptr as OK (200) and acc_info.status > gives 200. > > But going through wireshark capture, it gave "200 Auth Failed" for failed > registration and "200 OK" for successful registration. > > So how can i get the actual registration status.. Please, anyone got a > solution. > > Thanks in advance. > > Anil > > _______________________________________________ > 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 > -- -- V. Ogla Sungutay, GUI Programmer www.lyciasoft.com skype:oglasungutay -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110426/8a922d1e/attachment.html>