[Devel] uac_replace_from problem replace displayname with space
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Feb 21 13:01:18 CET 2006
Hi Ray,
I did some tests and I can confirm your report. Only first non-space
string is parsed as display name if quotes are not used.
The problem originates in the TO parser. I look into the RFC to see if
spaces are allowed in non-quoted display names:
To = ( "To" / "t" ) HCOLON ( name-addr
/ addr-spec ) *( SEMI to-param )
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
display-name = *(token LWS)/ quoted-string
token = 1*(alphanum / "-" / "." / "!" / "%" / "*"
/ "_" / "+" / "`" / "'" / "~" )
LWS = [*WSP CRLF] 1*WSP ; linear whitespace
based on this definition, IMHO spaces should be accepted in the
non-quoted display names, which means there is a bug in the TO parser.....
regards,
bogdan
Raymond Chen wrote:
> Dear all,
>
> We have encountered a problem with uac_replace_from(“”, “$ru”) when
> display name has a space. It only replace the first part of display
> name before the space.
>
> Thanks
>
> Ray
>
> INVITE sip:xxxxxxxx at 61.144.118.186:7296 SIP/2.0.
>
> Record-Route: <sip:xxx.xxx.xxx.xxx:80;ftag=565410323;lr=on>.
>
> Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:80;branch=z9hG4bK08f5.b4c7e3.0.
>
> Via: SIP/2.0/UDP
> 61.144.118.186:46278;rport=46278;branch=z9hG4bK009EDE8E72584BEC86D9BF3F84978C12.
>
> From: Warren Smith <sip:wsmith at xxx.xxx.xxx.xxx>;tag=565410323.
>
> To: <sip:001xxxxxxxxxx at xxx.xxx.xxx.xxx>.
>
> Contact: <sip:wsmith at 61.144.118.186:46278>.
>
> Call-ID: CE8407F9-179A-40D0-B318-631B8F485E14 at 192.168.1.143.
>
> CSeq: 7145 INVITE.
>
> Max-Forwards: 69.
>
> Content-Type: application/sdp.
>
> User-Agent: X-PRO build 1082.
>
> Content-Length: 342.
>
> P-hint: usrloc applied.
>
> 1(12909) xl_printf: final buffer length 36
>
> 1(12909) DEBUG:uac:replace_from: removing display [Warren]
>
> 1(12909) DEBUG:uac:replace_from: uri to replace
> [sip:xxxxx at xxx.xxx.xxx.xxx]
>
> 1(12909) DEBUG:uac:replace_from: replacement uri is
> [sip:862061241203 at 61.144.118.186:7296]
> <mailto:%5bsip:862061241203 at 61.144.118.186:7296%5d>
>
> INVITE sip:001xxxxxxxxx at xxx.xxx.xxx.xxx:5060 SIP/2.0.
>
> Record-Route: <sip:xxx.xxx.xxx.xxx:80;ftag=565410323;lr=on>.
>
> Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:80;branch=z9hG4bK08f5.b4c7e3.1.
>
> Via: SIP/2.0/UDP
> 61.144.118.186:46278;rport=46278;branch=z9hG4bK009EDE8E72584BEC86D9BF3F84978C12.
>
> From: Chen <sip:wsmith at 61.144.118.186:7296>;tag=565410323.
>
> To: <sip:001xxxxxxxxxxxxx at xxx.xxx.xxx.xxx>.
>
> Contact: <sip:wsmith at 61.144.118.186:46278>.
>
> Call-ID: CE8407F9-179A-40D0-B318-631B8F485E14 at 192.168.1.143.
>
> CSeq: 7145 INVITE.
>
> Max-Forwards: 69.
>
> Content-Type: application/sdp.
>
> User-Agent: X-PRO build 1082.
>
> Content-Length: 342.
>
> P-hint: usrloc applied.
>
> P-hint: GATEWAY.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Devel mailing list
>Devel at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/devel
>
>
More information about the Devel
mailing list