Bug#424984: openser: Insert Route HF (from Path) messes up if UTF-8 chars around
Bernie Hoeneisen
bhoeneis at switch.ch
Fri May 18 15:37:34 UTC 2007
Hi Julien
I made some further testing. It looks like the reason for the strange
behavior is not the fact, that UTF-8 is around.
I figured out, that this behavior has a different cause.
I use a feature, that adds a name to a phone number, when the call is
coming from the PSTN and the phonenumber is known (saved in the db). For
this I put the following line into the config:
subst('/^(From:).*(<sip:[0-9]+\@switch\.ch>.*)$/\1 "$avp(s:679) $avp(s:680)" \2/ig')
whereas avp(s:679) and avp(s:680) contain first- and lastname from the db.
While the above line is commented out, the insertion of the Route HF works
correctly. Otherwise it inserts the Route HF between <CR> and <LF>.
Thus, it seems that calling the subst() function before the (Path-info)
Route HF is inserted causes the problem.
cheers,
Bernie
On Fri, 18 May 2007, Julien BLACHE wrote:
> tags 424984 - l10n
> thanks
>
> Bernie Hoeneisen <hoeneisen at switch.ch> wrote:
>
> Hi,
>
>> I am testing the Path HF usage. When the usage of Path causes a
>> insertion of a Route HF and the (original) SIP INVITE request contains UTF-8
>> characters, the Route HF gets inserted at the wrong place, e.g. between
>> the <CR> and <LF> (Hexadecimal 0D and 0A) at the end of the From HF:
>>
>> INVITE sip:bernie.hoeneisen at 192.168.1.3:6051;line=nfy9nuy8 SIP/2.0
>> Record-Route: <sip:127.0.0.1;r2=on;lr=on;ftag=as19d6b213>
>> Record-Route: <sip:130.89.10.194;r2=on;lr=on;ftag=as19d6b213>
>> Remote-Party-ID: "Bernie Höneisen" <sip:0123456789 at switch.ch>
>> Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK77a8.e46b2c74.1
>> Via: SIP/2.0/UDP 130.89.10.195:5060;branch=z9hG4bK53c948e4;rport=5060
>> From: "Bernie Höneisen" <sip:0123456789 at switch.ch>;tag=as19d6b213^MRoute:<sip:130.89.10.194;lr;received=sip:97.56.98.20:3051>
>>
>> To: <sip:test at testie.switch.ch>
>
> Can you do another test with a From header that contains 2 multibyte
> characters ?
>
> I suspect something is counting characters and not bytes, in which
> case with 2 multibyte characters in the header you should be getting
> the Route header inserted before the \r.
>
> JB.
>
> --
> Julien BLACHE - Debian & GNU/Linux Developer - <jblache at debian.org>
>
> Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
> GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
>
More information about the Pkg-voip-maintainers
mailing list