Event System | FreeSWITCH Documentation tells me “For a comprehensive list of events, see Event List.”
Going to Event List | FreeSWITCH Documentation I find a list of events, but it’s not comprehensive, because for example NOTIFY_IN is not shown.
I have after several days of struggling managed to get FreeSwitch to run a lua script when a NOTIFY_IN event occurs.
Where can I find the documentation telling me how to get the values from that event?
I’ve found Events | FreeSWITCH Documentation (which does list NOTIFY_IN) and has a section at the end named “How to process events” but simply lists a few languages etc which could be used - it still doesn’t seem to tell me how to get the detail of what the event actually contains.
you are able to scroll to the bottom, and click Edit This Page, process any edits you think may clarify, and issue a Pull Request from GitHub, I’ll review and merge it if the changes make sense.
In trying to work out why FreeSwitch isn’t generating a NOTIFY_IN event in response to an incoming NOTIFY whose Event is “message-summary”, I’ve started tracing backwards through the C source from the error message “Gateway information missing Subscription Event”.
Everything seems to be in the single file src/mod/endpoints/mod_sofia/sofia.c
So far I’ve found:
The message is generated from the function sofia_handle_sip_i_notify when looking at the data structure sofia_private.
This data structure is passed through the function our_sofia_event_callback
This is called from the function sofia_process_dispatch_event
This function creates the sofia_private structure using the function call:
nua_handle_magic(de->nh)
Now I get stuck. There is no definition anywhere of the function nua_handle_magic.
Looking online I find references to nua.c but this doesn’t exist in the FreeSwitch source code (at least, not in the copies I have, for versions 1.10.6 and 1.10.9)
So, can anyone point me from here to find out what the function nua_handle_magic does please?
This makes me believe that the error message “Gateway information missing Subscription Event” is being generated because the structure sofia_private does not even exist, never mind have the required content (the actual test being performed is: if (!sofia_private || zstr(sofia_private->gateway_name))
so it wasn’t initially clear to me which part was failing).
Can anyone please point me at where nua_handle_magic is defined (I can’t understand how FreeSwitch would even compile if this is not present)?
I really want to get to the bottom of this, even if I end up modifying source code and re-compiling, but currently the lack of any apparent way to get at the content of a NOTIFY from a remote PBX for an Event message-summary is a significant problem for me.