[Asterisk-Users] Realtime - reading values from registred family name

Prezydent Kaczynski prezydent_kaczynski at o2.pl
Fri Jan 20 09:43:28 MST 2006


  For those strugling as me for the long time with question:
  "how the hack i can read a value from registred family name using
  realtime?" and not to use dbodbc or odbcexec , here's the sollution:

RealTime(<family>|<colmatch>|<value>[|<prefix>])

All unique column names will be set as channel variables with optional prefix to the name.
e.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}  
  
 eg.
 extensions.conf (or in a db table)
 (lets assume that we have in our table column names: name username password phone_nbr context
  table is "sip_users" connected to familyname  sipusers , there is a
  user with name=guru)

 [init]
 exten => s,1,Realtime(sipusers|name|guru)
 exten => s,2,Noop(${name})      ;gives use what we already know
 exten => s,3,Noop(${username})  ; guru  username
 etc.

 simple , isnt it ?
 I hope it will save some nerves and time for future users
-- 
Z uszanowaniem
 Prezydent                          mailto:prezydent_kaczynski at o2.pl




More information about the asterisk-users mailing list