[sr-dev] uac_replace_to uac_replace_from and quotes

Vicente Hernando vhernando at systemonenoc.com
Wed May 15 14:36:45 CEST 2013


Hello,

uac_replace_to and uac_replace_from functions can receive two arguments, 
display and uri.

In current implementation two double quotes are automatically added to 
display during fixup.


Would it be a better behavior not to add any quotes? If the user wants 
some quotes he should add them by himself.

E.g:

right now, if I get a display "Vicente" from an invite and store it in 
$fn variable, if I call

uac_replace_from($fn, uri_foo)    it produces  ""Vicente"" in the 
display which kamailio complaints about.


If we would avoid quotes, uac_replace_from function could accept:

uac_replace_from("Bob", uri)      display = Bob

uac_replace_from("\"Bob\"", uri)    display = "Bob"


standard supports quoted strings, not quoted tokens, spaces before and 
after quotes, etc.


Attached patch should avoid quotes in uac_replace functons.


What are your opinions about this?

Kind regards,
Vicente.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: uac_avoid_quotes.patch
Type: text/x-diff
Size: 2389 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20130515/6de492ef/attachment.patch>


More information about the sr-dev mailing list