fill_ssid_security {
	if (!&request:Eltex-Ssid-Security && &Called-Station-SSID) {
		update {
			Eltex-Ssid-Security = "%{wireless_sql: \
			    SELECT IFNULL((SELECT security FROM SSID \
			    where name = '%{Called-Station-SSID}' AND \
			    domain_name = '%{Eltex-Domain}'), 1)}"
		}
	}

	if (!&request:Eltex-Ssid-Type && &Called-Station-SSID) {
		update {
			Eltex-Ssid-Type = "%{wireless_sql: \
			    SELECT IFNULL((SELECT ssidtype FROM SSID \
			    where name = '%{Called-Station-SSID}' AND \
			    domain_name = '%{Eltex-Domain}'), 0)}"
		}
	}
}
