I am relatively new to FreePBX, so until the real help comes along: I am not sure what “working correctly” may mean to you. If you know the IP addresses of the phone and want to see if they are reachable, you could write a script to ping each one and send you an alert if no response. Just because they are pingable, doesn’t necessarily mean they are ready to take/make calls.
If you can log into the FreePBX GUI, you could bring up the Asterisk Info page (under Reports) which would give you a snapshot of extensions status.
Thanks for your idea but I want to test extension on android phones. They have dynamic ip.
The idea is also to get a report about extensions working and extensions not working.
I think you need to take a step back and evaluate what you mean by a working extension. If you dial 100 and it rings for a bit or ends up in voicemail, it works. The extension works because nothing states an extension has to be connected to a device.
What does calling the extension get you really? If no one answers, how do you know they didn’t answer because they just didn’t or they didn’t answer because they never saw the call hit their device? So how do you validate your results? Are you going to have every user report back? Are you going to make every user answer these test calls for verification that it was answered?
You can pretty much script up anything, just need to decide what is a good enough indication that an extension is “working”.
I myself just check in asterisk that extensions are shown as OK from the SIP qualify as others have indicated previously. That shows the device is still able to connect to asterisk regularly.
Not sure what benefits actually calling the device would get you unless the call is actually picked up and then one could do call quality analysis I suppose.