Hello All, Well, I modified my application from nua_set_params(nua, NUTAG_ALLOW_EVENTS("dialog;sla;include-session-description"), TAG_END()); to nua_set_params(nua, NUTAG_ALLOW_EVENTS("dialog"), TAG_END()); nua_set_params(nua, NUTAG_ALLOW_EVENTS("sla"), TAG_END()); nua_set_params(nua, NUTAG_ALLOW_EVENTS("include-session-description"), TAG_END());
Now the sofia-sip does not reject the incoming SUBSCRIBE request with 489. The reason I separated these with semi-colons in the first place is because this is the format that is received from the SIP proxy server. The SIP proxy server vendor says "The "sla" and "include-session-description" are meant to be parameters to the dialog event. However, RFC 3265 doesn't actually allow parameters in the Allow- Events header, so it would be just fine for your phone to ignore the "parameters"" So I guess this can be attributed to the non-standard SIP proxy server. Best Regards, Jerry -----Original Message----- From: Sent: Tuesday, October 30, 2007 3:23 PM To: 'sofia-sip-devel@lists.sourceforge.net' Cc: 'Pekka Pessi'; 'Michael Jerris' Subject: Cannot Set NUTAG_ALLOW_EVENTS() Using nua_set_params() Hello All, I still have had no luck with my nua_set_params() call. For some reason, I cannot set NUTAG_ALLOW_EVENTS() (so that the incoming SUBSCRIBE won't get rejected with 489). I've simplified the test to only set NUTAG_ALLOW_EVENTS("dialog;sla;include-session-description") and nothing else. After that I call nua_get_params(). Please refer to trace output below (I added some printfs in the sofia-sip stack (prefaced by ****)). Here is the code that sets/gets the parameters: nua_set_params(nua, NUTAG_ALLOW_EVENTS("dialog;sla;include-session-description"), TAG_END()); nua_get_params(nua, TAG_ANY(), TAG_END()); Here is the code in the callback that reads the parameters: char const *allowEvents = NULL; tl_gets(tags, NUTAG_ALLOW_EVENTS_REF(allowEvents), TAG_END()); printf("ce_ProcCallback: nua=0x%x, allowEvents=%s\n", (int)nua, allowEvents); Is there any other way to make sofia-sip accept the incoming SUBSCRIBE request? This is the only (and first) case where I have needed to call nua_set_params()/nua_get_params(), so maybe there is something else I must do? Best Regards, Jerry -----------------------------START OF TRACE LOG OUTPUT------------------------------------------------------------Type Summary CE2S su_init() CE2S su_home_init(appl->home=0x745260) CE2S ...su_home_init() returned 0x0 CE2S su_root_create(magic=0x0) CE2S ...su_root_create() returned appl->root=0x796898 CE2S su_root_threading(self=0x796898, enable=0) CE2S ...su_root_threading() returned 0x0 CE2S nua_create(root=0x796898, callback=0x54ecf8, magic=0x77f034, url='sip:206.80.111.17:50001') SOFI nua: nua_create: entering SOFI nua: nua_stack_init: entering SOFI nua: nua_stack_set_params: entering SOFI soa_create("default", 0x7ae950, 0x7ae9e0) called SOFI soa_set_params(static::0x7aedd0, ...) called SOFI nta_agent_create: initialized hash tables SOFI nta_agent_create: initialized transports SOFI nta_agent_create: initialized random identifiers SOFI nta_agent_create: initialized timer SOFI nta_agent_create: initialized resolver SOFI tport_create(): 0x7b00b0 SOFI nta: master transport created SOFI tport_bind_server(0x7b00b0) to */206.80.111.17:50001/sip SOFI tport_bind_server(0x7b00b0): calling tport_listen for udp SOFI tport_alloc_primary(0x7b00b0): new primary tport 0x7b0488 SOFI tport_listen(0x7b0488): listening at udp/206.80.111.17:50001/sip SOFI tport_bind_server(0x7b00b0): calling tport_listen for tcp SOFI tport_alloc_primary(0x7b00b0): new primary tport 0x7b0728 SOFI tport_listen(0x7b0728): listening at tcp/206.80.111.17:50001/sip SOFI nta: bound to (206.80.111.17:50001;transport=*) SOFI nta: agent_init_via: SIP/2.0/udp 206.80.111.17:50001 (sip) SOFI nta: agent_init_via: SIP/2.0/tcp 206.80.111.17:50001 (sip) SOFI nta: Via fields initialized SOFI nta: Contact header created SOFI nua_register: Adding contact URL '206.80.111.17' to list. CE2S ...nua_create() returned mkData[la].pLine->lineH=0x7968c0 CE2S su_root_threading(self=0x796898, enable=0) CE2S ...su_root_threading() returned 0x0 CE2S nua_create(root=0x796898, callback=0x54ecf8, magic=0x77f8e0, url='sip:206.80.111.17:50004') SOFI nua: nua_create: entering SOFI nua: nua_stack_init: entering SOFI nua: nua_stack_set_params: entering SOFI soa_create("default", 0x7b0460, 0x7b1348) called SOFI soa_set_params(static::0x7b1728, ...) called SOFI nta_agent_create: initialized hash tables SOFI nta_agent_create: initialized transports SOFI nta_agent_create: initialized random identifiers SOFI nta_agent_create: initialized timer SOFI nta_agent_create: initialized resolver SOFI tport_create(): 0x7b29f0 SOFI nta: master transport created SOFI tport_bind_server(0x7b29f0) to */206.80.111.17:50004/sip SOFI tport_bind_server(0x7b29f0): calling tport_listen for udp SOFI tport_alloc_primary(0x7b29f0): new primary tport 0x7b2dc8 SOFI tport_listen(0x7b2dc8): listening at udp/206.80.111.17:50004/sip SOFI tport_bind_server(0x7b29f0): calling tport_listen for tcp SOFI tport_alloc_primary(0x7b29f0): new primary tport 0x7b3068 SOFI tport_listen(0x7b3068): listening at tcp/206.80.111.17:50004/sip SOFI nta: bound to (206.80.111.17:50004;transport=*) SOFI nta: agent_init_via: SIP/2.0/udp 206.80.111.17:50004 (sip) SOFI nta: agent_init_via: SIP/2.0/tcp 206.80.111.17:50004 (sip) SOFI nta: Via fields initialized SOFI nta: Contact header created SOFI nua_register: Adding contact URL '206.80.111.17' to list. CE2S ...nua_create() returned mkData[la].pLine->lineH=0x7b10e8 CE2S nua_set_params(nua=0x7968c0, SIPTAG_ALLOW_EVENTS(dialog;sla;include-session-description)) **** nua_set_params: nua=0x7968c0, allowEvents=dialog;sla;include-session-description SOFI nua: nua_set_params: entering **** nua_set_params: AFTER enter, nua=0x7968c0 SOFI nua((nil)): signal r_set_params SOFI nua((nil)): recv r_set_params SOFI nua((nil)): signal r_set_params **** nua_stack_set_params: nua=0x7968c0, nh=0x7ae9e0, allowEvents=dialog;sla;include-session-description SOFI nua: nua_stack_set_params: entering **** nua_stack_set_params: nua=0x7968c0, nh=0x7ae9e0, allow_events=0x0 **** nhp_set_tags: home=0x7efffb98, allowEvents=(null) **** nhp_set_tags: home=0x7efffb98, allowEvents=dialog;sla;include-session-description **** nua_stack_set_params: nua=0x7968c0, tmp->nhp_set_.set_bits.nhb_allow_events=1 **** nua_stack_set_params: nua=0x7968c0, tmp->nhp_allow_events=Ä8{ **** nua_stack_set_params: nua=0x7968c0, nhp->nhp_allow_events=Ä8{ SOFI soa_set_params(static::0x7aedd0, ...) called SOFI nua((nil)): event r_set_params 200 OK SOFI nua: nua_event: entering CESC ce_ProcCallback: Rcvd event for nua=0x7968c0, pMkData=0x77f034, nh=0x0, hmagic=0x0, sip=0x0 CESC nua_r_set_params event: 200 OK (pMkData->mk=MK1=lineH=0x7968c0) CESC Discarding Event... SOFI nua: nua_get_params: entering SOFI nua((nil)): signal r_get_params SOFI nua((nil)): recv r_get_params SOFI nua((nil)): signal r_get_params SOFI nua: nua_stack_get_params: entering SOFI soa_get_paramlist(static::0x7aedd0, ...) called **** nua_stack_get_params: nua=0x7968c0, nh=0x7ae9e0, allowEvents=(null) SOFI nua((nil)): event r_get_params 200 OK SOFI nua: nua_event: entering CESC ce_ProcCallback: Rcvd event for nua=0x7968c0, pMkData=0x77f034, nh=0x0, hmagic=0x0, sip=0x0 CESC nua_r_get_params event: 200 OK (pMkData->mk=MK1=lineH=0x7968c0) **** ce_ProcCallback: nua=0x7968c0, allowEvents=(null) -----------------------------END OF TRACE LOG OUTPUT------------------------------------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel