[Freeswitch-dev] How to invoke Freeswitch APIs from other modules

Peter Hillier peterhillier at yahoo.com
Fri Jan 17 02:22:47 MSK 2014


Hi folks,
I am working on a pet project in order to become more familiar with Freeswitch. I have added my own module and APIs successfully, but am stuck when it comes to communicating with the other modules in Freeswitch. I see that other modules "export" functionality via APIs, but am not sure how, from within a C software routine in another Freeswitch module, that I should invoke this functionality.

More specifically I want to call the sofia module API to flush all internal registrations (flush_inbound_reg) when some condition is triggered in my module. This module is written in C code, and I have googled my brains out trying to find an example of how to do this. Which is better: mod_event_socket. mod? xml_curl? RPC?   I cannot seem to find any examples of how to create events in C (e.g. what parameters need to be specified), and what is the best solution for local communications.

I could modify my local copy of sofia to provide direct calls, but I prefer to understand how this is intended to be done with the existing tools. I have the feeling I am missing something simple and would appreciate any pointers that anyone can provide.

Thanks,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20140116/d7932598/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev mailing list