How to detect native network?
GSM calls are always cheaper in native network. Let us suppose I have some phone nr. How can I detect if it is in my network (is it the same gsm operator)?
My suggestions:
- prefix. does not work for my country. people can change operator without changing their original numbers.
- online database. for my country it is www.1299.be. can asterisk/celliax ask the database and interpret the answer?
- special service from my operator. when I dial a number of foreign network I can hear triple beep from my phone - a kind of warning. and no beeps for my native network. is it possible to use such a detection with asterisk/celliax?
And the last question - Is it the right forum to ask? :)
Your operator is better than
Your operator is better than mine, mine does not give you the triple beep.
I think you can check the online database from the dialplan, you can put it in a macro for call if you want, and then act accordingly to some logic (eg. warn the user, have different billing, etc). You can build the query based on the number, retrieve the url, parse it, and then act...
What you think?
macro vs AT command
I heard that macro/script is possible. But I meant something at AT commands level - to detect triple beep. Is it possible? Any ideas?
NOT possible with AT commands
I do not think there is a way to use AT commands to detect a beep (or a triple beep). It may be possible through audio analysis, tough.
Anyway, just go into the doc directory of asterisk, or at http://www.voip-info.org/wiki-Asterisk and have a look into dialplan logic and function. I think would be very easy to implement, probably just three-four lines.
You may want to look also into AGI scripting, that gives you the easy of using perl (so you can leverage perl modules for querying and parsing the web database, and for implementing the logic)
OK, thanks for suggestion.
OK, thanks for suggestion. Going to play with this later.