[asterisk-users] Realtime Hints

Stephen Collier stephen.collier at foxaus.com
Tue Sep 25 18:03:41 CDT 2012

I use the following in func_odbc.conf

readsql=SELECT ${ARG1} FROM extension_map as em left join sip_devices as sd on s
d.id = em.name_id WHERE em.extension ='${ARG2}' and name_id IS NOT NULL

this is for our own extension_map table which is part of our mapping to our Avaya users. 

A simple one would be 
readsql=SELECT ${ARG1} FROM sip_devices as sd WHERE sd.name ='${ARG2}'

This allows pulling any field from sip_devices which is our realtime sip table.

You could pull some of the other data you are looking for.


-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

More information about the asterisk-users mailing list