[OpenSIPS-Users] Having '@' in the username

Iñaki Baz Castillo ibc at aliax.net
Tue Feb 10 15:22:23 CET 2009


2009/2/10 Vasil Kolev <vasil.kolev at attractel.com>:
> В 15:01 +0100 на 10.02.2009 (вт), Iñaki Baz Castillo написа:
>> 2009/2/10 Vasil Kolev <vasil.kolev at attractel.com>:
>> > So, the question goes like this - should I even bother with this, or
>> > should I just have the client part escape '@' and be done with it?
>>
>> SIP BNF grammar doesn't allow @ into the SIP URI username part. If you
>> need it you should escape it in hexadecimal.
>
> Yes, this gets escaped. But it's not escaped automatically for the
> digest username, which in turn led me to patch parse_username() and do
> the URI hack.

According to SIP BFN, "username" field in Authentication header looks like:

  username          =  "username" EQUAL username-value
  username-value    =  quoted-string

It's a quoted string so it doesn't need to be escaped. I think you are
getting into SIP BNF core issues. No easy solution for it.


> That I'll discuss with them, as they split on the first '@' (as I
> understand the python code), which won't really work.

Do you mean the "username" field in Authentication header?


-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the Users mailing list