On Aug 18, 2008, at 8:48 AM, James Green wrote: > I have noticed the wiki is pretty much non-existant on the subject of > custom events.
Probably true :( The best docs for this are generated by doxygen : http://www.freeswitch.org/docs/switch__types_8h.html#a658 >> From my understanding of the system thus far, I could create a >> number of > custom events that my applications can react to and perform busienss > logic. Correct > One specific example: I could connect to FS and fire an event > "MYPROJECT::OUTBOUND_DIAL" which a separate application could listen > for > and process further. I might therefore have a chain of small apps > developing these and reacting at various stages. > > Is my understanding correct? Can I therefore register an application > to > listen for MYPROJECT::MY_CUSTOM_EVENT and wait until another of my > apps > fires it? The next obvious question is how parameter handling works... All Correct. Params are handled as name/value pair headers in the event. To add headers see switch_event_add_header/ switch_event_add_header_string functions. You can access these with switch_event_get_header. Events also have bodies switvh_event_add_body/switch_event_get_body. A full detail of the event functions is at http://www.freeswitch.org/docs/switch__event_8h.html . > But I shall try to walk before running... > > Thanks, > > James Mike _______________________________________________ Freeswitch-users mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
