Re: [asterisk-users] Goto in Realtime extensions

2008-02-08 Thread Yves Räber
That's very unfortunate.

I use now a workaround : I'm just switching (with gotos) between
extensions and use some macros but always within the same context.

I'll try to remeber it for next time :)

Cheers,

Yves.

On Fri, 2008-02-08 at 14:36 +0200, Atis Lezdins wrote:
 On 2/8/08, Yves Räber [EMAIL PROTECTED] wrote:
  * Version: Asterisk 1.4.14
 
  * Commas instead of pipes = already tried, this is not working at all
 
  * Realtime switch for script_13_0 = No, should I ? This would be really
  a shame, I want to use realtime BECAUSE I don't want to play with my
  extensions.conf file. (I'm building a web interface that has to generate
  the contexts).
 
 Yes, unfortuneately that's the thing you have to do. You have to add
 each context you want - in static conf file like this:
 
 [db_na]
 switch = Realtime/db_na
 
 [db_busy]
 switch = Realtime/db_busy
 
 You can have as many extensions you like with whatever commands, but
 contexts still should be registered. Generally editing and debugging
 of complete dialplan in DB is not so easy - so you should keep your
 main logic in static, but use realtime for data that actually changes.
 
 Regards,
 Atis
 
 
  * Using numbers instead of 's' = already tried, no changes
 
  * Renaming contexts without underscores = tried it right now, no
  changes
 
  Thanks for all those ideas.
 
  Yves.
 
  On Thu, 2008-02-07 at 17:39 +0200, Atis Lezdins wrote:
   On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
I would have been happy ... but it's not that. This query gives me the
right row (I double checked).
   
On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
 On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
  Hello,
 
  I'm having troubles while using the Goto function in a realtime
  extension. Here is the error message :
 
  -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
  -- Goto (script_13_0,s,1)
  [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
  'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
  'script_13_0', but no invalid handler
 
  And I definitively have a row in my extensions table with context
  script_13_0, exten s and priority 1 !
 
  I also tried to goto in another context that is in my 
  extensions.conf
  file, and it works.
 
  Is this a restriction or a bug ? It seems that it's not possible to
  Goto to another context within the realtime extensions.

 It's impossible to guess what might be wrong, because you haven't 
 included
 a dump from your table.  Try a:

 SELECT * FROM extensions_table WHERE exten='s' AND 
 context='script_13_0'
 AND priority='1'

 If that fails, you have your answer.

  
   What version? You could try replacing pipes with commas. Do you have
   realtime switch statement for script_13_0? Can you try renaming
   context to not use underscores? Try using not s but any number (and
   create extension _X.)
  
   Regards,
   Atis
  
 
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  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 --

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

Re: [asterisk-users] Goto in Realtime extensions

2008-02-08 Thread Atis Lezdins
On 2/8/08, Yves Räber [EMAIL PROTECTED] wrote:
 That's very unfortunate.

 I use now a workaround : I'm just switching (with gotos) between
 extensions and use some macros but always within the same context.

Well, you should create contexts for your main features, and you can
write few of them in extensions.conf - it's a small trouble when
compared to gain from separation of different functionality.

Regards,
Atis


 I'll try to remeber it for next time :)

 Cheers,

 Yves.

 On Fri, 2008-02-08 at 14:36 +0200, Atis Lezdins wrote:
  On 2/8/08, Yves Räber [EMAIL PROTECTED] wrote:
   * Version: Asterisk 1.4.14
  
   * Commas instead of pipes = already tried, this is not working at all
  
   * Realtime switch for script_13_0 = No, should I ? This would be really
   a shame, I want to use realtime BECAUSE I don't want to play with my
   extensions.conf file. (I'm building a web interface that has to generate
   the contexts).
 
  Yes, unfortuneately that's the thing you have to do. You have to add
  each context you want - in static conf file like this:
 
  [db_na]
  switch = Realtime/db_na
 
  [db_busy]
  switch = Realtime/db_busy
 
  You can have as many extensions you like with whatever commands, but
  contexts still should be registered. Generally editing and debugging
  of complete dialplan in DB is not so easy - so you should keep your
  main logic in static, but use realtime for data that actually changes.
 
  Regards,
  Atis
 
  
   * Using numbers instead of 's' = already tried, no changes
  
   * Renaming contexts without underscores = tried it right now, no
   changes
  
   Thanks for all those ideas.
  
   Yves.
  
   On Thu, 2008-02-07 at 17:39 +0200, Atis Lezdins wrote:
On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
 I would have been happy ... but it's not that. This query gives me the
 right row (I double checked).

 On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
  On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
   Hello,
  
   I'm having troubles while using the Goto function in a realtime
   extension. Here is the error message :
  
   -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
   -- Goto (script_13_0,s,1)
   [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: 
   Channel
   'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
   'script_13_0', but no invalid handler
  
   And I definitively have a row in my extensions table with context
   script_13_0, exten s and priority 1 !
  
   I also tried to goto in another context that is in my 
   extensions.conf
   file, and it works.
  
   Is this a restriction or a bug ? It seems that it's not possible 
   to
   Goto to another context within the realtime extensions.
 
  It's impossible to guess what might be wrong, because you haven't 
  included
  a dump from your table.  Try a:
 
  SELECT * FROM extensions_table WHERE exten='s' AND 
  context='script_13_0'
  AND priority='1'
 
  If that fails, you have your answer.
 
   
What version? You could try replacing pipes with commas. Do you have
realtime switch statement for script_13_0? Can you try renaming
context to not use underscores? Try using not s but any number (and
create extension _X.)
   
Regards,
Atis
   
  
  
   ___
   -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  
   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 --

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


-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835

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

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


Re: [asterisk-users] Goto in Realtime extensions

2008-02-08 Thread Mike Clark
We are building a Ruby on Rails interface that we will probably put out 
as open source later this spring. I worked around this problem with 
#exec statements. This is what is in my extensions.conf file:

#exec /path/to/scripts/load_extensions.rb


This runs a Ruby script that rips through my extensions table and builds 
a context with the appropriate switch statement for each realtime 
context. The output is included much like the text from an include 
file.  Of course, it still requires a reload if you add a brand new context.

regards,

Mike Clark

Yves Räber wrote:
 That's very unfortunate.

 I use now a workaround : I'm just switching (with gotos) between
 extensions and use some macros but always within the same context.

 I'll try to remeber it for next time :)

 Cheers,

 Yves.

 On Fri, 2008-02-08 at 14:36 +0200, Atis Lezdins wrote:
   
 On 2/8/08, Yves Räber [EMAIL PROTECTED] wrote:
 
 * Version: Asterisk 1.4.14

 * Commas instead of pipes = already tried, this is not working at all

 * Realtime switch for script_13_0 = No, should I ? This would be really
 a shame, I want to use realtime BECAUSE I don't want to play with my
 extensions.conf file. (I'm building a web interface that has to generate
 the contexts).
   
 Yes, unfortuneately that's the thing you have to do. You have to add
 each context you want - in static conf file like this:

 [db_na]
 switch = Realtime/db_na

 [db_busy]
 switch = Realtime/db_busy

 You can have as many extensions you like with whatever commands, but
 contexts still should be registered. Generally editing and debugging
 of complete dialplan in DB is not so easy - so you should keep your
 main logic in static, but use realtime for data that actually changes.

 Regards,
 Atis

 
 * Using numbers instead of 's' = already tried, no changes

 * Renaming contexts without underscores = tried it right now, no
 changes

 Thanks for all those ideas.

 Yves.

 On Thu, 2008-02-07 at 17:39 +0200, Atis Lezdins wrote:
   
 On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
 
 I would have been happy ... but it's not that. This query gives me the
 right row (I double checked).

 On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
   
 On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
 
 Hello,

 I'm having troubles while using the Goto function in a realtime
 extension. Here is the error message :

 -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
 -- Goto (script_13_0,s,1)
 [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
 'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
 'script_13_0', but no invalid handler

 And I definitively have a row in my extensions table with context
 script_13_0, exten s and priority 1 !

 I also tried to goto in another context that is in my extensions.conf
 file, and it works.

 Is this a restriction or a bug ? It seems that it's not possible to
 Goto to another context within the realtime extensions.
   
 It's impossible to guess what might be wrong, because you haven't 
 included
 a dump from your table.  Try a:

 SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
 AND priority='1'

 If that fails, you have your answer.

 
 What version? You could try replacing pipes with commas. Do you have
 realtime switch statement for script_13_0? Can you try renaming
 context to not use underscores? Try using not s but any number (and
 create extension _X.)

 Regards,
 Atis

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

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

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

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

Re: [asterisk-users] Goto in Realtime extensions

2008-02-08 Thread Atis Lezdins
On 2/8/08, Yves Räber [EMAIL PROTECTED] wrote:
 * Version: Asterisk 1.4.14

 * Commas instead of pipes = already tried, this is not working at all

 * Realtime switch for script_13_0 = No, should I ? This would be really
 a shame, I want to use realtime BECAUSE I don't want to play with my
 extensions.conf file. (I'm building a web interface that has to generate
 the contexts).

Yes, unfortuneately that's the thing you have to do. You have to add
each context you want - in static conf file like this:

[db_na]
switch = Realtime/db_na

[db_busy]
switch = Realtime/db_busy

You can have as many extensions you like with whatever commands, but
contexts still should be registered. Generally editing and debugging
of complete dialplan in DB is not so easy - so you should keep your
main logic in static, but use realtime for data that actually changes.

Regards,
Atis


 * Using numbers instead of 's' = already tried, no changes

 * Renaming contexts without underscores = tried it right now, no
 changes

 Thanks for all those ideas.

 Yves.

 On Thu, 2008-02-07 at 17:39 +0200, Atis Lezdins wrote:
  On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
   I would have been happy ... but it's not that. This query gives me the
   right row (I double checked).
  
   On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
 Hello,

 I'm having troubles while using the Goto function in a realtime
 extension. Here is the error message :

 -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
 -- Goto (script_13_0,s,1)
 [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
 'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
 'script_13_0', but no invalid handler

 And I definitively have a row in my extensions table with context
 script_13_0, exten s and priority 1 !

 I also tried to goto in another context that is in my extensions.conf
 file, and it works.

 Is this a restriction or a bug ? It seems that it's not possible to
 Goto to another context within the realtime extensions.
   
It's impossible to guess what might be wrong, because you haven't 
included
a dump from your table.  Try a:
   
SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
AND priority='1'
   
If that fails, you have your answer.
   
 
  What version? You could try replacing pipes with commas. Do you have
  realtime switch statement for script_13_0? Can you try renaming
  context to not use underscores? Try using not s but any number (and
  create extension _X.)
 
  Regards,
  Atis
 


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

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


-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835

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

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


Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Tilghman Lesher
On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
 Hello,

 I'm having troubles while using the Goto function in a realtime
 extension. Here is the error message :

 -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
 -- Goto (script_13_0,s,1)
 [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
 'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
 'script_13_0', but no invalid handler

 And I definitively have a row in my extensions table with context
 script_13_0, exten s and priority 1 !

 I also tried to goto in another context that is in my extensions.conf
 file, and it works.

 Is this a restriction or a bug ? It seems that it's not possible to
 Goto to another context within the realtime extensions.

It's impossible to guess what might be wrong, because you haven't included
a dump from your table.  Try a:

SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
AND priority='1'

If that fails, you have your answer.

-- 
Tilghman

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

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


Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Yves Räber
I would have been happy ... but it's not that. This query gives me the
right row (I double checked).

On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
 On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
  Hello,
 
  I'm having troubles while using the Goto function in a realtime
  extension. Here is the error message :
 
  -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
  -- Goto (script_13_0,s,1)
  [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
  'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
  'script_13_0', but no invalid handler
 
  And I definitively have a row in my extensions table with context
  script_13_0, exten s and priority 1 !
 
  I also tried to goto in another context that is in my extensions.conf
  file, and it works.
 
  Is this a restriction or a bug ? It seems that it's not possible to
  Goto to another context within the realtime extensions.
 
 It's impossible to guess what might be wrong, because you haven't included
 a dump from your table.  Try a:
 
 SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
 AND priority='1'
 
 If that fails, you have your answer.
 


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

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

Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Atis Lezdins
On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
 I would have been happy ... but it's not that. This query gives me the
 right row (I double checked).

 On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
  On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
   Hello,
  
   I'm having troubles while using the Goto function in a realtime
   extension. Here is the error message :
  
   -- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
   -- Goto (script_13_0,s,1)
   [Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
   'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
   'script_13_0', but no invalid handler
  
   And I definitively have a row in my extensions table with context
   script_13_0, exten s and priority 1 !
  
   I also tried to goto in another context that is in my extensions.conf
   file, and it works.
  
   Is this a restriction or a bug ? It seems that it's not possible to
   Goto to another context within the realtime extensions.
 
  It's impossible to guess what might be wrong, because you haven't included
  a dump from your table.  Try a:
 
  SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
  AND priority='1'
 
  If that fails, you have your answer.
 

What version? You could try replacing pipes with commas. Do you have
realtime switch statement for script_13_0? Can you try renaming
context to not use underscores? Try using not s but any number (and
create extension _X.)

Regards,
Atis

-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835

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

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


Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Grey Man


 I 
would 
have 
been 
happy 
... 
but 
it's 
not 
that. 
This 
query 
gives 
me 
the
 right 
row 
(I 
double 
checked).

Make sure you don't have any labels on the prioritys. When loading extensions 
from realtime labels aren't supported.

Replace:

exten = _X.,1(mylabel),...

with

exten = _X.,1,...

You'll have to make your Goto's use the prioritty instead of the label 
afterward.

Regards,

Greyman.



  Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/y7mail



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

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


Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Yves Räber
* Version: Asterisk 1.4.14

* Commas instead of pipes = already tried, this is not working at all

* Realtime switch for script_13_0 = No, should I ? This would be really
a shame, I want to use realtime BECAUSE I don't want to play with my
extensions.conf file. (I'm building a web interface that has to generate
the contexts).

* Using numbers instead of 's' = already tried, no changes

* Renaming contexts without underscores = tried it right now, no
changes

Thanks for all those ideas.

Yves.

On Thu, 2008-02-07 at 17:39 +0200, Atis Lezdins wrote:
 On 2/7/08, Yves Räber [EMAIL PROTECTED] wrote:
  I would have been happy ... but it's not that. This query gives me the
  right row (I double checked).
 
  On Thu, 2008-02-07 at 08:36 -0600, Tilghman Lesher wrote:
   On Thursday 07 February 2008 08:05:40 Yves Räber wrote:
Hello,
   
I'm having troubles while using the Goto function in a realtime
extension. Here is the error message :
   
-- Executing Goto(SIP/siemens1-081f56b0, script_13_0|s|1)
-- Goto (script_13_0,s,1)
[Feb  7 13:24:21] WARNING[28666]: pbx.c:2455 __ast_pbx_run: Channel
'SIP/siemens1-081f56b0' sent into invalid extension 's' in context
'script_13_0', but no invalid handler
   
And I definitively have a row in my extensions table with context
script_13_0, exten s and priority 1 !
   
I also tried to goto in another context that is in my extensions.conf
file, and it works.
   
Is this a restriction or a bug ? It seems that it's not possible to
Goto to another context within the realtime extensions.
  
   It's impossible to guess what might be wrong, because you haven't included
   a dump from your table.  Try a:
  
   SELECT * FROM extensions_table WHERE exten='s' AND context='script_13_0'
   AND priority='1'
  
   If that fails, you have your answer.
  
 
 What version? You could try replacing pipes with commas. Do you have
 realtime switch statement for script_13_0? Can you try renaming
 context to not use underscores? Try using not s but any number (and
 create extension _X.)
 
 Regards,
 Atis
 


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

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

Re: [asterisk-users] Goto in Realtime extensions

2008-02-07 Thread Yves Räber
I'm not using labels at all (but I've also tried with :))

On Thu, 2008-02-07 at 16:39 -0800, Grey Man wrote:
 
 Make sure you don't have any labels on the prioritys. When loading
 extensions from realtime labels aren't supported.
 
 Replace:
 
 exten = _X.,1(mylabel),...
 
 with
 
 exten = _X.,1,...
 
 You'll have to make your Goto's use the prioritty instead of the label
 afterward.
 
 Regards,
 
 Greyman.
 


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

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