Hi Pekka, and thanks for replying.
On date Tuesday 2009-03-03 20:35:50 +0200, Pekka Pessi phoned this:
2009/3/3 Stefano Sabatini ssabat...@reilabs.com:
I was investigating about how to get the state of a nua_handle,
couldn't find nothing about it.
The current state is not very well defined, nor it is kept in handle.
I'm having this problem in a disconnection scenario, I need to know
the state of the SIP dialog when the user provides a disconnection
request, this may be done both when the ACK is already arrived or when
the ACK hasn't still been sent.
For this reason I need to know in which state the handle is, and send
a BYE or a CANCEL consistently with the current state.
sofsip_cli bookeeps this information in the ssc_oper_s struct
(ssc_oper.h), I also tried the i_state event management approach but
it is not correct, since the i_state event (setting the state in the
operation context/magic) is processed by the sofia event handler
*after* the actual event which causes the state transition.
So I wonder if it would make sense to set this information in the
handle itself, when the various nua_invite/nua_ack/... operations are
performed, rather than re-implement that logic in every app.
Or maybe I'm just confused.
I also wonder if it is possible for example to extract other
informations related to it, for example the Call-ID of a dialog.
nua_handle_make_replaces() returns a Replaces header, you can get
Call-ID from it.
I'll gladly accept patch for something like
char *nua_handle_make_call_id(nua_handle_t *nh)
Do you mean a function to *set* the call_id for example in a just
created handle?
But do you think would be also possible to define a function to *get*
the call_id of an already created handle? nua_handle_make_replaces
looks overkill for just that.
[...]
Kind regards.
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel