Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-02 Thread Michael Nielsen
Oh, I see... This should be what I was looking for. Thanx On Wed, Sep 2, 2015 at 9:14 AM, Daniel-Constantin Mierla wrote: > As alternative, if you need the country code for caller only, then look at > load_credentials parameter for auth_db module. If you add the country code > in the subscriber

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-02 Thread Daniel-Constantin Mierla
As alternative, if you need the country code for caller only, then look at load_credentials parameter for auth_db module. If you add the country code in the subscriber table, it will be loaded from database whent he authentication is done (i.e., in the same query with the password). Cheers, Daniel

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 17:37:36 Michael Nielsen wrote: > What if I just want to lookup the country code IF the country code is not > set. > Then queries to MySQL for this would only be made in the cases where the > subscriber do not type in + or 00? if(!$rU!="^(\+|00)") > I've tried to loo

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
What if I just want to lookup the country code IF the country code is not set. Then queries to MySQL for this would only be made in the cases where the subscriber do not type in + or 00? I've tried to look at avpops which apparently uses the usr_preferences as standard - but without any luck... O

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 16:43:42 Michael Nielsen wrote: > 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 giv

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
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 m

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
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

[SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
I've added a custom column in my subscriber table in MySQL - called country_code. This contains +44 etc. for subscribers. 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