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