[asterisk-dev] wanna be asterisk-dev

Nir Simionovich nir.simionovich at gmail.com
Sun May 31 11:49:44 CDT 2009


Hi Valter,

   Welcome to the DEV list, please find my comments below:

Valter Nogueira wrote:
> Hi people,
>  
> I am a wanna be asterisk-dev, but the learning curve is somewhat hard.
>  

   As a newbie developer myself, I agree that the learning curve is 
steep and hard. The best way to learn is to read various code snippets 
and try to extrapolate what they do. That's what I did when I started 
working on adding Hebrew to app_voicemail.c and say.c

> Do you have any clues such "IDE", debugging tools and what ever could help?
>  

   Well, I'm using a mixture of Eclipse with the CDT plugins and VIM. 
Debugging is always done with GDB - other than that, just follow the 
Digium coding guidelines.

> Should I start on 1.4 or 1.6 version - I am using 1.4 as user so I think 
> it is most apropriate stick with it as dev.
>  

   Actually, the best choice will be SVN. If you write a new feature, it 
will only be evaluated on the SVN. If you fix a bug for 1.6 or 1.4, that 
  can be done directly on the version, however, still needs to be ported 
to the SVN version. Just like you, I started working on the 1.4 version, 
quickly to realize that I need to do my work twice each time - so I 
migrated to SVN version.

> I am developing an Asterisk based dialer. My first version write down an 
> extension.conf - so I reload it every time config changes.
>  
> So, I thought: What if I create extensions on the fly: "DIALPLAN ADD 
> EXTENSION 1111,1,COMMAND INTO MYCONTEXT"
>  
> It sounded great, but just worked if MYCONTEXT is already present (what 
> is not always the case).
>  
> I thought again (what is not usual): Source code can answer it to me.
>  
> Now the hard part where in the damn giant source code DIAL PLAN ADD 
> EXTENSION is handled.
>  
> Few greps after I found it -> pbx_config.c - where I found 2 function - 
> one marked as deprecated
>  
> How should I debug asterisk to get here and understand what is happening?
>  
> Should asterisk create a new dialplan context when adding an extension?
>  
> Is there some other way to dynamically add or remove CONTEXTS?
>  
> Do you have any tips for me.
>  

   As far as I know, these functions are now available via the Asterisk 
manager. In any case, I'm not sure you are going in the right direction, 
as I can't see a relation between a dialer and auto-generating 
extensions.conf. My only logic here would be that you are originating a 
call out of Asterisk, then, creating a special dialplan for that call, 
re-directing the generated the call to the newly created dialpan. In any 
case, it would suggest that you're over complicating things (at least in 
my book - literally).

   Have a safe journey in learning the inner workings of Asterisk's 
source code. If you drink coffee (or alcohol for that matter), this 
would be a good point to pour yourself a pint of your finest beer, gulp 
it down and use the code.

> Thank you all,
>  
> Valter
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev


-- 
Kind Regards,
   Nir Simionovich
   Asterisk Community Founder and Maintainer - Israel

   (e) nir.simionovich at gmail.com
   (w) http://www.simionovich.com




More information about the asterisk-dev mailing list