[Kamailio-Users] uac_replace_from unexpected behavior

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 18 13:11:21 CET 2010


Hello,

On 03/16/2010 03:05 PM, Brandon Armstead wrote:
> Daniel,
>
>     I did do a check and "" quotes are printing in xlog for $fn.

can you send the sip trace for such case? I tested with options and "" 
is removed.

Cheers,
Daniel

>
> Thanks!
>
> Sincerely,
> Brandon Armstead
>
> On Tue, Mar 16, 2010 at 7:32 AM, Daniel-Constantin Mierla 
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
>     Hello,
>
>
>     On 03/16/2010 01:22 PM, Brandon Armstead wrote:
>>     Daniel,
>>
>>         So if I am to set it to "none" it should give me the desired
>>     affects, and not alter back to the original From header upon
>>     transmission of an ACK?
>
>     auto mode should do everything (update/restore From (or To)) for
>     within dialog requests, if you used uac_replace_from() for initial
>     INVITE, therefore this is the best mode. However, it adds an extra
>     parameter (pretty long) to RR header and some UA strips it when
>     building the reply.
>
>     If you know you are in a SIP2.0 (rfc3261) compatible environment,
>     then you can use other modes.
>
>     In sip 2.0 a dialog is identified by call-id, from-tag and to-tag,
>     which are not affected by From updates. However, in previous
>     version of sip, From URI and To URI were used to identify the sip
>     dialog, therefore, in order to be compatible with sip 1.0 then you
>     should not change From/To.
>
>     In auto mode, the From/To are restored to be safe with sip 1.0
>     devices.
>
>     Btw, if you have time, can you please print the $fn in xlog for
>     ACK and send it here? Will show if quotes are considered part of
>     display name. If not, I will look later in sources.
>
>     Cheers,
>     Daniel
>
>>
>>     Sincerely,
>>     Brandon Armstead
>>
>>     On Tue, Mar 16, 2010 at 7:05 AM, Daniel-Constantin Mierla
>>     <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>>
>>
>>
>>         On 03/16/2010 01:03 PM, Brandon Armstead wrote:
>>>         Value of uac_restore_mode is not set so "auto".
>>
>>         but if it is not set to something else, this is the default
>>         value.
>>
>>         Cheers,
>>         Daniel
>>
>>
>>>
>>>         Thanks!
>>>
>>>         On Tue, Mar 16, 2010 at 7:00 AM, Daniel-Constantin Mierla
>>>         <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>>>
>>>             Hello,
>>>
>>>
>>>             On 03/16/2010 12:52 PM, Brandon Armstead wrote:
>>>>             Daniel,
>>>>
>>>>                This is 1.5 and there is nothing between the quotes "".
>>>             the question is whether the display name attribute in
>>>             From header structure includes the quotes or not -- this
>>>             is to be revealed by code.
>>>
>>>
>>>>
>>>>             The last time I tried to remove_hf, and then
>>>>             append_hf(From) or To header, it seemed to break call
>>>>             flow completely?
>>>
>>>             It can break in case you have non-RFC3261 compliant devices.
>>>
>>>             What is the value of uac module parameter from_restore_mode?
>>>
>>>             If it is auto or not set, then it is not the same
>>>             behavior as with remove_hf/append_hf.
>>>
>>>
>>>>               I will give it another go, however if you have any
>>>>             further thoughts it is much appreciated, thanks!
>>>             Going to check the sources and come back with more details.
>>>
>>>             Cheers,
>>>             Daniel
>>>
>>>
>>>>
>>>>             Sincerely,
>>>>             Brandon Armstead
>>>>
>>>>             On Tue, Mar 16, 2010 at 6:44 AM, Daniel-Constantin
>>>>             Mierla <miconda at gmail.com <mailto:miconda at gmail.com>>
>>>>             wrote:
>>>>
>>>>                 Hello,
>>>>
>>>>
>>>>                 On 03/16/2010 02:30 AM, Brandon Armstead wrote:
>>>>
>>>>                     Hello,
>>>>
>>>>                     As always thank you ahead of time for your help
>>>>                     and input!
>>>>
>>>>                     I am currently calling uac_replace_from("", "")
>>>>                     in effort to "leave uri" and "toss away display
>>>>                     name"
>>>>
>>>>                     Which does seem to work....... for the initial
>>>>                     INVITE
>>>>
>>>>                     However upon receiving an ACK with an empty
>>>>                     display, however "" <- quotations, it does not
>>>>                     clear the display "" which is causing issues
>>>>                     with one of my upstream vendors.
>>>>
>>>>                     Example / Scenario:
>>>>
>>>>                     From: "" <sip:uri at host>
>>>>
>>>>                     Expected Result upon uac_replace_from("",""):  
>>>>                          From: <sip:uri at host>
>>>>
>>>>                     Current Result: From: "" <sip:uri at host>
>>>>
>>>>                     As you can see it is not stripping the "" empty
>>>>                     display quotes.
>>>>
>>>>                     Any thoughts / ideas / suggestions to get my
>>>>                     desired affect?
>>>>
>>>>                 could be that display name is set to empty string
>>>>                 (what is between double quotes) and in this case is
>>>>                 nothing to replace -- I have to doublecheck the
>>>>                 sources. Is it 1.5 or 3.0?
>>>>
>>>>                 Are you using From auto-replacing mode? If not, a
>>>>                 solution for now is to do From update using header
>>>>                 manipulation functions:
>>>>
>>>>                 remove_hf("From");
>>>>                 append_hf("From: <$fu>;tag=$ft\r\n", "From");
>>>>
>>>>                 Cheers,
>>>>                 Daniel
>>>>
>>>>                 -- 
>>>>                 Daniel-Constantin Mierla
>>>>                 Kamailio SIP Router Masterclass, Berlin, March
>>>>                 22-26, 2010
>>>>                 *
>>>>                 http://www.asipto.com/index.php/sip-router-masterclass/
>>>>
>>>>
>>>
>>>             -- 
>>>             Daniel-Constantin Mierla
>>>             Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
>>>             *http://www.asipto.com/index.php/sip-router-masterclass/
>>>                  
>>>
>>>
>>
>>         -- 
>>         Daniel-Constantin Mierla
>>         Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
>>         *http://www.asipto.com/index.php/sip-router-masterclass/
>>              
>>
>>
>>
>>     _______________________________________________
>>     Kamailio (OpenSER) - Users mailing list
>>     Users at lists.kamailio.org  <mailto:Users at lists.kamailio.org>
>>     http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>     http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>     -- 
>     Daniel-Constantin Mierla
>     Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
>     *http://www.asipto.com/index.php/sip-router-masterclass/
>          
>
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

-- 
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100318/2bc3538f/attachment.htm>


More information about the sr-users mailing list