Perfect, thank you. It works - I'm not using your areacode in my code.
If I want to load a user specific country code, using avp, how can I do
this?
I've added kamctl avp add MY-SUBSCRIBER countrycode 0 +44, so +44 is added
to usr_preferences.
But calling $avp(countrycode) doesn't seem to give me +44?
Thank you once again.
On Tue, Sep 1, 2015 at 3:59 PM, Daniel Tryba <d.tryba(a)pocos.nl> wrote:
On Tuesday 01 September 2015 13:45:16 Michael Nielsen
wrote:
Is it possible to, if a subscriber has not
entered either + or 00, to
append the value from country_code of the specific subscriber to the
dialled number?
And if the user has dialled 00, to replace it with +.
Offcourse that is possible, in folowwing example src_areacode is taken from
usr_preferences and a no country code pattern is hardcoded to the
Netherlands
prefix.
if($rU=~"^[2-8][0-9]+$")
{
if($avp(src_areacode)=~"^\+?[0-9]+$")
{
$rU=$avp(src_areacode)+$rU;
}
}
if($rU=~"^00[1-9][0-9]+$")
{
strip(2);
prefix("+");
}
if($rU=~"^0[1-9][0-9]+$")
{
strip(1);
prefix("+31");
}