<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt"><br>The exact equiv of what you showed would be this:<br><br>static int pbx_dial(switch_core_session_t *session, void *data)<br>{<br> const switch_application_interface_t *application_interface;<br> int ret;<br> char *app_name = "bridge";<br> char *app_arg = (char *) data;<br><br> if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {<br> application_interface->application_function(session, app_arg);<br> return 0;<br> } else {<br> return -1;<br> }<br>}<br><br><br><div> </div><div>Anthony Minessale II<br><br><span>FreeSWITCH <a
target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a></span><br><span>ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a></span><br><br>AIM: anthm<br>MSN:anthony_minessale@hotmail.com<br>JABBER:anthony.minessale@gmail.com<br>IRC: irc.freenode.net #freeswitch</div><div><br>FreeSWITCH Developer Conference<br>sip:888@conference.freeswitch.org<br>iax:guest@conference.freeswitch.org/888<br>googletalk:conf+888@conference.freeswitch.org<br>pstn:213-799-1400</div><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Mindaugas Kezys <mkezys@gmail.com><br>To: freeswitch-users@lists.freeswitch.org<br>Sent: Tuesday, April 17, 2007 11:59:19 AM<br>Subject: [Freeswitch-users] Dial from inside application<br><br>
<style>
<!--
_filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
_filtered {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman", "serif";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
pre
        {margin:0cm;margin-bottom:.0001pt;font-size:10.0pt;font-family:"Courier New";}
span.HTMLPreformattedChar
        {font-family:Consolas;}
span.EmailStyle19
        {font-family:"Calibri", "sans-serif";color:#1F497D;}
.MsoChpDefault
        {font-size:10.0pt;}
_filtered {margin:3.0cm 1.0cm 2.0cm 3.0cm;}
div.Section1
        {}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Hello,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">How to dial from inside application in FreeSwitch?</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">I have such Asterisk code:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">static int pbx_dial(struct ast_channel *chan, void *data)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">{</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> struct ast_app *app;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> int ret;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> app = pbx_findapp("Dial");</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> if (app) {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> ret = pbx_exec(chan,
app, data); </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> } else {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> ast_log(LOG_WARNING,
"Could not find application (Dial)\n");</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> ret = -2;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> }</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> return ret;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">}</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">What is the equivalent in FreeSwitch world?</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Thank you for your help.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span></p>
<div>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Regards/Pagarbiai,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Mindaugas Kezys</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><span><a target="_blank" href="http://www.kolmisoft.com">http://www.kolmisoft.com</a></span></span><span lang="EN-US"> </span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
</div>
<div>_______________________________________________<br>Freeswitch-users mailing list<br>Freeswitch-users@lists.freeswitch.org<br><a target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></div><br></div></div><br>
<hr size=1>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>
</body></html>