Hello,

exit will stop the execution of the kamailio cfg script, so no code from the cfg file that comes after that statement will be executed. Just to be complete, Kamailio might execute other, implicit actions not related to the cfg script, e.g. if you send out a request etc..

Cheers,

Henning

Am 26.08.19 um 14:45 schrieb PICCORO McKAY Lenz:
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)

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services