sql_query("exec", "insert into dispatcher (setid, destination) select $var(SetId), \"$var(MediaUrl)\" where not exists(select * from dispatcher where destination=\"$var(MediaUrl)\")");
if ("KAZOO_DB_URL"=~ "^mysql") {
sql_query("exec", "insert into dispatcher (setid, destination) select $var(SetId), \"$var(MediaUrl)\" from DUAL where not exists(select * from dispatcher where destination=\"$var(MediaUrl)\")");
}
else {
sql_query("exec", "insert into dispatcher (setid, destination) select $var(SetId), \"$var(MediaUrl)\" where not exists(select * from dispatcher where destination=\"$var(MediaUrl)\")");