[OpenSER-Users] Obtaining the domain of "Refer-to" URI
Iñaki Baz Castillo
ibc at aliax.net
Sun Jan 20 21:45:05 CET 2008
El Jueves, 17 de Enero de 2008, Klaus Darilion escribió:
> Iñaki Baz Castillo schrieb:
> > On Wednesday 16 January 2008 16:34:40 Iñaki Baz Castillo wrote:
> >> It doesn't fails if SIP URI doesn't contain "<" and ">".
> >>
> >> So I assume that, in my case, it will fail if a UAC generates a
> >> "Refer-To" with "<" and ">", while it's perfectly valid according to RFC
> >> 3515:
> >>
> >> Refer-To: <sip:carol at cleveland.example.org;method=SUBSCRIBE>
> >
> > Oh, but it doesn't fail because $rt takes off the "<" and ">" symbols
> > from the URI. :)
> >
> > So forget me, it's not a bug. The SIP URI in the AVP or variable should
> > be without < > (as a good SIP URI it's) ;)
>
> But this would be other very useful transformation - getting display
> name and SIP URI from name-addr (should work with plain SIP URI too).
>
> name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
Now I want to allow callerid hidden calls if the UAC sends an INVITE with:
From: "Anoymous" <sip:anonymous at anonymous.invalid>
P-Preferred-Identity: "Iñaki" <sip:ibc at domain.org>
Privacy: id
To authenticate this INVITE the proxy can't look for the domain in "From", but
in domain of "PAI" header.
It could be nice if this would work:
is_domain_local($(hdr(P-Preferred-Identity){uri.host})) {
route(4) ; Auth route
}
But unfortunatelly it doesn't work since it's not a variable containing just:
sip:user at domain
but:
"Display name" <sip:user at domain>
so it's not possible :(
I'll open a feature request :)
--
Iñaki Baz Castillo
More information about the Users
mailing list