151
Yate users hangout place / Re: Callerid from database
« on: February 12, 2015, 06:01:37 AM »
Hi,
If you only want to change the callername parameter then you have to added in the query. If you don't route from the database it would be something like this:
[call.preroute]
query=SELECT contact_name as callername, null as location FROM contacts WHERE contact_phone_number = ${caller}
result=location
or
[call.route]
query=SELECT contact_name as callername, location FROM contacts WHERE contact_phone_number = ${caller}
result=location
id you also have the location in the database
This depends on how the routing is done and if you want to do it here or from another module/script
If you only want to change the callername parameter then you have to added in the query. If you don't route from the database it would be something like this:
[call.preroute]
query=SELECT contact_name as callername, null as location FROM contacts WHERE contact_phone_number = ${caller}
result=location
or
[call.route]
query=SELECT contact_name as callername, location FROM contacts WHERE contact_phone_number = ${caller}
result=location
id you also have the location in the database
This depends on how the routing is done and if you want to do it here or from another module/script