How do I for indentify invalid numbers in fix telehony(fxo numbers)?

I am using IPBX Asterisk 11.14.1 and make many calls for fxo numbers here in Brazil.
I need known how i can to identify numbers which “no exist” in Asterisk for exclude in my automated caller operation.
Has a API interface? Has a algorithim solution for this?

Waiting for help!

Thanks for all.

Such information is not available , on the asterisk side. Anyway you can take a look to the hangupcause variable

FXO normally refers to analogue lines. Asterisk gets no information, that it can recognize, as t the cause of failure on analogue lines; it may not even get answer and disconnect supervision.

If you know the numbering structure in Brazil, you can define dialplan pattern matches that will reject wrong length numbers and one for unallocated exchanges, but, to have any hope of identifying invalid numbers, you will need to actually make a call, and use ISDN, directly or via an Internet Telephony Service Provider.

OK… Thanks for all.