Hi, I do this and it works just fine for me:
sipxLineRegister (m_hLine, false); m_eventUnregister.Lock (); //Wait for LINESTATE_UNREGISTERED event sipxLineRemove(m_hLine); sipxEventListenerRemove (m_hInst, EventCallbackProc, NULL); sipxUnInitialize (m_hInst); Thanks, Hitesh ----- Original Message ----- From: "zamielia" <[EMAIL PROTECTED]> To: <[email protected]>; <[EMAIL PROTECTED]> Sent: Monday, January 29, 2007 1:52 PM Subject: Re: [sipxtapi-dev] sipxInitialize Problem >I found out that the reason why i keep on failing to > reinitialize my sip credential is because > sipxUnInitialize(g_hInst, true) failed to be executed. > > So if force uninitialize also fail to do the process, how do > i go about it? Please advice. > > Regards, > Zam > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of zamie zamie Sent: Wednesday, January 17, 2007 2:07 AM > To: [email protected]; Nor Zamielia Zainuddin > Subject: [sipxtapi-dev] sipxInitialize Problem > > > > Sorry to bother u ppl with this problem again. But kind of > blank on finding a solution to sort it. > > -Below is the set of line codes that I executed upon > clicking a button. Registration succeeded. > > sipxInitialize(&g_hInst, 5060, 5060, 0,80000,1); > sipxEventListenerAdd(g_hInst, EventCallBack, NULL) ; > sipxLineAdd(g_hInst,"sip:[EMAIL PROTECTED]",&g_hLine); > > sipxLineAddCredential(g_hLine, "301", "1234", "asterisk") ; > sipxLineRegister(g_hLine, true); > > -To remove the registration, I executed the codes below: > > sipxEventListenerRemove(g_hInst, EventCallBack, NULL) ; > sipxLineRemove(g_hLine); > > if(sipxUnInitialize(g_hInst) != SIPX_RESULT_SUCCESS) > { > sipxUnInitialize(g_hInst, true); > } > > -To register back the setting, I executed the same set of > codes. But this action keeps on giving 401 Unauthorized > Error. > > sipxInitialize(&g_hInst, 5060, 5060, 0,80000,1); > sipxEventListenerAdd(g_hInst, EventCallBack, NULL) ; > sipxLineAdd(g_hInst,"sip:[EMAIL PROTECTED]",&g_hLine); > > sipxLineAddCredential(g_hLine, "301", "1234", "asterisk") ; > sipxLineRegister(g_hLine, true); > > > What are the possibilities of me facing the problem? I've > check the credentials,all are correct. > > > > _____ > > TV dinner still cooling? > Check out > <http://us.rd.yahoo.com/evt=49979/*http:/tv.yahoo.com/> > "Tonight's Picks" on Yahoo! TV. > > > > [ATT00003.txt] > _______________________________________________ > sipxtapi-dev mailing list > [email protected] > List Archive: > http://list.sipfoundry.org/archive/sipxtapi-dev/ > > <a > href="/cgi-bin/webmail.cgi/_AVG_certification_.txt?cmd=itemp > art-1170058640.50827&part=3/_AVG_certification_.txt">_AVG_ce > rtification_.txt</a> No virus found in this incoming > message. Checked by AVG Free Edition. > Version: 7.1.410 / Virus Database: 268.16.13/634 - Release > Date: 1/17/2007 > > [Attachment: ATT00003.txt] > [Attachment: _AVG certification_.txt] > -------------------------------------------------------------------------------- > _______________________________________________ > sipxtapi-dev mailing list > [email protected] > List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/ _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
