[SR-Users] exit stop procesing or not after a conditional? based on "exit" core docs seems does not explain behaviour

PICCORO McKAY Lenz mckaygerhard at gmail.com
Mon Aug 26 14:45:39 CEST 2019


in my kamailio-asterisk integration i have a exit after the authentication
logic, BUT; there's another conditional after the "exit" sentence,

so my ask, if there's a exit in that piece of code .. that next conditional
will not be executed?
Docs seems said "stop execution of script" so all the rest of the logic in
file will not be routed?

The documentation seems does not explain in good behavior what happened or
the kamailio-asterisk wiki page does not have good explanations for that!
it's that an error?

https://www.kamailio.org/wiki/cookbooks/4.3.x/core#exit

   -
   -

   ```
   if (from_uri==myself)
   		{#!ifdef WITH_ASTERISK
   			if (!proxy_authorize("$fd", "sipusers")) {#!else
   			if (!proxy_authorize("$fd", "subscriber")) {#!endif
   				proxy_challenge("$fd", "0");
   				exit;
   			}
   			if (is_method("PUBLISH"))
   			{
   				if ($au!=$tU) {
   					sl_send_reply("403","Forbidden auth ID");
   					exit;
   				}
   			} else {
   				if ($au!=$fU) {
   					sl_send_reply("403","Forbidden auth ID");
   					exit;
   				}
   			}

   			consume_credentials();
   			# caller authenticated
   		} else {
   			# caller is not local subscriber, then check if it calls
   			# a local destination, otherwise deny, not an open relay here
   			if (!uri==myself)
   			{
   				sl_send_reply("403","Not relaying");
   				exit;
   			}
   		}
   	}

   #!endif
   	return;
   }
   ```

    8:52 am




Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190826/22cbe5e8/attachment.html>


More information about the sr-users mailing list