Browse code

misc/examples/kemi/kamailio-basic-kemi-lua.lua: fix condition on user agent

Daniel-Constantin Mierla authored on 06/12/2018 09:21:53
Showing 1 changed files
... ...
@@ -134,7 +134,7 @@ function ksr_route_reqinit()
134 134
 			KSR.x.exit();
135 135
 		end
136 136
 	end
137
-	if KSR.corex.has_user_agent() then
137
+	if KSR.corex.has_user_agent() > 0 then
138 138
 		local ua = KSR.pv.gete("$ua");
139 139
 		if string.find(ua, "friendly-scanner")
140 140
 				or string.find(ua, "sipcli") then
... ...
@@ -178,7 +178,7 @@ function ksr_route_withindlg()
178 178
 		elseif KSR.is_ACK() then
179 179
 			-- ACK is forwarded statelessly
180 180
 			ksr_route_natmanage();
181
-		elseif  KSR.is_NOTIFY() then
181
+		elseif KSR.is_NOTIFY() then
182 182
 			-- Add Record-Route for in-dialog NOTIFY as per RFC 6665.
183 183
 			KSR.rr.record_route();
184 184
 		end