On 11/7/06, Colin Whittaker <[EMAIL PROTECTED]> wrote:
>
>  Well, this is interesting, because nua_handle_local() returns the url
> without a username.
>  Here is url_as_string(NULL, nua_handle_local(nh)->a_url )
>
>  sip:10.1.64.123;transport=udp
>
>  I create the handle with:
>  nua_handle( no tags )
>  Then:
>  nua_set_hparams(
>                       NUTAG_M_USERNAME( "3014243101" ),
>                       SIPTAG_FROM_STR(  "\"phone 1\"
> <sip:[EMAIL PROTECTED]>"  ),
>                       NUTAG_AUTOACK( 1 ),
>                       NUTAG_EARLY_ANSWER( 0 ),    // Don't Send SDP with 1xx
> responses.
>                       SOATAG_USER_SDP_STR( SDP ),
>                       TAG_END() );
>
>  So this probably explains what I am seeing, but why doesn't the username
> get set ?

The nua_handle() function sets the From header for the handle. If
there is none, it uses the default From header, generated when
nua_create() or nua_set_params() is called. It looks like the code
that populates the request message with headers first tries to use the
>From header from the nua_invite() tags, then from the tags from
nua_handle() call and then from the values saved with the dialog. The
problem is caused by the nua_handle() which adds a copy of the default
>From header to the tags.

As a fix I'd propose that you include the SIPTAG_FROM_STR() and
perhaps NUTAG_URL() and SIPTAG_TO()/SIPTAG_TO_STR() in the
nua_handle() params. I'lkl file this as a bug, too, and try to figure
out how to fix it without breaking nua_handle_local().

-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
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