A couple of issues/suggestions:
- I would not allocate msg, declaring it as a local sip_msg_t should enough
- no matter if msg is pointer or sip_msg_t, free_sip_msg() has to be used to clean up
allocated memory by parsing
- I would not run the event route with a faked message, either the cancel is
built/parsed fine and run the event route, or throw an error message
- the condition to execute the event route should be useless, there are some returns
before that should ensure that either there is a proper event_route block or a kemi
callback event name.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3962#issuecomment-2317143766
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3962/c2317143766(a)github.com>