You can get it by querying the mysql database Elastix from your PHP.
select extension,name from users where ( extension IN (Select
DISTINCT id from sip) or extension IN
(Select distinct id from iax)) order by name;
With this query you have the extension and the name of your