how to call the function of another module ?
hello : How can i to call the funciton in another module ? example: I want to add code in mod_voicemail. to call rxfax. the function of mod_fax . what's the step to do ? thanks .
We don't allow calling functions between modules. You can look at the api interface for a way to trigger things between modules or possibly the event system. Mike On Sep 11, 2009, at 1:30 AM, daqiang wang wrote:
hello : How can i to call the funciton in another module ? example: I want to add code in mod_voicemail. to call rxfax. the function of mod_fax . what's the step to do ? thanks .
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 ? thank you very much ! 2009/9/11 Michael Jerris <mike@jerris.com>
We don't allow calling functions between modules. You can look at the api interface for a way to trigger things between modules or possibly the event system.
Mike
On Sep 11, 2009, at 1:30 AM, daqiang wang wrote:
hello : How can i to call the funciton in another module ? example: I want to add code in mod_voicemail. to call rxfax. the function of mod_fax . what's the step to do ? thanks .
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
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
switch_api_execute : http://docs.freeswitch.org/group__mods.html#g0061fcba2f3bc30e61b59df815816dc... On Sep 11, 2009, at 3:26 AM, 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 ?
thank you very much !
2009/9/11 Michael Jerris <mike@jerris.com> We don't allow calling functions between modules. You can look at the api interface for a way to trigger things between modules or possibly the event system.
Mike
On Sep 11, 2009, at 1:30 AM, daqiang wang wrote:
hello : How can i to call the funciton in another module ? example: I want to add code in mod_voicemail. to call rxfax. the function of mod_fax . what's the step to do ? thanks .
I think. This is what i want. Thank you very much ! 2009/9/12 Michael Jerris <mike@jerris.com>
switch_api_execute : http://docs.freeswitch.org/group__mods.html#g0061fcba2f3bc30e61b59df815816dc... On Sep 11, 2009, at 3:26 AM, 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 ?
thank you very much !
2009/9/11 Michael Jerris <mike@jerris.com>
We don't allow calling functions between modules. You can look at the api interface for a way to trigger things between modules or possibly the event system.
Mike
On Sep 11, 2009, at 1:30 AM, daqiang wang wrote:
hello : How can i to call the funciton in another module ? example: I want to add code in mod_voicemail. to call rxfax. the function of mod_fax . what's the step to do ? thanks .
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (3)
-
daqiang wang
-
Michael Jerris
-
Trixter aka Bret McDanel