511
Other Yate server issues / Re: Can't make a call connected
« on: April 09, 2013, 01:34:04 AM »
Hi,
If you user is registered using tcp you must save the connection id also when registered and return it when routing (you must add the field to the database also):
register.conf:
[user.register]
query=UPDATE users SET location='${data},expires=CURRENT_TIMESTAMP + INTERVAL '${expires} s',oconnection_id=${oconnection_id} WHERE username='${username}'
[call.route]
query=SELECT location,oconnection_id,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE username='${called}' OR username='${called}@mydomain.com'
If you have other setup please attach a sniffer log for call.route/call.execute messages and the ysipchan.conf and register.conf files.
If you user is registered using tcp you must save the connection id also when registered and return it when routing (you must add the field to the database also):
register.conf:
[user.register]
query=UPDATE users SET location='${data},expires=CURRENT_TIMESTAMP + INTERVAL '${expires} s',oconnection_id=${oconnection_id} WHERE username='${username}'
[call.route]
query=SELECT location,oconnection_id,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE username='${called}' OR username='${called}@mydomain.com'
If you have other setup please attach a sniffer log for call.route/call.execute messages and the ysipchan.conf and register.conf files.