@miconda commented on this pull request.

Removing the condition `if(msg->first_line.type != SIP_REPLY) {` seems legit 
from native kamailio.cfg scripting language as the exports limits to 
ONREPLY_ROUTE and the internal interpreter can detect it, but for KEMI (which 
might not be the case here, however, making it as a general comment), it is not 
possible to detect at startup where a function is going to used. Therefore, 
thinking of thee future, it is probably better to have runtime checks about the 
type of message or route block. Even for the native scripting language, there 
are workarounds in some cases to execute a function in another route block 
(e.g., execute request-specific exported functions inside a `route[x]` block 
that is called from on/reply route block.

>From that perspective, I would not remove this check. Over all, I am fine to 
>merge it with this change as well. Nowadays the config writer should be more 
>careful anyhow, especially if using KEMI, to be sure functions are not used in 
>a wrong place.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3521#pullrequestreview-1565340454
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3521/review/[email protected]>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to