pretty much strait forward...<br><br>T.<br><br><div class="gmail_quote">On Sun, Oct 4, 2009 at 11:12 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">so your app names are lnp_getprefix lbs_getpublicphone cps_verifyphone and lookup_service_destination<div><br></div><div>Mike</div><div><div></div><div class="h5"><div><br><div><div>On Oct 3, 2009, at 7:45 PM, Tihomir Culjaga wrote:</div>
<br><blockquote type="cite">this is how i do it:<br><br><br>SWITCH_MODULE_LOAD_FUNCTION(mod_optimaload)<br>{<br>        switch_application_interface_t *app_interface;<br><br>        *module_interface = switch_loadable_module_create_module_interface(pool,<br>

                modname);<br>        SWITCH_ADD_APP(app_interface, &quot;lnp_getprefix&quot;, NULL, NULL, lnp_getprefix_function, &quot;in &lt;recipient_data&gt;, out &lt;varname&gt;&quot;, SAF_SUPPORT_NOMEDIA);<br>        SWITCH_ADD_APP(app_interface, &quot;lbs_getpublicphone&quot;, NULL, NULL, lbs_getpublicphone_function, &quot;in &lt;inviter_data&gt;, in &lt;recipient_data&gt;, out &lt;varname&gt;&quot;, SAF_SUPPORT_NOMEDIA);<br>

        SWITCH_ADD_APP(app_interface, &quot;cps_verifyphone&quot;, NULL, NULL, cps_verifyphone_function, &quot;in &lt;recipient_data&gt;, out &lt;varname&gt;&quot;, SAF_SUPPORT_NOMEDIA);<br>        SWITCH_ADD_APP(app_interface, &quot;lookup_service_destination&quot;, NULL, NULL, lookup_service_destination_params_function, &quot;in &lt;inviter_phone&gt;, in &lt;inviter_prefix&gt;, in &lt;recipient_phone&gt;, in &lt;recipient_prefix&gt;, in &lt;redirect_gw_address&gt;, out &lt;contacts&gt;, out &lt;radius_auth_result&gt;&quot;, SAF_SUPPORT_NOMEDIA);<br>

<br><br>        config_optima();<br>        config_otidka();<br><br>        unit_tests();<br><br>        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,<br>                        &quot;mod optima services is loaded.\n&quot;);<br>

<br>        return SWITCH_STATUS_SUCCESS;<br>}<br><br><br><br><br>later in the DP you just do this:<br><br>      &lt;extension name=&quot;LNP&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;(^300000)(.*)&quot;&gt;<br>

          &lt;action application=&quot;lnp_getprefix&quot; data=&quot;in $2, out reroutingalias&quot;/&gt;<br>          &lt;action application=&quot;redirect&quot; data=&quot;sip:${<a href="http://reroutingalias%7D%4010.4.13.11%3A5060" target="_blank">reroutingalias}@10.4.13.11:5060</a>&quot;/&gt;<br>

        &lt;/condition&gt;<br>      &lt;/extension&gt;<br><br><br><br>T.<br><br><br><div class="gmail_quote">On Sat, Oct 3, 2009 at 5:56 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="">You are wanting to execute a dialplan application.  Take a look at mod_skel, or a simple module in src/mod/applications such as mod_rss for an example of how to write the code.  In your module you set the name of the application you are registering and then you use that name in the dialplan.<div>

<br></div><div>Mike</div><div><div><br><div><br><div><div>On Oct 3, 2009, at 11:45 AM, Francisco Scaramanga wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="font-size: 10pt; font-family: Verdana;">

I want to create my own freeswitch module which should simply answer a call and write the audiostream into a file.<span> </span><br>Here is the dialplan:<br>  <br>    &lt;extension name=&quot;my new module&quot;&gt;<br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^54321$&quot;&gt;<br>

        &lt;action application=&quot;mod_myModul&quot; data=&quot;&quot;/&gt;<br>      &lt;/condition&gt;<br>    &lt;/extension&gt;<span> </span><br> <br> The question is how the dialplan entry (application=&quot;mod_myModule&quot;) gets associated with mod_myModul so that the dialplan actually executes mod_myModul? I need to understand the mechanism in general but I can&#39;t find useful documentation for that.<span> </span><br>

 </div></span></blockquote></div></div></div></div></div></blockquote></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>