[Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
Hello, If I add the SIPTAG_P_PREFERRED_IDENTITY() tag to my nua_invite(), then I get a "900 NUA Internal Error" generated after the second call to sip_add_tagis() function in the nua_client_init_request() function of libsofia-sip-ua/nua/nua_stack.c. Do you know why? Is there something special I need to do for this tag? Please see logging extract below: [2]nua_handle(nua=0x824fe8, hmagic=0x7de4d4, url=sip:[EMAIL PROTECTED]:14060) nua: nh_create_handle: entering ...[2]nua_handle() returned nh=0x83f4c8 nua_invite(nh=0x83f4c8, SIPTAG_FROM("" ), SIPTAG_TO(sip:[EMAIL PROTECTED]:14060), SIPTAG_P_PREFERRED_IDENTITY(sip:[EMAIL PROTECTED]), SOATAG_USER_SDP(...)): o=TC 0 0 IN IP4 192.168.72.150 s=session c=IN IP4 192.168.72.150 m=audio 1760 RTP/AVP 0 18 4 101 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=rtpmap:4 G723/8000 a=rtpmap:101 telephone-event/8000/1 nua: nua_invite: entering nua(0x83f4c8): signal r_invite nua(0x83f4c8): signal r_invite nua: nua_stack_set_params: entering soa_clone(static::0x825640, 0x822f08, 0x83f4c8) called soa_set_params(static::0x82f630, ...) called soa_set_user_sdp(static::0x82f630, (nil), 0x82f55e, -1) called soa_set_capability_sdp(static::0x82f630, (nil), 0x82f55e, -1) called su_localinfo: if lo with index 1 su_localinfo: if esw0 with index 2 nua(0x83f4c8): event r_invite 900 Internal NUA Error (1) at ../../../libsofia-sip-ua/nua/nua_stack.c:2354 nua(0x83f4c8): call state changed: init -> terminated nua(0x83f4c8): event i_state 900 Internal NUA Error (1) at ../../../libsofia-sip-ua/nua/nua_stack.c:2354 nua(0x83f4c8): event i_terminated 900 Internal NUA Error (1) at ../../../libsofia-sip-ua/nua/nua_stack.c:2354 nua: nua_application_event: entering ce_ProcCallback: Rcvd event for nua=0x824fe8, pMkData=0x7de4d4, nh=0x83f4c8, hmagic=0x7de4d4, sip=0x0 nua_r_invite event: 900 Internal NUA Error (1) at ../../../libsofia-sip-ua/nua/nua_stack.c:2354 (pMkData->mk=MK4=lineH=0x824fe8) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
2008/1/18, Jerry Richards <[EMAIL PROTECTED]>: > If I add the SIPTAG_P_PREFERRED_IDENTITY() tag to my nua_invite(), then I > get a "900 NUA Internal Error" generated after the second call to > sip_add_tagis() function in the nua_client_init_request() function of > libsofia-sip-ua/nua/nua_stack.c. Do you know why? Is there something > special I need to do for this tag? Unfortunately there are special hoops you have jump through. You have to call sip_update_default_mclass(sip_extend_mclass(NULL)) after su_init() and before nua_create(). --Pekka -- Pekka.Pessi mail at nokia.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
Hi, If I call "sip_update_default_mclass(sip_extend_mclass(NULL))" during initialization as you mention below, then which field of the (INVITE) sip message (in the NUA callback function) would I find the "Alert-Info" header? Up until now, I have been pulling it out of the "sip->sip_unknown->un_name field", but it looks like that will no longer work? Best Regards, Jerry -Original Message- From: Pekka Pessi [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 11:16 AM To: Jerry Richards Cc: sofia-sip-devel@lists.sourceforge.net Subject: Re: SIPTAG_P_PREFERRED_IDENTITY() 2008/1/18, Jerry Richards <[EMAIL PROTECTED]>: > If I add the SIPTAG_P_PREFERRED_IDENTITY() tag to my nua_invite(), > then I get a "900 NUA Internal Error" generated after the second call > to > sip_add_tagis() function in the nua_client_init_request() function of > libsofia-sip-ua/nua/nua_stack.c. Do you know why? Is there something > special I need to do for this tag? Unfortunately there are special hoops you have jump through. You have to call sip_update_default_mclass(sip_extend_mclass(NULL)) after su_init() and before nua_create(). --Pekka -- Pekka.Pessi mail at nokia.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
2008/1/22, Jerry Richards <[EMAIL PROTECTED]>: > If I call "sip_update_default_mclass(sip_extend_mclass(NULL))" during > initialization as you mention below, then which field of the (INVITE) sip > message (in the NUA callback function) would I find the "Alert-Info" header? > > Up until now, I have been pulling it out of the "sip->sip_unknown->un_name > field", but it looks like that will no longer work? There is no field, you have to use accessor function sip_alert_info(sip) (which will return pointer to sip_alert_info_t struct). -- Pekka.Pessi mail at nokia.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
Hi, Okay, I added a call to sip_alert_info(sip) in the callback function when I receive the nua_i_invite 100 event. However, the ai_params and ai_url fields of the sip_alert_info_t structured returned from sip_alert_info() is not valid ASCII data (i.e. negative numbers). Is there any other way to get at that data? Or anything else I can try? Best Regards, Jerry -Original Message- From: Pekka Pessi [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 23, 2008 3:43 AM To: Jerry Richards Cc: sofia-sip-devel@lists.sourceforge.net Subject: Re: SIPTAG_P_PREFERRED_IDENTITY() 2008/1/22, Jerry Richards <[EMAIL PROTECTED]>: > If I call "sip_update_default_mclass(sip_extend_mclass(NULL))" during > initialization as you mention below, then which field of the (INVITE) > sip message (in the NUA callback function) would I find the "Alert-Info" header? > > Up until now, I have been pulling it out of the > "sip->sip_unknown->un_name field", but it looks like that will no longer work? There is no field, you have to use accessor function sip_alert_info(sip) (which will return pointer to sip_alert_info_t struct). -- Pekka.Pessi mail at nokia.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] SIPTAG_P_PREFERRED_IDENTITY()
You can access the whole header as: sip_header_as_string(profile->home, (void *) alert_info); ai_url should be a url_t, not ascii data... if you are printfing it as %d it might show as a negative number. ai_params is a msg_param_t * , so a double pointer, its essentially a list of const char *, so to access the first param, you would do **ai_params. Mike On Jan 23, 2008, at 11:54 AM, Jerry Richards wrote: > Hi, > > Okay, I added a call to sip_alert_info(sip) in the callback function > when I > receive the nua_i_invite 100 event. However, the ai_params and ai_url > fields of the sip_alert_info_t structured returned from > sip_alert_info() is > not valid ASCII data (i.e. negative numbers). > > Is there any other way to get at that data? Or anything else I can > try? > > Best Regards, > Jerry > > > -Original Message- > From: Pekka Pessi [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 23, 2008 3:43 AM > To: Jerry Richards > Cc: sofia-sip-devel@lists.sourceforge.net > Subject: Re: SIPTAG_P_PREFERRED_IDENTITY() > > 2008/1/22, Jerry Richards <[EMAIL PROTECTED]>: >> If I call "sip_update_default_mclass(sip_extend_mclass(NULL))" during >> initialization as you mention below, then which field of the (INVITE) >> sip message (in the NUA callback function) would I find the "Alert- >> Info" > header? >> >> Up until now, I have been pulling it out of the >> "sip->sip_unknown->un_name field", but it looks like that will no >> longer > work? > > There is no field, you have to use accessor function > sip_alert_info(sip) (which will return pointer to sip_alert_info_t > struct). > > -- > Pekka.Pessi mail at nokia.com > > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel