[asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Aksel Celasun

Hello again dear list.


Could you please help with this?

Thank you for all support, you are great, and i am now at a  late stage in the 
setup and tweaking this server,
So I hope you can help me again.
I Can't make include the context nighttime. Just to demonstrate if it works, I 
have a playback function there.
But CLI reports:

CLI
[Jun 18 14:20:22] WARNING[2287]: pbx.c:9542 ast_context_verify_includes: 
Context 'internal' tries to include nonexistent context 
'nighttime|12:30-8:00|mon-fri|*|*'


Extensions.conf
[general]
autofallthrough=yes

[default]

[incoming_calls]

[phones]
include => internal
include => hovedmeny


[internal]
include => to_SIPtrunk
include => nighttime

exten => _10X,1,NoOp()
exten => _10X,n,Dial(SIP/${EXTEN},10)
exten => _10X,n,Playback(kuntiltestt_)
;exten => _10X,n,Playback(vm-nobodyavail&tt-monkeysintro&tt-monkeys)
exten => _10X,n,Hangup()


exten => 4767209600,1,NoOp();
exten => 4767209600,n,Verbose(Callerid num ${CALLERID(num)});
exten => 4767209600,n,Dial(SIP/501,5);
;exten => 4767209600,n,Background(velkommen_abacus&tast123vent_);
;exten => 4767209600,n,WaitExten;
;exten => 4767209600,1,Dial(SIP/200,15);
;exten => 4767209600,1,Goto(submenu,s,1);
exten => 4767209600,n,Playback(kuntiltestt_);
exten => 4767209600,n,Hangup();



[hovedmeny]
exten => 501,1,Answer
exten => 501,n,Wait(2)
exten => 501,n,Playback(velkommen_abacus)
exten => 501,n,Set(Loop=0)
exten => 501,n,While($[${Loop} < 3])
exten => 501,n,Background(tast123vent_)
exten => 501,n,WaitExten(5)
exten => 501,n,Set(Loop=$[${Loop}+1])
exten => 501,n(LoopEnd),EndWhile()
exten => 501,n,Hangup()

exten => 1,1,Playback(tt-weasels)
exten => 1,2,Dial(SIP/200,10,rg)
exten => 1,3,Hangup()

exten => 2,1,Playback(tt-monkeys)
exten => 2,n,Dial(SIP/302,60,rg)
exten => 2,n,Hangup()

exten => 3,1,Dial(SIP/402,60,rg)
exten => 3,n,Hangup
exten => 9,n,Hangup()

exten => i,1,Set(Loop=$[${Loop}+1])
exten => i,n,Goto(LoopEnd)

exten => t,1,Set(Loop=$[${Loop}+1])
exten => t,n,Goto(LoopEnd)


[nighttime]
exten => s,1,Wait(2);
exten => s,n,Playback(tt-somethingwrong);
exten => s,n,Hangup;



[to_SIPtrunk]
exten => _[2-9]XXX, 1, Macro(dial-trunk-sip,${EXTEN});
exten => _0, 1, Macro(dial-trunk-sip,${EXTEN});


[incoming]
exten => s,1,Noop();
exten => s,n,Verbose(Call ${EXTEN});
exten => s,n,Dial(SIP/501);
exten => s,n,Hangup();


[macro-dial-trunk-sip]
exten => s,1,Noop(${ARG1},${CALLERID(num)})
exten => s,n,Set(CALLERID(num)=67209600)
exten => s,n,Dial(SIP/phonect_01/${ARG1})
exten => s,n,Hangup
exten => s,n,MacroExit


Med vennlig hilsen / Best regards
Abacus IT AS
- din Visma Software Partner
- your Visma Software Partner

Tor Aksel Celasun
Mobilnummer/cell phone: (+47) 900 15 103
Sentralbord/Support 4000 1850
ak...@abacus-it.no

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Aksel Celasun
Minor edit on the include => nighttime|12:30-8:00|mon-fri|*|*
Correct now.

Fra: Aksel Celasun
Sendt: 18. juni 2010 14:30
Til: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Emne: Error trying to add context: Context 'internal' tries to include 
nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'


Hello again dear list.


Could you please help with this?

Thank you for all support, you are great, and i am now at a  late stage in the 
setup and tweaking this server,
So I hope you can help me again.
I Can't make include the context nighttime. Just to demonstrate if it works, I 
have a playback function there.
But CLI reports:

CLI
[Jun 18 14:20:22] WARNING[2287]: pbx.c:9542 ast_context_verify_includes: 
Context 'internal' tries to include nonexistent context 
'nighttime|12:30-8:00|mon-fri|*|*'


Extensions.conf
[general]
autofallthrough=yes

[default]

[incoming_calls]

[phones]
include => internal
include => hovedmeny


[internal]
include => to_SIPtrunk
include => nighttime|12:30-8:00|mon-fri|*|*

exten => _10X,1,NoOp()
exten => _10X,n,Dial(SIP/${EXTEN},10)
exten => _10X,n,Playback(kuntiltestt_)
;exten => _10X,n,Playback(vm-nobodyavail&tt-monkeysintro&tt-monkeys)
exten => _10X,n,Hangup()


exten => 4767209600,1,NoOp();
exten => 4767209600,n,Verbose(Callerid num ${CALLERID(num)});
exten => 4767209600,n,Dial(SIP/501,5);
;exten => 4767209600,n,Background(velkommen_abacus&tast123vent_);
;exten => 4767209600,n,WaitExten;
;exten => 4767209600,1,Dial(SIP/200,15);
;exten => 4767209600,1,Goto(submenu,s,1);
exten => 4767209600,n,Playback(kuntiltestt_);
exten => 4767209600,n,Hangup();



[hovedmeny]
exten => 501,1,Answer
exten => 501,n,Wait(2)
exten => 501,n,Playback(velkommen_abacus)
exten => 501,n,Set(Loop=0)
exten => 501,n,While($[${Loop} < 3])
exten => 501,n,Background(tast123vent_)
exten => 501,n,WaitExten(5)
exten => 501,n,Set(Loop=$[${Loop}+1])
exten => 501,n(LoopEnd),EndWhile()
exten => 501,n,Hangup()

exten => 1,1,Playback(tt-weasels)
exten => 1,2,Dial(SIP/200,10,rg)
exten => 1,3,Hangup()

exten => 2,1,Playback(tt-monkeys)
exten => 2,n,Dial(SIP/302,60,rg)
exten => 2,n,Hangup()

exten => 3,1,Dial(SIP/402,60,rg)
exten => 3,n,Hangup
exten => 9,n,Hangup()

exten => i,1,Set(Loop=$[${Loop}+1])
exten => i,n,Goto(LoopEnd)

exten => t,1,Set(Loop=$[${Loop}+1])
exten => t,n,Goto(LoopEnd)


[nighttime]
exten => s,1,Wait(2);
exten => s,n,Playback(tt-somethingwrong);
exten => s,n,Hangup;



[to_SIPtrunk]
exten => _[2-9]XXX, 1, Macro(dial-trunk-sip,${EXTEN});
exten => _0, 1, Macro(dial-trunk-sip,${EXTEN});


[incoming]
exten => s,1,Noop();
exten => s,n,Verbose(Call ${EXTEN});
exten => s,n,Dial(SIP/501);
exten => s,n,Hangup();


[macro-dial-trunk-sip]
exten => s,1,Noop(${ARG1},${CALLERID(num)})
exten => s,n,Set(CALLERID(num)=67209600)
exten => s,n,Dial(SIP/phonect_01/${ARG1})
exten => s,n,Hangup
exten => s,n,MacroExit


Med vennlig hilsen / Best regards
Abacus IT AS
- din Visma Software Partner
- your Visma Software Partner

Tor Aksel Celasun
Mobilnummer/cell phone: (+47) 900 15 103
Sentralbord/Support 4000 1850
ak...@abacus-it.no

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Warren Selby
On Fri, Jun 18, 2010 at 7:44 AM, Aksel Celasun  wrote:

>  Minor edit on the include => nighttime|12:30-8:00|mon-fri|*|*
>
> Correct now.
>
>
This isn't how you do time based checks in asterisk.  Lookup the application
"GotoIfTime".

-- 
Thanks,
--Warren Selby
http://www.selbytech.com
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Tilghman Lesher
On Friday 18 June 2010 09:49:39 Warren Selby wrote:
> On Fri, Jun 18, 2010 at 7:44 AM, Aksel Celasun  wrote:
> >  Minor edit on the include => nighttime|12:30-8:00|mon-fri|*|*
> >
> > Correct now.
>
> This isn't how you do time based checks in asterisk.  Lookup the
> application "GotoIfTime".

Actually, it is an old method that still works, but as Warren mentioned, you
should endeavor to switch to using GotoIfTime, as there's a nasty race
condition inherent in using timed includes.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Aksel Celasun
Hi again

Thank you Warren, GotoIfTime was  the deal!
And easy to use!
Gr8.


Best regards.


Aksel

Fra: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] På vegne av Warren Selby
Sendt: 18. juni 2010 16:50
Til: Asterisk Users Mailing List - Non-Commercial Discussion
Emne: Re: [asterisk-users] Error trying to add context: Context 'internal' 
tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

On Fri, Jun 18, 2010 at 7:44 AM, Aksel Celasun 
mailto:ak...@abacus-it.no>> wrote:
Minor edit on the include => nighttime|12:30-8:00|mon-fri|*|*
Correct now.


This isn't how you do time based checks in asterisk.  Lookup the application 
"GotoIfTime".

--
Thanks,
--Warren Selby
http://www.selbytech.com
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Error trying to add context: Context 'internal' tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

2010-06-18 Thread Aksel Celasun
Thank you for the info.
As I wrote to Warren GotoIfTime was easy to use and seemed more flexible,
Got it working now! Perfect!

Only one thing left now, and my system is pretty much ready for live testing,
Surely easy for the user list, so it will come in another mail soon, after I 
have done 
Some more research. (how the receptionist can transfer calls to SIP extensions 
internally)


Best regards 

Aksel

-Opprinnelig melding-
Fra: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] På vegne av Tilghman Lesher
Sendt: 18. juni 2010 18:01
Til: Asterisk Users Mailing List - Non-Commercial Discussion
Emne: Re: [asterisk-users] Error trying to add context: Context 'internal' 
tries to include nonexistent context 'nighttime|12:30-8:00|mon-fri|*|*'

On Friday 18 June 2010 09:49:39 Warren Selby wrote:
> On Fri, Jun 18, 2010 at 7:44 AM, Aksel Celasun  wrote:
> >  Minor edit on the include => nighttime|12:30-8:00|mon-fri|*|*
> >
> > Correct now.
>
> This isn't how you do time based checks in asterisk.  Lookup the
> application "GotoIfTime".

Actually, it is an old method that still works, but as Warren mentioned, you
should endeavor to switch to using GotoIfTime, as there's a nasty race
condition inherent in using timed includes.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users