[Freeswitch-dev] how to call the function of another module ?

Trixter aka Bret McDanel trixter at 0xdecafbad.com
Fri Sep 11 01:11:03 PDT 2009


On Fri, 2009-09-11 at 15:26 +0800, daqiang wang wrote:
> thanks your reply:  
>    can i use the next code: 
>   1 :  use   api = switch_loadable_module_get_api_interface(cmd) .
> get the application's API . 
> 
>   2 :   run : api->function(arg, session,stream) 
>    
>   is the above is correct ?  
>   

couldnt you call tone_detect before going into voicemail?
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_tone_detect

switch_ivr_tone_detect_session() has the ability to go elsewhere when it
gets the tone.

switch_ivr_tone_detect_session(session, "fax", "1100.0", "r", 0, 1,
MYAPP, MYDATA, NULL);


would this do what you want, without requiring you to write a bunch of
code?
-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
pgp key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721





More information about the FreeSWITCH-dev mailing list