Ok, I kinda got off this thread and onto the release thread by mistake.

To summarize,
I am running the top of darcs.
I am now getting the Contact: header set properly.
This is accomplished by calling nua_set_hparams() with the NUATAG_M_USERNAME() after creating a handle, and when getting a new handle from the stack in the callback.

The From: header problem is still present, but I have a work around.
The work around is to disable auto ACK with NUTAG_AUTOACK() and add with SIPTAG_FROM( sip->sip_from ) in the nua_ack().
Also, I needed to add SIPTAG_FROM( [EMAIL PROTECTED] ) to nua_bye() and to nua_invite() when sending NUTAG_HOLD().

I think the problem I noted before is still the issue. I think the AOR should be looked up with the request URL, not the To: header.


Pekka Pessi wrote:
On 1/12/07, Colin Whittaker <[EMAIL PROTECTED]> wrote:
  
 Ok, so still using 1.12.4
 SIPTAG_FROM_STR and SIPTAG_CONTACT_STR have no effect in nua_set_hparams().
    

Yep, the From header cannot be modified. The nua implementation tries
to be compatible with RFC 2543 where you could not change the From
header within a dialog.

  
 No problem, I can set them in the nua_handle() call.
 Still have a problem with the handles that come from incoming requests.
Can't set the contact there either, but it doesn't seem to matter since it
would not be used for responses.
 I think I found out why the default contact header gets sent in responses.
 It appears:
 nua_registration_for_response() uses the sip->sip_to as the AOR.  This gets
looked up with nua_registration_by_aor(). The problem is the To: header may
not contain the AOR.
 For example,
 INVITE sip:[EMAIL PROTECTED] SIP/2.0
 To: sip:[EMAIL PROTECTED]
 ...
 Here the proxy is generating this request with the same To: header that
come in from the original request to the proxy.
 I think the fix is to use the URL on the request line. This should be the
AOR.
 What do you think ?
    

The request-URI is usually the URI used in Contact when the UA registered.

  
 It's not a straight forward fix since the request is not available in
nua_registration_for_response(), but it should be available
up a few functions in: nh_make_response()
    

It is some of the things that I have postponed for the identity stuff,
but we could as well include the request-URI to the
nua_registration__for_response() arguments and use them as well.

  
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to