The exact equiv of what you showed would be this:
static int pbx_dial(switch_core_session_t *session, void *data)
{
const switch_application_interface_t *application_interface;
int ret;
char *app_name = "bridge";
char *app_arg = (char *) data;
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
application_interface->application_function(session, app_arg);
return 0;
} else {
return -1;
}
}
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400
----- Original Message ----
From: Mindaugas Kezys <mkezys@gmail.com>
To: freeswitch-users@lists.freeswitch.org
Sent: Tuesday, April 17, 2007 11:59:19 AM
Subject: [Freeswitch-users] Dial from inside application
Hello,
How to dial from inside application in FreeSwitch?
I have such Asterisk code:
static int pbx_dial(struct ast_channel *chan, void *data)
{
struct ast_app *app;
int ret;
app = pbx_findapp("Dial");
if (app) {
ret = pbx_exec(chan,
app, data);
} else {
ast_log(LOG_WARNING,
"Could not find application (Dial)\n");
ret = -2;
}
return ret;
}
What is the equivalent in FreeSwitch world?
Thank you for your help.