Hello all!
have the following task: I need to detect the country using it’s code in callerid(num) and then display callerid in format callerid(num)-CountryName on the internal phone calls will be routed to.
I’m going to use internal AstDB to store countries and their codes using following structure:
Country/Country1 Code1
Country/Country2 Code2
…
The question is how to perform parsing of incoming callerid(num) field using asterisk dialplan functions.
The difficulty is that country code lenght is not a constant…