Hi Sergey,

Just add a ; or – if you want to add something more meaningful, you can also 
use a xdbg statement.

if (is_method("foobar")) {
        ;
}

Cheers,

Henning

From: Sergey Safarov via sr-users <[email protected]>
Sent: Dienstag, 25. März 2025 09:21
To: Kamailio (SER) - Users Mailing List <[email protected]>
Cc: Sergey Safarov <[email protected]>
Subject: [SR-Users] is possible empty actions?

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!

Reply via email to