Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to detect if a NGN (Non Geographic Number, e.g. 0844, 0845, 0870 etc) number has been used to connect to an Asterisk PBX?

Thanks in advance.

Kyle

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Asterisk can only act on the information provided by the call. If your telephony service provider delivers the calling number (CallerID or ANI) via PRI, SIP, or other signalling, then Asterisk can act on that data. Whether you can trust the validity of the provided data has nothing to do with Asterisk; it can be spoofed.

Use Asterisk dialplan in extensions.conf to compare ${CALLERID(num)} against a fixed list or database, then take whatever action you wish as a result -- go to a different context, set a billing code, etc.

share|improve this answer

It depends on how your Asterisk box receives those calls.

If using E1/T1 you usually receive a DNIS indication with the called number, available on your receiving context.

If receiving those calls trough some SIP provider, they should provide you some way to access that data.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.