I'm now able to uninitilize my sip setting. So part 1 can be considered completed. However I'm facing problem with part 2.
I cannot register the softphone with my new sip setting. Is there any line missing in this set of codes? Please advise :) sipxInitialize(&g_hInst, 5060, 5060, 0,80000,1); sipxEventListenerAdd(g_hInst, EventCallBack, NULL) ; sipxLineAdd(g_hInst,m_Identity2, &g_hLine); sipxLineAddCredential(g_hLine, m_Username, m_Password2 , m_RealmServer2) ; sipxLineRegister(g_hLine, true); Regards, Zamielia > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Sent: Tuesday, > December 12, 2006 1:32 AM To: > [email protected]; > [EMAIL PROTECTED] Subject: Re: [sipxtapi-dev] > Logout function in SipXtapi > > Objective to achieve : To clear sip setting (realm, > identity,password etc), then initialize back with new sip > setting so that user doesnt have to stop and rerun the > program. > > Been away for few days. Sorry for the late reply. Right > now, i'm developing my own code as i wanted to change the > ezphone layout. Since all the layouts in ezphone are > hardcoded, so i have to start fresh. > > Somehow i cannot use the function in sipXmgr.cpp. Based on > the code in sipXmgr, I executed > > (1.) //Uninitializing sip > setting--------------------------------------------------- > ------------------ ------------------- > sipxEventListenerRemove(g_hInst, EventCallBack, > NULL) ; > sipxLineRemove(g_hLine); > //g_hLine = 0; > > if(sipxUnInitialize(g_hInst) != SIPX_RESULT_SUCCESS) > { > sipxUnInitialize(g_hInst, true); > } > > -once code is executed, if i try to make call, it prompted > assertion failure related to phLine!=NULL > > (2.) // initialize sipx TAPI-like > API------------------------------------------------------- > ------------------ ----------------------- > sipxInitialize(&g_hInst, 5060, 5060, 0,80000,1); > sipxEventListenerAdd(g_hInst, EventCallBack, NULL) ; > sipxLineAdd(g_hInst,m_Identity2, &g_hLine); > sipxLineAddCredential(g_hLine, m_Username, m_Password2 > , m_RealmServer2) ; > sipxLineRegister(g_hLine, true); > > -once the code is executed right after i executed code in > (1.), when i tried to make a call, nothing happen. i > checked at ethereal result. when call is made after > executing item (2.), the response that i got is 401 > unauthorized error. > > Hope you can help me in rectifying this problem. I'm new > to telephony stuff, sorry for any inconveniences caused :) > > Regards, > Zamielia > > ---------------------------------------------------------- _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
