[asterisk-dev] wanna be asterisk-dev

Valter Nogueira vgnogueira at gmail.com
Sun May 31 17:42:48 CDT 2009


Hi Nir,

thanks for your comments.

My outbound campaigns are strutured as a set of CONTEXTS - including IVR
options.

Each action in the campaign is transformed into a CONTEXT. My end-users
program each campaingn as follow

ACTION: 010_START                            NEXT_ACTION: 020_PLAY_WELCOME
ACTION: 020_PLAY_WELCOME           NEXT_ACTION: 030_IVR
ACTION: 030_IVR                                 NEXT_ACTION:
NONE                                1_ACTION: ...., #_ACTION: ....

Every action I transform into a CONTEXT that executes some asterisk app and
finally branchs to the next one - some what like this:

[010_START]

exten => s,1,agi(callprogress, 'success')
exten => s,n,goto(020_PLAYWELCOME, s,1)
exten => s,n,hangup()

exten => failed,1,agi(callprogress,'failed')
exten => failed,n,hangup()

[020_PLAYWELCOME]

exten => s,1,agi(callprogress, 'playback', filename)
exten => s,n,playbakc(filename)
exten => s,n,goto(030_IVR,s,1)

[030_IVR]

exten => s,1,agi(callprogress,'ivr')
exten => s,n,waitexten()

exten => 1,1,goto(.......)

When I originate the call using a ZAP channel and I direct it to extension
010_START, s, 1 - if originate fails it leads automatically to 010_START,
failed, 1

This way I was able to produce manually elaborated campaigns using just
extension.conf and a python script that generated callfiles.

Now I am going a step further making all that things automatically

Thanks,

Valter


2009/5/31 Nir Simionovich <nir.simionovich at gmail.com>

> 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
>
>
> _______________________________________________
> --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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090531/219b2ba6/attachment.htm 


More information about the asterisk-dev mailing list