[Devel] is_domain_local
Dan Pascu
dan at ag-projects.com
Thu Jul 20 10:02:55 CEST 2006
On Wednesday 19 July 2006 22:24, Bogdan-Andrei Iancu wrote:
> My opinion is that the functions should take as parameter an URI and
> not just the domain. Normally the script handles SIP uris and not just
> domain name, so has no sense to start extending the pvs to just for
> this purpose.
> The function should properly parse the received URI and to extract the
> domain.
Why not make it smart enough to avoid the need to do extra processing in
the script. If pv is an URI, parse it and extract the domain part. If not
take it as being just the domain and check it without any parsing.
Consider the case where in some avp I already have the domain and I wish
to check it. What I am supposed to do in this case? Build an avp like
sip:dummy at my_domain_avp just to keep the function happy?
>
> regards,
> bogdan
>
> Juha Heinanen wrote:
> >Bogdan-Andrei Iancu writes:
> > > in this case, we can replaced everything with the
> > > is_domain_local(pv) function, right?
> >
> >yes, if pv contains just the host part of the uri. perhaps also
> >is_uri_user_e164 should then be replaced by is_user_e164(pv) and add
> > new pvs if necessary, since now there doesn't exist a host part pv
> > for each uri pv. for example, there is $re that contains refer-to
> > uri, but there is no pv that would contain host part of refer-to uri.
> >
> >-- juha
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
--
Dan
More information about the Devel
mailing list