• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[asterisk-dev] wanna be asterisk-dev

 
   AsteriskGuru Archives Forum Index -> Asterisk-Dev
View previous topic :: View next topic  
Author Message
vgnogueira at gmail.com
Guest





PostPosted: Sun May 31, 2009 3:15 pm    Post subject: [asterisk-dev] wanna be asterisk-dev

Hi people,
 
I am a wanna be asterisk-dev, but the learning curve is somewhat hard.
 
Do you have any clues such "IDE", debugging tools and what ever could help?
 
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.
 
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.
 
Thank you all,
 
Valter
Back to top
nir.simionovich at gmail.
Guest





PostPosted: Sun May 31, 2009 4:01 pm    Post subject: [asterisk-dev] wanna be asterisk-dev

Hi Valter,

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

Valter Nogueira wrote:
Quote:
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

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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@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
Back to top
vgnogueira at gmail.com
Guest





PostPosted: Sun May 31, 2009 9:55 pm    Post subject: [asterisk-dev] wanna be asterisk-dev

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@gmail.com (nir.simionovich@gmail.com)>
Quote:
Hi Valter,

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

Valter Nogueira wrote:
Quote:
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

Quote:
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.

Quote:
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.

Quote:
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"

Quote:

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.
>

Quote:
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
>

Quote:
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?
>

Quote:
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.

Quote:
Thank you all,

Valter


------------------------------------------------------------------------
>

Quote:
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:

Quote:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


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

  (e) nir.simionovich@gmail.com (nir.simionovich@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
Back to top
kpfleming at digium.com
Guest





PostPosted: Mon Jun 01, 2009 11:18 am    Post subject: [asterisk-dev] wanna be asterisk-dev

Valter Nogueira wrote:

Quote:
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

As a simple step, you can use #exec from within extensions.conf to run
another Python script to generate all the needed contexts; you still
have to 'reload' to get them into memory, but you don't have to edit any
text files or duplicate the information.

--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org

_______________________________________________
--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
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Dev All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™