@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, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.