[Asterisk-Users] Having trouble with extensions in an include
file and retrieve_extensions_from_mysql.pl
beonice
beonice at yahoo.com
Thu Feb 17 13:18:11 MST 2005
I've finally figured the problem. It turns out that it
had nothing to do with the include file. When I was
commenting out unnecessary extensions in the main
extensions.conf, I commented out the line:
exten => _NXXNXXXXXX,1,Background(welcome) ;
I did not realise (it's not mentioned anywhere) that
this particular extension NEEDS to be handled, but as
soon as I added this line back in, it fixed the
problem. Now I have asterisk reading multiple contexts
happily from the included file, answering the phone
when it rings, and letting me leave myself voicemail.
Very cool.
Could someone explain why this line is so important?
I'm assuming that incoming calls in other countries
will have different patterns for the incoming dialed
number. How does asterisk handle that? Can we add the
explanation to that question into the FAQ somewhere?
Thanks again, everyone!
Cheers,
Maya
--- beonice <beonice at yahoo.com> wrote:
> --- Andrew Thompson <asteriskuser at aktzero.com>
> wrote:
>
> --- snip ---
> >
> > The only thing that seems out of place to me is
> your
> > #include in
> > [main_vp_context]. It looks to me like you intend
> > for the s, #, t, and i
> > extensions to be in [main_vp_context]. The way you
> > layed out this
> > example, that's not what is happenning.
> >
> > I think you wanted this:
> >
> > Your extensions_from_mysql.conf should still look
> > like:
> >
> > [vp_context]
> > exten => 1000,1,Record(/tmp/rec:gsm) ;
> > exten => 1000,2,Playback(/tmp/rec) ;
> > exten => 1000,3,Background(goodbye) ;
> > exten => 1000,4,Hangup() ;
> >
> >
> > Then, in extensions.conf:
> >
> > #include <extensions_from_mysql.conf>
> >
> > [main_vp_context]
> > exten => s,1,Answer
> > exten => #,1,Background(goodbye) ; Notify caller
> > exten => #,2,Hangup() ; Hang up
> > exten => t,1,Hangup() ; Hang up if timeout
> > exten => i,1,Playback(invalid) ; Play "invalid
> > ; extension" if
> > caller
> > ; misdials an
> > extension
> > include => vp_context
> >
> > This way, you define both contexts, and include
> the
> > extensions that were
> > defined in [vp_context] into [main_vp_context].
> >
> > I don't know if this will resolve your other
> > problem, but I believe this
> > is the dialplan you were trying to build.
> >
> Hi, Andrew.
>
> Yes, I see what you are saying. This sounds
> backwards,
> but it's actually doing what I _want_ it to do. :)
>
> >From what I see in the dialplan, what asterisk does
> is, it loads the handlers for '#', 't' and 'i' as
> part
> of vp_context, not as part of main_vp_context. That
> actually happens to be as I wanted it.
>
> main_vp_context is simply a place-holder for when I
> am
> testing without the include file, and in those
> cases,
> I simply comment out my include file and voila,
> those
> handlers now handle the main_vp_context incoming
> cases.
>
> I know, I'm weird. :)
>
> I'm seriously concerned that my problem may be
> caused
> by some interaction between asterisk and voicepulse:
> at the time of writing this, even with a simple
> extensions.conf that has no included files at all, I
> cannot dial in to the asterisk box ... all calls are
> being rejected.
>
> Now I've spent a few minutes on (non-toll-free) hold
> with Voicepulse, sent them copies of my
> extensions.conf and iax.conf and am waiting for a
> response. Life really is exciting on the bleeding
> edge.
>
> Cheers,
> Maya
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn
> more.
> http://info.mail.yahoo.com/mail_250
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
>
http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>
>
http://lists.digium.com/mailman/listinfo/asterisk-users
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
More information about the asterisk-users
mailing list