I'd avoid else also

if (!is_method())
   return;

if (!has_sdp())
   return;

And so on

Le mar. 25 mars 2025 à 09:38, Sergey Safarov via sr-users <
[email protected]> a écrit :

> I want to use contributions like
>
> route[PROXY_MEDIA]
> {
>     if (is_method("BYE|CANCEL")) {
>         # passing message for RTPengine processing
>     } else if (!sdp_content()) {
>         return;
>     }
>     # more instructions here
>     ...
>     rtpengine_manage();
> }
>
> Now Kamailio cannot start because first if block has empty actions.
> How does nothing in the actions?
> I want to avoid not needed log messages and do not use constructions like
>
> if (!sdp_content() and ! is_method("BYE|CANCEL")) {
>     return;
> }
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>


-- 
Best regards,
Ihor (Igor)
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to