[OpenSER-Users] The best way to allow just a few destinations based on prefix?
Iñaki Baz Castillo
ibc at in.ilimit.es
Tue Feb 19 14:58:48 CET 2008
El Tuesday 19 February 2008 13:34:17 Iñaki Baz Castillo escribió:
> El Tuesday 19 February 2008 13:16:46 Iñaki Baz Castillo escribió:
> > I've reading about PDT, LCR and CarrierRoute modules but they seems to be
> > supposed to other aims. The most similar could be PDT but it needs to
> > strip my prefix XD
>
> It seems that PDT could be valid using:
> prefix2domain("2");
> since "rewrite_mode = 2" means:
> "the user part of the URI is not changed"
>
> And I've tested that this function returns -1 when the translation was NOT
> made, so the doc is wrong:
>
> "Returns 1 when the translation was made or there was nothing to translate
> (user part of the URI is empty, it does not match the prefix parameter or
> there is no domain associated with a possible prefix from user part).
> Returns -1 in error cases."
Ops, after more testing this is not valid for me since it needs each
field "domain" being different for the same "sdomain". So if for example I
set two entries:
1)
- sdomain: *
- prefix: +34
- domain: gateway_IP
2)
- sdomain: *
- prefix: +44
- domain: gateway_IP
It will fail as "DUPLICATED" :(
--
Iñaki Baz Castillo
ibc at in.ilimit.es
More information about the Users
mailing list