Hello,
I must be doing something wrong, because it appears that my nua_set_params()
call is not setting the NUTAG_ALLOW or NUTAG_ALLOW_EVENT parameters. Please
refer to trace output below. I call nua_set_params() call and
nua_get_params() in the same thread. In the event handler for both of these
corresponding events I try reading a bunch of parameters (including the ones
I'm interested in: NUTAG_ALLOW and NUTAG_ALLOW_EVENT). In both cases, the
stack returns NULL values (see the trace output).
Here is the code that sets/gets the parameters:
nua_set_params(nua,
NUTAG_ALLOW_EVENTS("dialog;sla;include-session-description"),
NUTAG_ALLOW("SUBSCRIBE"), TAG_END());
char *allowEventsLoc = 0;
char *allowLoc = 0;
nua_get_params(nua, TAG_ANY(), TAG_END());
Here is the code in the callback that reads the parameters:
char const *allowEvents = NULL, *allow = NULL;
tl_gets(tags,
NUTAG_ALLOW_EVENTS_REF(allowEvents),
NUTAG_ALLOW_REF(allow),
TAG_END());
Do you know what I'm doing wrong? I need to set these parameters so that it
accepts an incoming SUBSCRIBE request from the server.
Best Regards,
Jerry
-----------------------------START OF TRACE LOG
OUTPUT------------------------------------------------------------
Type Summary
CE2S su_init()
CE2S su_home_init(appl->home=0x745280)
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=0xpassed
CE2S ...su_root_threading() returned 0x0
CE2S nua_create(root=0x796898, callback=0x54ecf8, magic=0x77f044,
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=0x77f8f0,
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,
NUTAG_ALLOW_EVENTS(dialog;sla;include-session-description),
NUTAG_ALLOW(SUBSCRIBE))
SOFI nua: nua_set_params: entering
SOFI nua((nil)): signal r_set_params
CE2S nua_get_params(nua=0x7968c0, TAG_ANY())
SOFI nua: nua_get_params: entering
SOFI nua((nil)): signal r_get_params
CE2S [2]nua_handle(nua=0x7968c0, hmagic=0x77f044,
url='sip:[EMAIL PROTECTED]:5060')
SOFI nua: nh_create_handle: entering
CE2S ...[2]nua_handle() returned nh=0x7b37e8
CE2S nua_notify(nh=0x7b37e8, SIPTAG_FROM(),
CE2S NUTAG_SUBSTATE(active),
SIPTAG_EVENT(dialog;sla;include-session-description),
CE2S SIPTAG_CONTENT_TYPE(application/dialog-info+xml),
CE2S SIPTAG_PAYLOAD(...)):
CE2S <?xml version="1.0"?>
CE2S <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0"
state="full" entity="sip:[EMAIL PROTECTED]:5060">
CE2S </dialog-info>
SOFI nua: nua_notify: entering
SOFI nua(0x7b37e8): signal r_notify
CE2S [2]nua_handle(nua=0x7968c0, hmagic=0x77f044,
url='sip:[EMAIL PROTECTED]:5060')
SOFI nua: nh_create_handle: entering
CE2S ...[2]nua_handle() returned nh=0x7b3b98
CE2S nua_register(nh=0x7b3b98,
SIPTAG_FROM(sip:[EMAIL PROTECTED]:5060),
SIPTAG_CONTACT(<sip:[EMAIL PROTECTED]:50001>;reg-id=1804289383;+sip.i
nstance="<urn:uuid:c39b0000-4f96-1a00-1000-00048d0000b8>"))
SOFI nua: nua_register: entering
SOFI nua(0x7b3b98): signal r_register
CE2S [2]nua_handle(nua=0x7968c0, hmagic=0x77f044,
url='sip:[EMAIL PROTECTED]:5060')
SOFI nua: nh_create_handle: entering
CE2S ...[2]nua_handle() returned nh=0x7b3f20
CE2S nua_subscribe(nh=0x7b3f20,
CE2S SIPTAG_FROM(sip:[EMAIL PROTECTED]:5060),
SIPTAG_EXPIRES(3600),
CE2S SIPTAG_CONTACT(sip:[EMAIL PROTECTED]:50001),
SIPTAG_EVENT(message-summary),
CE2S SIPTAG_ACCEPT(application/simple-message-summary))
SOFI nua: nua_subscribe: entering
SOFI nua(0x7b3f20): signal r_subscribe
SOFI nua((nil)): recv r_set_params
SOFI nua((nil)): signal r_set_params
SOFI nua: nua_stack_set_params: entering
SOFI soa_set_params(static::0x7aedd0, ...) called
SOFI nua((nil)): event r_set_params 200 OK
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
SOFI nua((nil)): event r_get_params 200 OK
SOFI nua(0x7b37e8): recv r_notify
SOFI nua(0x7b37e8): signal r_notify
SOFI nua: nua_stack_set_params: entering
SOFI soa_clone(static::0x7aedd0, 0x7ae950, 0x7b37e8) called
SOFI soa_set_params(static::0x7b42d8, ...) called
SOFI nta_leg_tcreate(0x7b50b0)
SOFI nua(0x7b37e8): event r_notify 481 Call/Transaction Does Not Exist
SOFI nta_leg_destroy(0x7b50b0)
SOFI nua(0x7b3b98): recv r_register
SOFI nua(0x7b3b98): signal r_register
SOFI nua: nua_stack_set_params: entering
SOFI soa_clone(static::0x7aedd0, 0x7ae950, 0x7b3b98) called
SOFI soa_set_params(static::0x7b3a48, ...) called
SOFI nta_leg_tcreate(0x7b6858)
SOFI nua(0x7b3b98): adding register usage
SOFI nta: selecting scheme sip
SOFI tport(0x7b0488): EXPENSIVE unresolved */206.229.26.61:5060
SOFI tport_tsend(0x7b0488) tpn = */206.229.26.61:5060
SOFI tport_resolve addrinfo = 206.229.26.61:5060
SOFI tport_by_addrinfo(0x7b0488): not found by name */206.229.26.61:5060
SOFI tport_vsend(0x7b0488): 621 bytes of 621 to */206.229.26.61:5060
SOFI tport_vsend returned 621
SOFI nta: sent REGISTER (101441798) to */206.229.26.61:5060
SOFI tport_pend(0x7b0488): pending 0x7b6b48 for udp/206.80.111.17:50001
(already 0)
SOFI nta: timer set to 32000 ms
SOFI nta: timer shortened to 500 ms
SOFI nua(0x7b3f20): recv r_subscribe
SOFI nua(0x7b3f20): signal r_subscribe
SOFI nua: nua_stack_set_params: entering
SOFI soa_clone(static::0x7aedd0, 0x7ae950, 0x7b3f20) called
SOFI soa_set_params(static::0x7b7850, ...) called
SOFI nta_leg_tcreate(0x7b7fc0)
SOFI nua(0x7b3f20): adding subscribe usage with event message-summary
SOFI nta: selecting scheme sip
SOFI tport(0x7b0488): EXPENSIVE unresolved */206.229.26.61:5060
SOFI tport_tsend(0x7b0488) tpn = */206.229.26.61:5060
SOFI tport_resolve addrinfo = 206.229.26.61:5060
SOFI tport_by_addrinfo(0x7b0488): not found by name */206.229.26.61:5060
SOFI tport_vsend(0x7b0488): 618 bytes of 618 to */206.229.26.61:5060
SOFI tport_vsend returned 618
SOFI nta: sent SUBSCRIBE (101441798) to */206.229.26.61:5060
SOFI tport_pend(0x7b0488): pending 0x7b8358 for udp/206.80.111.17:50001
(already 1)
SOFI nua: nua_event: entering
CESC ce_ProcCallback: Rcvd event for nua=0x7968c0, pMkData=0x77f044,
nh=0x0, hmagic=0x0, sip=0x0
CESC nua_r_set_params event: 200 OK (pMkData->mk=MK1=lineH=0x7968c0)
CESC NUTAG_CALLSTATE_REF(tSipStackCallState)='nua_callstate_init'
CESC NUTAG_ACTIVE_AUDIO_REF(audio)=0
CESC NUTAG_ACTIVE_VIDEO_REF(video)=0
CESC NUTAG_ACTIVE_IMAGE_REF(image)=0
CESC NUTAG_ACTIVE_CHAT_REF(chat)=0
CESC NUTAG_OFFER_RECV_REF(offer_recv)=0
CESC NUTAG_ANSWER_RECV_REF(answer_recv)=0
CESC NUTAG_OFFER_SENT_REF(offer_sent)=0
CESC NUTAG_ANSWER_SENT_REF(answer_sent)=0
CESC NUTAG_ALLOW_EVENTS_REF()='(null)'
CESC NUTAG_ALLOW_REF()='(null)'
CESC NUTAG_M_USERNAME_REF()='(null)'
CESC NUTAG_REGISTRAR_REF()='(null)'
CESC NUTAG_MAX_SUBSCRIPTIONS_REF()=0
CESC Discarding Event...
SOFI nua: nua_event: entering
CESC ce_ProcCallback: Rcvd event for nua=0x7968c0, pMkData=0x77f044,
nh=0x0, hmagic=0x0, sip=0x0
CESC nua_r_get_params event: 200 OK (pMkData->mk=MK1=lineH=0x7968c0)
CESC NUTAG_CALLSTATE_REF(tSipStackCallState)='nua_callstate_init'
CESC NUTAG_ACTIVE_AUDIO_REF(audio)=0
CESC NUTAG_ACTIVE_VIDEO_REF(video)=0
CESC NUTAG_ACTIVE_IMAGE_REF(image)=0
CESC NUTAG_ACTIVE_CHAT_REF(chat)=0
CESC NUTAG_OFFER_RECV_REF(offer_recv)=0
CESC NUTAG_ANSWER_RECV_REF(answer_recv)=0
CESC NUTAG_OFFER_SENT_REF(offer_sent)=0
CESC NUTAG_ANSWER_SENT_REF(answer_sent)=0
CESC NUTAG_ALLOW_EVENTS_REF()='(null)'
CESC NUTAG_ALLOW_REF()='(null)'
CESC NUTAG_M_USERNAME_REF()='(null)'
CESC NUTAG_REGISTRAR_REF()='(null)'
CESC NUTAG_MAX_SUBSCRIPTIONS_REF()=20
CESC Discarding Event...
SOFI nua: nua_event: entering
-----------------------------END OF TRACE LOG
OUTPUT------------------------------------------------------------
------------------------------END OF TRACE LOG
OUTPUT--------------------------------------------------------------
-----Original Message-----
From: Michael Jerris [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 27, 2007 10:20 AM
To: Jerry Richards; sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] FW: nua_i_subscribe/nua_notify/nua_r_notify
we use both of these in the set params call, I think the siptag you use
should be equivalent to the NUTAG_ALLOW_EVENTS, but the NUTAG_ALLOW is
probably whats missing.
NUTAG_ALLOW("SUBSCRIBE")
NUTAG_ALLOW_EVENTS("mes sage-summary")
Mike
On 10/26/07, Jerry Richards <[EMAIL PROTECTED]> wrote:
By the way, I am calling nua_set_params() with
SIPTAG_ALLOW_EVENTS_STR("dialog;sla;include-session-description"), which
is
the same as the Event field of the incoming SUBSCRIBE request.
Jerry
-----Original Message-----
From:
Sent: Friday, October 26, 2007 10:47 AM
To: 'Pekka Pessi'
Cc: 'sofia-sip-devel@lists.sourceforge.net'
Subject: nua_i_subscribe/nua_notify/nua_r_notify
Hello,
Okay, I replaced my nua_notifier() call to nua_notify(), but when I
receive
a SUBSCRIBE request from the server, sofia-sip 1.12.6work4 is sending
489
Bad Event response and not calling the callback function at all. Do I
need
to do some other initialization to get sofia-sip to inform me of the
SUBSCRIBE request?
Best Regards,
Jerry
-----Original Message--- --
From: Pekka Pessi [mailto:[EMAIL PROTECTED]
Sent: Friday, October 26, 2007 3:03 AM
To: Jerry Richards
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] 1.12.4 Bug In nua_r_notifier Event?
2007/10/26, Jerry Richards <[EMAIL PROTECTED]>:
> So does this mean that nua_notifier() will not be fi xed and
eventually
> become extinct? Is the nua_i_subscribe/nua_notify/nua_r_notify scheme
the
> way of the future? Will this work in my version 1.12.6work4?
They serve different purposes. The nua_notifier suits better for more
traditional event data distribution, handling SUBSCRIBE/NOTIFY more or
less directly with nua_i_subscribe/nua_notify/nua_r_notify suits
better cases where there are some other semantics associated with SIP
events, like in your application.
Of course, the nua_notifier() thing has its downsides, it uses nea
module, which has zero unit tests and unclear semantics.
--
Pekka.Pessi mail at nokia.com
--------------------------------- --------------------------------------
--
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
-------------------------------------------------------------------------
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