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. -- Pekka.Pessi mail at nokia.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sofia-sip-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
