[OpenSIPS-Users] Should exec be async() inside an Event Route

John Quick john.quick at smartvox.co.uk
Thu Sep 9 14:57:07 EST 2021

I'm working on Push Notifications in v3.1. An event is raised when a PN
needs to be sent to the mobile device.
In my event route I call exec() to run a small PHP program which uses curl
to send the request to Firebase.
Now exec() is a blocking function so would it be sensible to wrap the call
in the async() function?

The module documentation states that "the triggered event_route is run
asynchronous (and in a different process) in regards to the code or process
that generated the actual event". If each event runs in a dedicated process,
does that mitigate the need for asynchronous execution or is async() still a
good idea?

John Quick
Smartvox Limited

More information about the Users mailing list