[asterisk-users] AEL2: How to get rid of "does not end with a return; I will insert one" warnings

2011-12-26 Thread Olivier
Hi,

I'm converting to asterisk 1.8 an existing (and lengthy) dialplan
written in AEL2.

I'm using in many places things like

macro foo {
BlahBlah();
return;

catch h {
BlahBlah();
}

};

How can I safely get rid of "does not end with a return; I will insert
one" warnings with such constructs ?

Regards

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


[asterisk-users] AEL2: How get rid of "expression has operators, but no variables" warnings

2011-12-23 Thread Olivier
Hi,

I'm converting an existing dialplan written in AEL2 to Asterisk 1.8.
While at it, I'm trying to get rid of some AEL2 warnings messages that
used to clutter my console when loading AEL scripts.

Specifically, my dialplan includes this simple text assignment :
prefix1="FooBar => ";

It produces this:
 expression "FooBar => " has operators, but no variables. Interesting...

Using Set application makes it but I would appreciate an other way to do it.
Suggestion ?

Regards

--
_
-- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-09 Thread Tilghman Lesher
On Thursday 09 April 2009 10:14:12 Tilghman Lesher wrote:
> On Thursday 09 April 2009 04:28:16 Olivier wrote:
> > 2009/4/8 Tilghman Lesher 
> >
> > > On Tuesday 07 April 2009 23:38:08 Olivier wrote:
> > > > 2009/4/7 Mark Michelson 
> > > >
> > > > > Philipp Kempgen wrote:
> > > > > > BTW (developer's question) is there a reason why SendText() resp.
> > > > > > sendtext_exec() refuses to send zero-length data?
> > > > >
> > > > > I can't point to any specific reason. I assume that whoever wrote
> > > > > the application probably thought that attempting to send
> > > > > zero-length data
> > >
> > > was
> > >
> > > > > pointless and that if no data were passed to the application, it
> > > > > likely was due
> > > > > to an error by the user.
> > > >
> > > > The phone I'm working on (Thomson ST2030) would display in slow
> > > > blinking, inversed letters (white on black) any text received in SIP
> > > > MESSAGE. Display duration is unlimited.
> > > > To erase an old message, you must send a single carriage return (or
> > > > maybe an empty string).
> > > >
> > > > I'm wondering how many phones behave like this ?
> > > >
> > > > Maybe, sendtext should then be refactored to accommodate this.
> > >
> > > What does the phone do when you send a single space?
> >
> > It would display it as a black rectangle : as unfortunately, this phone
> > displays text in inversed color (white letters on black background), a
> > single space remains visible.
> >
> > It seems I really need to send a carriage return ($0D in hexa) but I
> > couldn't find a way to pass such string using SendText.
> >
> > As suggested earlier, maybe an empty SIP MESSAGE would do the trick but
> > as SendText rejects empty strings, I've not tested it yet. For that,
> > maybe I could try to build my own custom SIP MESSAGE, faking a true SIP
> > MESSAGE to double check if an empty string would be acceptable solution ?
> >
> > (Note, that sending a carriage return must work as vendor handed to me a
> > Wireshark capture for a "working SIP MESSAGE")
>
> I suspect not.  You really need to send an empty message; that is, a
> message with a content-length of 0.  A message containing a carriage return
> would still have a content-length of 1 and would confuse the phone at
> worst, and display an unprintable character, at best.
>
> You could send an empty message in SendText with SendText(,), but chan_sip
> still doesn't allow the empty message, so a code change is still necessary.

Fixed in 1.4 in changeset 187362.

-- 
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] AEL2, BASE64_DECODE and hexadecimal

2009-04-09 Thread Tilghman Lesher
On Thursday 09 April 2009 04:28:16 Olivier wrote:
> 2009/4/8 Tilghman Lesher 
>
> > On Tuesday 07 April 2009 23:38:08 Olivier wrote:
> > > 2009/4/7 Mark Michelson 
> > >
> > > > Philipp Kempgen wrote:
> > > > > BTW (developer's question) is there a reason why SendText() resp.
> > > > > sendtext_exec() refuses to send zero-length data?
> > > >
> > > > I can't point to any specific reason. I assume that whoever wrote the
> > > > application probably thought that attempting to send zero-length data
> >
> > was
> >
> > > > pointless and that if no data were passed to the application, it
> > > > likely was due
> > > > to an error by the user.
> > >
> > > The phone I'm working on (Thomson ST2030) would display in slow
> > > blinking, inversed letters (white on black) any text received in SIP
> > > MESSAGE. Display duration is unlimited.
> > > To erase an old message, you must send a single carriage return (or
> > > maybe an empty string).
> > >
> > > I'm wondering how many phones behave like this ?
> > >
> > > Maybe, sendtext should then be refactored to accommodate this.
> >
> > What does the phone do when you send a single space?
>
> It would display it as a black rectangle : as unfortunately, this phone
> displays text in inversed color (white letters on black background), a
> single space remains visible.
>
> It seems I really need to send a carriage return ($0D in hexa) but I
> couldn't find a way to pass such string using SendText.
>
> As suggested earlier, maybe an empty SIP MESSAGE would do the trick but as
> SendText rejects empty strings, I've not tested it yet. For that, maybe I
> could try to build my own custom SIP MESSAGE, faking a true SIP MESSAGE to
> double check if an empty string would be acceptable solution ?
>
> (Note, that sending a carriage return must work as vendor handed to me a
> Wireshark capture for a "working SIP MESSAGE")

I suspect not.  You really need to send an empty message; that is, a message
with a content-length of 0.  A message containing a carriage return would
still have a content-length of 1 and would confuse the phone at worst, and
display an unprintable character, at best.

You could send an empty message in SendText with SendText(,), but chan_sip
still doesn't allow the empty message, so a code change is still necessary.

-- 
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] AEL2, BASE64_DECODE and hexadecimal

2009-04-09 Thread Olivier
2009/4/8 Tilghman Lesher 

> On Tuesday 07 April 2009 23:38:08 Olivier wrote:
> > 2009/4/7 Mark Michelson 
> >
> > > Philipp Kempgen wrote:
> > > > BTW (developer's question) is there a reason why SendText() resp.
> > > > sendtext_exec() refuses to send zero-length data?
> > >
> > > I can't point to any specific reason. I assume that whoever wrote the
> > > application probably thought that attempting to send zero-length data
> was
> > > pointless and that if no data were passed to the application, it likely
> > > was due
> > > to an error by the user.
> >
> > The phone I'm working on (Thomson ST2030) would display in slow blinking,
> > inversed letters (white on black) any text received in SIP MESSAGE.
> > Display duration is unlimited.
> > To erase an old message, you must send a single carriage return (or maybe
> > an empty string).
> >
> > I'm wondering how many phones behave like this ?
> >
> > Maybe, sendtext should then be refactored to accommodate this.
>
> What does the phone do when you send a single space?


It would display it as a black rectangle : as unfortunately, this phone
displays text in inversed color (white letters on black background), a
single space remains visible.

It seems I really need to send a carriage return ($0D in hexa) but I
couldn't find a way to pass such string using SendText.

As suggested earlier, maybe an empty SIP MESSAGE would do the trick but as
SendText rejects empty strings, I've not tested it yet. For that, maybe I
could try to build my own custom SIP MESSAGE, faking a true SIP MESSAGE to
double check if an empty string would be acceptable solution ?

(Note, that sending a carriage return must work as vendor handed to me a
Wireshark capture for a "working SIP MESSAGE")


>
> --
> 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
>
___
-- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-08 Thread Tilghman Lesher
On Tuesday 07 April 2009 23:38:08 Olivier wrote:
> 2009/4/7 Mark Michelson 
>
> > Philipp Kempgen wrote:
> > > BTW (developer's question) is there a reason why SendText() resp.
> > > sendtext_exec() refuses to send zero-length data?
> >
> > I can't point to any specific reason. I assume that whoever wrote the
> > application probably thought that attempting to send zero-length data was
> > pointless and that if no data were passed to the application, it likely
> > was due
> > to an error by the user.
>
> The phone I'm working on (Thomson ST2030) would display in slow blinking,
> inversed letters (white on black) any text received in SIP MESSAGE.
> Display duration is unlimited.
> To erase an old message, you must send a single carriage return (or maybe
> an empty string).
>
> I'm wondering how many phones behave like this ?
>
> Maybe, sendtext should then be refactored to accommodate this.

What does the phone do when you send a single space?

-- 
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] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Olivier
2009/4/7 Mark Michelson 

> Philipp Kempgen wrote:
> > Olivier schrieb:
> >> 2009/4/7 Philipp Kempgen 
> >>> Olivier schrieb:
>  I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext
> in
> >>> an
>  AEL2 file like this :
>  SendText(${BASE64_DECODE(DQ==)});
> 
> 
>  Value sent (8 bytes long) is very strange :
>  Content-Type: text/plain;charset=UTF-8
>  Content-Length: 8
> 
>  �ez?==
> >>> I doubt you will find a way to properly pass CR or LF to an
> >>> application in extensions.(conf|ael) but keep us in the loop.
> >
> >> It's strange how such a silly thing is somehow keeping me from centrally
> >> managing phones forwarding : I can display a phone is forwarded but I
> can't
> >> gracefully return to previous status ...
> >
> > BTW (developer's question) is there a reason why SendText() resp.
> > sendtext_exec() refuses to send zero-length data?
> >
>
> I can't point to any specific reason. I assume that whoever wrote the
> application probably thought that attempting to send zero-length data was
> pointless and that if no data were passed to the application, it likely was
> due
> to an error by the user.


The phone I'm working on (Thomson ST2030) would display in slow blinking,
inversed letters (white on black) any text received in SIP MESSAGE.
Display duration is unlimited.
To erase an old message, you must send a single carriage return (or maybe an
empty string).

I'm wondering how many phones behave like this ?

Maybe, sendtext should then be refactored to accommodate this.

>
>
> Mark Michelson
>
> ___
> -- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Mark Michelson
Philipp Kempgen wrote:
> Olivier schrieb:
>> 2009/4/7 Philipp Kempgen 
>>> Olivier schrieb:
 I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext in
>>> an
 AEL2 file like this :
 SendText(${BASE64_DECODE(DQ==)});


 Value sent (8 bytes long) is very strange :
 Content-Type: text/plain;charset=UTF-8
 Content-Length: 8

 �ez?==
>>> I doubt you will find a way to properly pass CR or LF to an
>>> application in extensions.(conf|ael) but keep us in the loop.
> 
>> It's strange how such a silly thing is somehow keeping me from centrally
>> managing phones forwarding : I can display a phone is forwarded but I can't
>> gracefully return to previous status ...
> 
> BTW (developer's question) is there a reason why SendText() resp.
> sendtext_exec() refuses to send zero-length data?
> 

I can't point to any specific reason. I assume that whoever wrote the 
application probably thought that attempting to send zero-length data was 
pointless and that if no data were passed to the application, it likely was due 
to an error by the user.

Mark Michelson

___
-- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Philipp Kempgen
Olivier schrieb:
> 2009/4/7 Philipp Kempgen 
>> Olivier schrieb:
>> > I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext in
>> an
>> > AEL2 file like this :
>> > SendText(${BASE64_DECODE(DQ==)});
>> >
>> >
>> > Value sent (8 bytes long) is very strange :
>> > Content-Type: text/plain;charset=UTF-8
>> > Content-Length: 8
>> >
>> > �ez?==
>>
>> I doubt you will find a way to properly pass CR or LF to an
>> application in extensions.(conf|ael) but keep us in the loop.

> It's strange how such a silly thing is somehow keeping me from centrally
> managing phones forwarding : I can display a phone is forwarded but I can't
> gracefully return to previous status ...

BTW (developer's question) is there a reason why SendText() resp.
sendtext_exec() refuses to send zero-length data?


Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Olivier
2009/4/7 Philipp Kempgen 

> Olivier schrieb:
> > I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext in
> an
> > AEL2 file like this :
> > SendText(${BASE64_DECODE(DQ==)});
> >
> >
> > Value sent (8 bytes long) is very strange :
> > Content-Type: text/plain;charset=UTF-8
> > Content-Length: 8
> >
> > �ez?==
>
> I doubt you will find a way to properly pass CR or LF to an
> application in extensions.(conf|ael) but keep us in the loop.


I broke my teeth on that all day long !
I was about to try AGI ...

It's strange how such a silly thing is somehow keeping me from centrally
managing phones forwarding : I can display a phone is forwarded but I can't
gracefully return to previous status ...


>
>
>Philipp Kempgen
> --
> AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
> Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
> AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
> Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
> --
>
> ___
> -- 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] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Philipp Kempgen
Olivier schrieb:
> I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext in an
> AEL2 file like this :
> SendText(${BASE64_DECODE(DQ==)});
> 
> 
> Value sent (8 bytes long) is very strange :
> Content-Type: text/plain;charset=UTF-8
> Content-Length: 8
> 
> �ez?==

I doubt you will find a way to properly pass CR or LF to an
application in extensions.(conf|ael) but keep us in the loop.


Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

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

[asterisk-users] AEL2, BASE64_DECODE and hexadecimal

2009-04-07 Thread Olivier
Hi,

I'm trying to pass a single carriage return (0x0d in hexa) to Sendtext in an
AEL2 file like this :
SendText(${BASE64_DECODE(DQ==)});


Value sent (8 bytes long) is very strange :
Content-Type: text/plain;charset=UTF-8
Content-Length: 8

�ez?==


Any workaround ?

Regards
___
-- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Lee, John (Sydney)
Thanks guys.

It was the If vs if that was causing the problem.
This is probably due to my good coding practice of other languages in
the past :-)

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
> boun...@lists.digium.com] On Behalf Of Watkins, Bradley
> Sent: Thursday, 5 March 2009 9:12 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] AEL2: If-then-else not permitted in
Switch-
> Case
> 
> > I just want to confirm but it seems that if-then-else is not
permitted
> > in case structure.
> > It was not really documented but it seems to be the case.
> >
> > Can anyone confirm?
> 
> No, if-then-else works fine inside a case statement.  See inline
> comments.
> >
> > switch(${DIALSTATUS})
> >   {
> > case NOANSWER:
> >  {
> This brace, and its closing-brace mate, are superfluous though not
> harmful.
> 
> >// if-then-else not permitted
> >If (${ael-var} = 1)
> Your primary problem is probably right here, the if needs to be all
> lower-case ( If != if ).
> 
> >{
> >  Playback(beep);
> >  return;
> >}
> >  }
> Again, unnecessary.
> 
> > case BUSY:
> >  {
> >return;
> >  }
> > default:
> >  {
> >Hangup();
> >  };
> >   }
> >
> >
> >
> > ___
> > -- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Watkins, Bradley
> I just want to confirm but it seems that if-then-else is not permitted
> in case structure.
> It was not really documented but it seems to be the case.
> 
> Can anyone confirm?

No, if-then-else works fine inside a case statement.  See inline
comments.
> 
> switch(${DIALSTATUS})
>   {
> case NOANSWER:
>  {
This brace, and its closing-brace mate, are superfluous though not
harmful.

>// if-then-else not permitted
>If (${ael-var} = 1)
Your primary problem is probably right here, the if needs to be all
lower-case ( If != if ).

>{
>  Playback(beep); 
>  return;
>}
>  }
Again, unnecessary.

> case BUSY:
>  {
>return;
>  }
> default:
>  {
>Hangup();
>  };
>   }
> 
> 
> 
> ___
> -- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Anthony Francis


Philipp Kempgen wrote:
> Courier mail server at exa.billmerriam.com schrieb:
>   
>> This is a delivery status notification from exa.billmerriam.com,
>> running the Courier mail server, version 0.54.1.
>>
>> The original message was received on Wed, 04 Mar 2009 09:10:55 -0500
>> from localhost (localhost [127.0.0.1])
>>
>> ---
>>
>>UNDELIVERABLE MAIL
>>
>> Your message to the following recipients cannot be delivered:
>>
>> :
>> yocto.billmerriam.com [68.209.186.200]:
>> 
 STARTTLS
 
>> <<< 500 couriertls: connect: Connection reset by peer
>> 
>
> li...@billmerriam.com, please fix your mail server.
> I sent the message to the asterisk-users mailing list and - sorry
> to say - I don't care if it was delivered to you or not.
>
> Thanks,
>
> Philipp Kempgen
>   
...and so you replied to it? I mean if he didn't get the original copy, 
he sure isn't going to get your terse reply. The rest of us however

-- 
Thank you and have any kind of day you want,

Anthony Francis


___
-- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Philipp Kempgen
Courier mail server at exa.billmerriam.com schrieb:
> This is a delivery status notification from exa.billmerriam.com,
> running the Courier mail server, version 0.54.1.
> 
> The original message was received on Wed, 04 Mar 2009 09:10:55 -0500
> from localhost (localhost [127.0.0.1])
> 
> ---
> 
>UNDELIVERABLE MAIL
> 
> Your message to the following recipients cannot be delivered:
> 
> :
> yocto.billmerriam.com [68.209.186.200]:
 >>> STARTTLS
> <<< 500 couriertls: connect: Connection reset by peer

li...@billmerriam.com, please fix your mail server.
I sent the message to the asterisk-users mailing list and - sorry
to say - I don't care if it was delivered to you or not.

Thanks,

Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Philipp Kempgen
Klaus Darilion schrieb:
> Lee, John (Sydney) schrieb:
>> I just want to confirm but it seems that if-then-else is not permitted
>> in case structure.
>> It was not really documented but it seems to be the case.
>> 
>> Can anyone confirm?
>> 
>> switch(${DIALSTATUS})
>>   {
>> case NOANSWER:
>>  {

^ no code block required here.
  probably invalid syntax.

>>// if-then-else not permitted
>>If (${ael-var} = 1)
> 
>^^ case sensitive?
> 
>>{
>>  Playback(beep); 
>>  return;
>>}
>>  }
>> case BUSY:
>>  {
>>return;
>>  }
>> default:
>>  {
>>Hangup();
>>  };
>>   }

Try `aelparse -n`


Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Klaus Darilion


Lee, John (Sydney) schrieb:
> I just want to confirm but it seems that if-then-else is not permitted
> in case structure.
> It was not really documented but it seems to be the case.
> 
> Can anyone confirm?
> 
> switch(${DIALSTATUS})
>   {
> case NOANSWER:
>  {
>// if-then-else not permitted
>If (${ael-var} = 1)

   ^^ case sensitive?

>{
>  Playback(beep); 
>  return;
>}
>  }
> case BUSY:
>  {
>return;
>  }
> default:
>  {
>Hangup();
>  };
>   }
> 
> 
> 
> ___
> -- 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] AEL2: If-then-else not permitted in Switch-Case

2009-03-04 Thread Philipp Kempgen
Lee, John (Sydney) schrieb:
> I just want to confirm but it seems that if-then-else is not permitted
> in case structure.
> It was not really documented but it seems to be the case.
> 
> Can anyone confirm?
> 
> switch(${DIALSTATUS})
>   {
> case NOANSWER:
>  {
>// if-then-else not permitted
>If (${ael-var} = 1)
>{
>  Playback(beep); 
>  return;
>}
>  }

I would have written this like so:

switch ("${DIALSTATUS}") {
case "NOANSWER":
if ("${ael-var}" = "1") {
Playback(beep);
}
break;
}

Give it a try.


Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

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


[asterisk-users] AEL2: If-then-else not permitted in Switch-Case

2009-03-03 Thread Lee, John (Sydney)
I just want to confirm but it seems that if-then-else is not permitted
in case structure.
It was not really documented but it seems to be the case.

Can anyone confirm?

switch(${DIALSTATUS})
  {
case NOANSWER:
 {
   // if-then-else not permitted
   If (${ael-var} = 1)
   {
 Playback(beep); 
 return;
   }
 }
case BUSY:
 {
   return;
 }
default:
 {
   Hangup();
 };
  }



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


[asterisk-users] AEL2 Hint & Parking

2008-03-18 Thread Brent Davidson
I've been reading most of the day and can't seem to find a clear 
definition of the syntax for parking lot hints in AEL2.  I have tried 
all of the following and they either do not light up the line button on 
my Snom 300 or give syntax errors:

hint(park/701) 701 => {
ParkedCall(701);
  }

hint(park:701) 701 => {
ParkedCall(701);
  }

hint(park/[EMAIL PROTECTED]) 701 => {
ParkedCall(701);
  }

hint(park:[EMAIL PROTECTED]) 701 => {
ParkedCall(701);
  }


I have this in my context as well:

includes {
parkedcalls;
  }

I do not see any indication on the CLI that Asterisk is attempting to 
notify my sip phone of the status change and I have verbose and debug at 20.

Any ideas?

___
-- 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] AEL2 and Callbacks

2007-11-03 Thread Sean Bright
Douglas Garstang wrote:
> I am originating a command via the AMI with this...

Doug,

Were you ever able to resolve this?  If so, could you share what the 
issue was?

Thanks,
Sean

___
--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] AEL2 and Callbacks

2007-11-01 Thread Sean Bright
Do a 'core show dialplan' and see what the AEL is generating.

On 11/1/07, Douglas Garstang <[EMAIL PROTECTED]> wrote:
>
> >- Original Message 
> >From: Richard Lyman <[EMAIL PROTECTED]>
> >To: Asterisk Users Mailing List - Non-Commercial Discussion <
> asterisk-users@lists.digium.com>
> >Sent: Thursday, November 1, 2007 8:47:28 AM
> >Subject: Re: [asterisk-users] AEL2 and Callbacks
> >
> >Douglas Garstang wrote:
> >> I am originating a command via the AMI with this...
> >>
> >> Action: Login
> >> Username: xxx
> >> Secret: yyy
> >>
> >> ACTION: Originate
> >> Async: yes
> >> Timeout: 6
> >> Exten: callback
> >> Channel: Local/[EMAIL PROTECTED]
> >> Callerid: 849120
> >> Context: default
> >> ActionID: 849120
> >>
> >> My LegA context:
> >> ---
> >> context LegA {
> >>_X. => {
> >>Dial(SIP/[EMAIL PROTECTED]);
> >>}
> >>
> >> }
> >>
> >> And my default context:
> >> --
> >> context default {
> >>callback => {
> >>NoCDR();
> >>Wait(1);
> >>
> Dial(${destination},60,oL(${timeout}:${timeout_warning}:${timeout_warning_repeat}));
> >>}
> >>
> >> }
> >>
> >> The A leg is established, and once Asterisk goes to dial the B leg...
> >>
> >>-- Executing [EMAIL PROTECTED]:1] Dial("Local/[EMAIL PROTECTED],2",
> "SIP/[EMAIL PROTECTED]") in new stack
> >>-- Called [EMAIL PROTECTED]
> >>-- SIP/Provider-09a8cff8 is making progress passing it to
> Local/[EMAIL PROTECTED],2
> >>
>  >   -- SIP/Provider-09a8cff8 answered Local/[EMAIL PROTECTED],2
> >>  == Starting Local/[EMAIL PROTECTED],1 at default,callback,1 failed
> so falling back to exten 's'
> >>  == Starting Local/[EMAIL PROTECTED],1 at default,s,1 still failed
> so falling back to context 'default'
> >> [Oct 31 01:57:07] WARNING[29795]: pbx.c:2450 __ast_pbx_run: Channel '
> Local/[EMAIL PROTECTED],1' sent into invalid extension 's' in context
> 'default', >but no invalid handler
> >>
> >> Uhm, why? I have a default context with a callback extension. Of course
> I have no explicit priority 1 though... this is AEL2
> >> What's it complaining for?
> >>
> >> Doug.
> >>
> >>
> >>
> >originates have always had an issue where it falls back to an 's'
> >extension.  and since you do not have one, nor an 'i' for invalid
> >extension... it bombs out.
>
> Yes... but I DO have a default context and I DO have a callback extension.
> What's it whining about?
>
> Doug.
>
>
>
>
> ___
> --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
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ___
> --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] AEL2 and Callbacks

2007-11-01 Thread Douglas Garstang
>- Original Message 
>From: Richard Lyman <[EMAIL PROTECTED]>
>To: Asterisk Users Mailing List - Non-Commercial Discussion 
>
>Sent: Thursday, November 1, 2007 8:47:28 AM
>Subject: Re: [asterisk-users] AEL2 and Callbacks
>

>Douglas Garstang wrote:
>> I am originating a command via the AMI with this...
>>
>> Action: Login
>> Username: xxx
>> Secret: yyy
>>
>> ACTION: Originate
>> Async: yes
>> Timeout: 6
>> Exten: callback
>> Channel: Local/[EMAIL PROTECTED]
>> Callerid: 849120
>> Context: default
>> ActionID: 849120
>>
>> My LegA context:
>> ---
>> context LegA {
>> _X. => {
>> Dial(SIP/[EMAIL PROTECTED]); 
>> }
>>
>> }
>>
>> And my default context:
>> --
>> context default {
>> callback => {
>> NoCDR();
>> Wait(1);
>>
 
Dial(${destination},60,oL(${timeout}:${timeout_warning}:${timeout_warning_repeat}));
>> }
>>
>> }
>>
>> The A leg is established, and once Asterisk goes to dial the B leg...
>>
>> -- Executing [EMAIL PROTECTED]:1]
 Dial("Local/[EMAIL PROTECTED],2", "SIP/[EMAIL PROTECTED]") in new stack
>> -- Called [EMAIL PROTECTED]
>> -- SIP/Provider-09a8cff8 is making progress passing it to
 Local/[EMAIL PROTECTED],2
>>
 >-- SIP/Provider-09a8cff8 answered Local/[EMAIL PROTECTED],2
>>   == Starting Local/[EMAIL PROTECTED],1 at default,callback,1
 failed so falling back to exten 's'
>>   == Starting Local/[EMAIL PROTECTED],1 at default,s,1 still
 failed so falling back to context 'default'
>> [Oct 31 01:57:07] WARNING[29795]: pbx.c:2450 __ast_pbx_run: Channel
 'Local/[EMAIL PROTECTED],1' sent into invalid extension 's' in
 context 'default', >but no invalid handler
>>
>> Uhm, why? I have a default context with a callback extension. Of
 course I have no explicit priority 1 though... this is AEL2 
>> What's it complaining for?
>>
>> Doug.
>>
>>
>>   
>originates have always had an issue where it falls back to an 's' 
>extension.  and since you do not have one, nor an 'i' for invalid 
>extension... it bombs out.

Yes... but I DO have a default context and I DO have a callback extension. 
What's it whining about?

Doug.




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





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
--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] AEL2 and Callbacks

2007-11-01 Thread Richard Lyman
Douglas Garstang wrote:
> I am originating a command via the AMI with this...
>
> Action: Login
> Username: xxx
> Secret: yyy
>
> ACTION: Originate
> Async: yes
> Timeout: 6
> Exten: callback
> Channel: Local/[EMAIL PROTECTED]
> Callerid: 849120
> Context: default
> ActionID: 849120
>
> My LegA context:
> ---
> context LegA {
> _X. => {
> Dial(SIP/[EMAIL PROTECTED]); 
> }
>
> }
>
> And my default context:
> --
> context default {
> callback => {
> NoCDR();
> Wait(1);
> 
> Dial(${destination},60,oL(${timeout}:${timeout_warning}:${timeout_warning_repeat}));
> }
>
> }
>
> The A leg is established, and once Asterisk goes to dial the B leg...
>
> -- Executing [EMAIL PROTECTED]:1] Dial("Local/[EMAIL PROTECTED],2", 
> "SIP/[EMAIL PROTECTED]") in new stack
> -- Called [EMAIL PROTECTED]
> -- SIP/Provider-09a8cff8 is making progress passing it to Local/[EMAIL 
> PROTECTED],2
> -- SIP/Provider-09a8cff8 answered Local/[EMAIL PROTECTED],2
>   == Starting Local/[EMAIL PROTECTED],1 at default,callback,1 failed so 
> falling back to exten 's'
>   == Starting Local/[EMAIL PROTECTED],1 at default,s,1 still failed so 
> falling back to context 'default'
> [Oct 31 01:57:07] WARNING[29795]: pbx.c:2450 __ast_pbx_run: Channel 
> 'Local/[EMAIL PROTECTED],1' sent into invalid extension 's' in context 
> 'default', but no invalid handler
>
> Uhm, why? I have a default context with a callback extension. Of course I 
> have no explicit priority 1 though... this is AEL2 
> What's it complaining for?
>
> Doug.
>
>
>   
originates have always had an issue where it falls back to an 's' 
extension.  and since you do not have one, nor an 'i' for invalid 
extension... it bombs out.



___
--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] AEL2 and Callbacks

2007-10-31 Thread Matt Riddell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

What do you get if you do dialplan show default?

- --
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHKUlTDQNt8rg0Kp4RAteuAJ9kbLC77Bw7G789uOIaQ1hR+++87gCgqNPB
p4jMkvOg6kuVylFKaHLPwAs=
=ajMg
-END PGP SIGNATURE-

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


[asterisk-users] AEL2 and Callbacks

2007-10-31 Thread Douglas Garstang
I am originating a command via the AMI with this...

Action: Login
Username: xxx
Secret: yyy

ACTION: Originate
Async: yes
Timeout: 6
Exten: callback
Channel: Local/[EMAIL PROTECTED]
Callerid: 849120
Context: default
ActionID: 849120

My LegA context:
---
context LegA {
_X. => {
Dial(SIP/[EMAIL PROTECTED]); 
}

}

And my default context:
--
context default {
callback => {
NoCDR();
Wait(1);

Dial(${destination},60,oL(${timeout}:${timeout_warning}:${timeout_warning_repeat}));
}

}

The A leg is established, and once Asterisk goes to dial the B leg...

-- Executing [EMAIL PROTECTED]:1] Dial("Local/[EMAIL PROTECTED],2", 
"SIP/[EMAIL PROTECTED]") in new stack
-- Called [EMAIL PROTECTED]
-- SIP/Provider-09a8cff8 is making progress passing it to Local/[EMAIL 
PROTECTED],2
-- SIP/Provider-09a8cff8 answered Local/[EMAIL PROTECTED],2
  == Starting Local/[EMAIL PROTECTED],1 at default,callback,1 failed so falling 
back to exten 's'
  == Starting Local/[EMAIL PROTECTED],1 at default,s,1 still failed so falling 
back to context 'default'
[Oct 31 01:57:07] WARNING[29795]: pbx.c:2450 __ast_pbx_run: Channel 
'Local/[EMAIL PROTECTED],1' sent into invalid extension 's' in context 
'default', but no invalid handler

Uhm, why? I have a default context with a callback extension. Of course I have 
no explicit priority 1 though... this is AEL2 
What's it complaining for?

Doug.








__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
--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] AEL2 Syntax Highlighting

2007-10-15 Thread Steve Murphy
On Mon, 2007-10-15 at 11:42 -0500, Perssy Llamosas wrote:
>  Original Message 
> Subject: Re:[asterisk-users] AEL2 Syntax Highlighting
> From: Tzafrir Cohen <[EMAIL PROTECTED]>
> To: asterisk-users@lists.digium.com
> Date: 13/10/2007 05:24 a.m.
> > On Fri, Oct 12, 2007 at 05:24:29PM -0500, Perssy Llamosas wrote:
> >   
> >> Hi,
> >>
> >> I am looking for a syntax highlighter for AEL2. Google is not helping, 
> >> so I thought you guys could help me.
> >>
> >> I found this vim syntax highlighter for AEL but it doesn't help if you 
> >> want to code in AEL2:
> >> http://vim.sourceforge.net/scripts/script.php?script_id=1900
> >> 
> >
> > How is AEL2 syntax different from AEL?
> >
> > Can you please give examples where the above fails for AEL2? (or for
> > AEL, for that matter)
> >   
> Well, I am trying to improve that script slowly, I admit I knew nothing 
> about writing vim highlighting files before so this is a good 
> opportunity to learn...
> 
> Some examples where the above fails:
> //-example: No ";" after brackets.

This is true; in the original AEL, a semicolon must follow EVERY
statement, even statement blocks. IN AEL2, the ';' after a statement
block is treated as an empty statement, and is ignored.

I am sure you will bump into other subtle differences... If I were to
try to enumerate them, I'd probably miss something, but I did give a
list of differences in the AEL2 voip-info Wiki... I congratulate you on
taking on this effort, and wish you all the success possible. If you
have any questions, feel free to write/irc/jabber/phone me. I'm
'usually' around.

murf


> globals {
> }
> /* Anything below fails */
> context failed1 {
> };
> 
> //-example: No ";" after brackets.
> context failed2 {
> 1 => {
>Hangup();
> }
> /* Anything below fails */
> 2 => {
>Hangup();
> };
> };
> 
> //-example: Inline if else while for random
> context failed3 {
> 1 => {
>if(1) NoOp(This fails);
> };
> 2 => {
>if(1) {NoOp(This also fails);}
> };
> };
> 
> //-example: bug
> context failed4 {
> 1 => {
>if (1) {
>} else {
>}
>/* Anything below fails */
> };
> 2 => {
>NoOp(This fails);
> };
> };
> 
> //-example: bug
> context failed5 {
> 1 => {
>switch(1) {
>}
>/* Anything below fails */
> };
> 2 => {
>NoOp(This fails);
> };
> };
> 
> //-example: Hints
> context failed6 {
> hint(Sip/1) 2 => {
>NoOp(This fails);
> };
> };
> 
> //-example: Next line bracket
> context failed7
> {
> 1 => {
>NoOp(This fails);
> };
> };
> 
> //-example: Switches and eswitches
> context failed8 {
> switches {
> IAX2/abox;
> };
> /* Anything below fails */
> 1 => {
> };
> };
> 
> ___
> --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


smime.p7s
Description: S/MIME cryptographic signature
___
--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] AEL2 Syntax Highlighting

2007-10-15 Thread Perssy Llamosas
 Original Message 
Subject: Re:[asterisk-users] AEL2 Syntax Highlighting
From: Tzafrir Cohen <[EMAIL PROTECTED]>
To: asterisk-users@lists.digium.com
Date: 13/10/2007 05:24 a.m.
> On Fri, Oct 12, 2007 at 05:24:29PM -0500, Perssy Llamosas wrote:
>   
>> Hi,
>>
>> I am looking for a syntax highlighter for AEL2. Google is not helping, 
>> so I thought you guys could help me.
>>
>> I found this vim syntax highlighter for AEL but it doesn't help if you 
>> want to code in AEL2:
>> http://vim.sourceforge.net/scripts/script.php?script_id=1900
>> 
>
> How is AEL2 syntax different from AEL?
>
> Can you please give examples where the above fails for AEL2? (or for
> AEL, for that matter)
>   
Well, I am trying to improve that script slowly, I admit I knew nothing 
about writing vim highlighting files before so this is a good 
opportunity to learn...

Some examples where the above fails:
//-example: No ";" after brackets.
globals {
}
/* Anything below fails */
context failed1 {
};

//-example: No ";" after brackets.
context failed2 {
1 => {
   Hangup();
}
/* Anything below fails */
2 => {
   Hangup();
};
};

//-example: Inline if else while for random
context failed3 {
1 => {
   if(1) NoOp(This fails);
};
2 => {
   if(1) {NoOp(This also fails);}
};
};

//-example: bug
context failed4 {
1 => {
   if (1) {
   } else {
   }
   /* Anything below fails */
};
2 => {
   NoOp(This fails);
};
};

//-example: bug
context failed5 {
1 => {
   switch(1) {
   }
   /* Anything below fails */
};
2 => {
   NoOp(This fails);
};
};

//-example: Hints
context failed6 {
hint(Sip/1) 2 => {
   NoOp(This fails);
};
};

//-example: Next line bracket
context failed7
{
1 => {
   NoOp(This fails);
};
};

//-example: Switches and eswitches
context failed8 {
switches {
IAX2/abox;
};
/* Anything below fails */
1 => {
};
};

___
--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] AEL2 Syntax Highlighting

2007-10-13 Thread Tzafrir Cohen
On Fri, Oct 12, 2007 at 05:24:29PM -0500, Perssy Llamosas wrote:
> Hi,
> 
> I am looking for a syntax highlighter for AEL2. Google is not helping, 
> so I thought you guys could help me.
> 
> I found this vim syntax highlighter for AEL but it doesn't help if you 
> want to code in AEL2:
> http://vim.sourceforge.net/scripts/script.php?script_id=1900

How is AEL2 syntax different from AEL?

Can you please give examples where the above fails for AEL2? (or for
AEL, for that matter)

-- 
   Tzafrir Cohen   
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]   
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

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


[asterisk-users] AEL2 Syntax Highlighting

2007-10-12 Thread Perssy Llamosas
Hi,

I am looking for a syntax highlighter for AEL2. Google is not helping, 
so I thought you guys could help me.

I found this vim syntax highlighter for AEL but it doesn't help if you 
want to code in AEL2:
http://vim.sourceforge.net/scripts/script.php?script_id=1900

Cheers,

PLL.

___
--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] AEL2 Includes in Macro...

2007-06-05 Thread Steve Murphy
On Mon, 2007-06-04 at 09:19 -0700, Douglas Garstang wrote:
> > Where’s Steve Murphy when you need him? J

I'm right here! :)

> This doesn?t seem to work in AEL2?

> Macro foo(arg1) { ?..
>   Includes {
>Hangup;
> }
> }
> 
> The error is: File: /etc/asterisk/extensions.ael, Line 59, Cols: 5-12:
Error: > > syntax error, unexpected KW_INCLUDES, expecting '}' 
> 
> The same error does not occur when the includes is in a context.
>  I need to have the ability to include my hangup routine in macros, as
> theoretically, a hang up could occur while asterisk is processing code
> from the macro. This is Asterisk 1.4.4


Doug--

This is a good point. So good, I created bug #9883 for this issue. I'll
look into it ASAP.

murf


-- 
Steve Murphy
Software Developer
Digium


smime.p7s
Description: S/MIME cryptographic signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 Includes in Macro...

2007-06-04 Thread Douglas Garstang
Where's Steve Murphy when you need him? :-)

 

This doesn't seem to work in AEL2...

 

Macro foo(arg1) {

 

.

Includes {

 Hangup;

}

 

}

 

The error is: File: /etc/asterisk/extensions.ael, Line 59, Cols: 5-12:
Error: syntax error, unexpected KW_INCLUDES, expecting '}'

 

The same error does not occur when the includes is in a context.

 

I need to have the ability to include my hangup routine in macros, as
theoretically, a hang up could occur while asterisk is processing code
from the macro.

 

This is Asterisk 1.4.4

 

Doug.

 

 

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 on Asterisk 1.2.4

2006-12-19 Thread Lee


Hey all,

I am very interested in using AEL2 (don't want to upgrade to 1.4 to get 
it though), but am having some problems upgrading/patching my asterisk 
system.  I am following the instructions on the wiki:


http://www.voip-info.org/wiki/view/Asterisk+AEL2#AEL2AnnouncementsandNews

But get the following error:

"'http://svn.digium.com/svn/asterisk/team/murf/AEL2-1.2/diffs.AEL2.patch' 
refers to a file, not a directory"


This refers to the process of including the patch as described in the 
first portion of the wiki page.


Am am still new to linux so the problem could be just me, but I believe 
I followed the instructions.  They are pretty simple after all.


BTW, I tried both ways described and I could not get either to work.

Thanks for any help,

--

Warm Regards,

Lee

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] AEL2 Confusion

2006-11-16 Thread Eric \"ManxPower\" Wieling

AEL2 is will be in 1.4

AEL2 is not in 1.2.x

The Wiki was wrong.

Bart Fisher wrote:

I just downloaded and installed asterisk-1.2.13
Reading http://www.voip-info.org/wiki/view/Asterisk+AEL2 says I should 
be using AEL2, but what's downloaded is pbx_ael not pbx_ael2 as expected.


Where and how do I get current release of AEL2 - Is there some 'How To' 
somewhere?

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 Confusion

2006-11-16 Thread Bart Fisher


I just downloaded and installed asterisk-1.2.13
Reading http://www.voip-info.org/wiki/view/Asterisk+AEL2 says I should 
be using AEL2, but what's downloaded is pbx_ael not pbx_ael2 as expected.


Where and how do I get current release of AEL2 - Is there some 'How To' 
somewhere?


TIA

Bart


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] AEL2 in 1.2

2006-11-03 Thread Aaron Daniel
Nevermind, seems scp'ing the source directory over didn't do me any
good.

On Fri, 2006-11-03 at 09:25 -0600, Aaron Daniel wrote:
> I know I compiled AEL2 into 1.2 before, considering I just copied my
> source from one server to another, yet I can't seem to figure out why
> I'm getting this error.  Anyone have any ideas?
> 
> make[1]: Entering directory `/usr/local/src/asterisk-svn/asterisk/pbx'
> flex argdesc.l
> "argdesc.l", line 19: unrecognized %option: reentrant
> "argdesc.l", line 20: unrecognized %option: bison-bridge
> "argdesc.l", line 21: unrecognized %option: bison-locations
> make[1]: *** [argdesc_lex.c] Error 1
> make[1]: Leaving directory `/usr/local/src/asterisk-svn/asterisk/pbx'
> make: *** [subdirs] Error 1

-- 
Aaron Daniel
Computer Systems Technician
Sam Houston State University
[EMAIL PROTECTED]
(936) 294-4198

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 in 1.2

2006-11-03 Thread Aaron Daniel
I know I compiled AEL2 into 1.2 before, considering I just copied my
source from one server to another, yet I can't seem to figure out why
I'm getting this error.  Anyone have any ideas?

make[1]: Entering directory `/usr/local/src/asterisk-svn/asterisk/pbx'
flex argdesc.l
"argdesc.l", line 19: unrecognized %option: reentrant
"argdesc.l", line 20: unrecognized %option: bison-bridge
"argdesc.l", line 21: unrecognized %option: bison-locations
make[1]: *** [argdesc_lex.c] Error 1
make[1]: Leaving directory `/usr/local/src/asterisk-svn/asterisk/pbx'
make: *** [subdirs] Error 1

-- 
Aaron Daniel
Computer Systems Technician
Sam Houston State University
[EMAIL PROTECTED]
(936) 294-4198

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 - CUT function usage

2006-11-01 Thread yusuf

Hi,

In Asterisk 1.2.7, my AEL code looks like this:

macro callForwardHunt(numargs,numlist,typelist,ttr)
{
for(x=1;${x}<${numargs}+1;x=${x}+1)
{
CUT(number=numlist,-,${x});
CUT(type=typelist,-,${x});
NoOp(${number});
NoOp(${type});
Dial(${type}${number},${ttr});
};
};


In Asterisk 1.4.0beta3, the CUT function looks like this:

NoOp(${range});
Set(time_range=${CUT(range|/|1)});
NoOp(${time_range});

No I understand that the CUT application has been removed in 1.4, so now I am usung the CUT 
function, but where is it explained that you have to have to use SET and the commas ',' has to be 
replaced with '|'.


Or have I done something stupidly wrong  :)


--
thanks,
yusuf

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 and the variables

2006-10-29 Thread Dominique Dartois
Hi,
I am using Asterisk 1.2.12.1 + the AEL2 patch.
If I use a variable instead of the extension itself, an incoming call cannot
be connected.
${ID-FST1} => Dial(SIP/gs|15|r);   <== NON ok
sip debug shows :
 Looking for 6674262730 in interne (domain 192.168.1.14)
 SIP/2.0 404 Not Found
Is it a bug or am I doing something wrong?

Thank you.

//===
// extensions.ael2
globals {
ID-FST1=6674262730;
GS=SIP/gs;
}

context entrant {
//6674262730 => Dial(SIP/gs,15,r);  <== OK
${ID-FST1} => Dial(SIP/gs|15|r);   <== NON ok
}

context interne {
includes {
entrant;
}
}

-
Dominique Dartois

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] AEL2 Catching on?

2006-10-07 Thread Doug Lytle

Rushowr wrote:

Is it just me or am I seeing more AEL2 code in people's examples? Could

  
If you're a C programmer, then yes.  But, if you're like me, with very 
little programming skills; no.  AEL to me, is too much like looking at C 
code.


Doug


-- Ben Franklin quote: "Those who would give up Essential Liberty to 
purchase a little Temporary Safety, deserve neither Liberty nor Safety."


___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 Catching on?

2006-10-07 Thread Rushowr
Is it just me or am I seeing more AEL2 code in people's examples? Could
it be that AEL2 is starting to finally catch on?

SKM
-AEL2 Fanatic, Potato Eater, and General Lurker


___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 #include madness in Asterisk 1.4 - Murf?

2006-10-04 Thread Douglas Garstang
Asterisk 1.4 beta2.
 
My top level /etc/asterisk/extensions.ael has the following two lines:
 
#include "include/syst/extensions.ael"
#include "include/btck/extensions.ael"

Here is the console output on Asterisk load.
 
app_system.so => (Generic System() application)
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3798 pbx_load_module: Starting AEL 
load process.
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3805 pbx_load_module: AEL load 
process: calculated config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included 
file /etc/asterisk/include/syst/extensions.ael, 4130 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included 
file /etc/asterisk/include/syst/macros.ael, 1463 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included 
file /etc/asterisk/include/syst/dundiapps.ael, 758 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included 
file /etc/asterisk/include/syst/rdapps.ael, 275 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included 
file /etc/asterisk/include/btck/extensions.ael, 1385 chars
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3808 pbx_load_module: AEL load 
process: parsed config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:1162 check_goto: Error: file 
/etc/asterisk/include/syst/extensions.ael, line 157-157: goto:  no label remote 
exists in the current extension!
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:1162 check_goto: Error: file 
/etc/asterisk/include/syst/extensions.ael, line 159-159: goto:  no label local 
exists in the current extension!
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:3821 pbx_load_module: Sorry, but 0 
syntax errors and 2 semantic errors were detected. It doesn't make sense to 
compile.
pbx_ael.so => (Asterisk Extension Language Compiler)
 
Here's the context from /etc/asterisk/include/syst/extensions.ael, that 
contains lines 157 that the parser is complaining about:
 
   148  context syst_Route {
   149
   150  _[*0123456789]. => {
   151  NoOp(*** Originated call ${CALLERID} -> ${EXTEN});
   152  Set(TMP=${CALLERID(number)});
   153  &SysLogger(This is a test message);
   154  &FastAGIConnectGet(CALLERID);
   155  ChanIsAvail(SIP/${EXTEN});
   156  if ("${AVAILCHAN}" = "") {
   157  goto remote;
   158  } else {
   159  goto local;
   160  }
   161  remote:
   162  NoOp(REMOTE);
   163  Set(PATH=${DUNDILOOKUP(3254103,DUNDIRegistr)});
   164  //Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)});
   165  Dial(${PATH});
   166  Hangup();
   167  local:
   168  NoOp(LOCAL);
   169  Dial(SIP/${EXTEN});
   170  Hangup();
   171
   172  }
   173  }
 
As you can quite clearly see, labels 'remote' and 'local' DO exist in the 
syst_Route context.
 
Now, if I switcheroo the two includes around in the top level 
/etc/asterisk/extensions.ael, to:
 
#include "include/btck/extensions.ael"
#include "include/syst/extensions.ael"

and reload Asterisk, I get:
 
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3813 pbx_load_module: AEL load 
process: compiled config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3816 pbx_load_module: AEL load 
process: merged config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:57:28] WARNING[1202]: pbx.c:6194 ast_context_verify_includes: 
Context 'syst_PSTNStart' tries includes nonexistent context 'syst_AppACDQueue'
[Oct  4 15:57:28] WARNING[1202]: pbx.c:6194 ast_context_verify_includes: 
Context 'btck_CallStart' tries includes nonexistent context 'syst_ACD'
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3819 pbx_load_module: AEL load 
process: verified config file name '/etc/asterisk/extensions.ael'.
pbx_ael.so => (Asterisk Extension Language Compiler)

There are no errors about nonexistent labels in the syst_Route extension. I 
would not have thought that #include order made any difference, since all we 
are doing is pulling a bunch of contexts into a global context space. 
 
Anyone? Mr Murpy, care to take a shot at it?  :)
 
Doug.
 
 
 
 
 
 
 
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 patch for Asterisk 1.2.12.1

2006-09-15 Thread Barzilai

I want to try AEL2.
This page: http://voip-info.org/wiki/view/Asterisk+AEL2

gives instructions to generate a patch from subversion:

svn diff http://svn.digium.com/svn/asterisk/branches/1.2 
http://svn.digium.com/svn/asterisk/team/murf/AEL2-1.2 > AEL.patch


My doubt is: is "branches/1.2" the latest (i.e., exactly the same as 
"tags/1.2.12.1") or is it the original 1.2 version?
Will the svn patch work if I do it under a 1.2.12.1 source tree using 
"branches/1.2" or should I use the "tags/1.2.12.1" URL?



BarZ
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 patch issues

2006-08-28 Thread Stephen Kratzer
I'm trying to patch the Asterisk 1.2 source to support AEL2 as follows:

svn checkout http://svn.digium.com/svn/asterisk/branches/1.2
cd 1.2
svn diff http://svn.digium.com/svn/asterisk/branches/1.2 
http://svn.digium.com/svn/asterisk/team/murf/AEL2-1.2 > AEL.patch
patch -p0 < AEL.patch
make install

The patch and build go fine, but I get the following errors when asterisk 
attempts to load the AEL2 module on startup:

# [pbx_ael2.so]Aug 25 15:16:25 WARNING[28836]: loader.c:348 __load_resource: 
No usecount in module /usr/lib/asterisk/modules/pbx_ael2.so
# Aug 25 15:16:25 WARNING[28836]: loader.c:380 __load_resource: 1 error 
loading module /usr/lib/asterisk/modules/pbx_ael2.so, aborted
# Aug 25 15:16:25 WARNING[28836]: loader.c:554 load_modules: Loading module 
pbx_ael2.so failed!

The box is running CentOS 4.3. Anybody else experiencing the same issues or am 
I doing something wrong? Thanks.

Stephen Kratzer
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] AEL2 Looping

2006-07-29 Thread Rushowr
Douglas,

Awesome! I don't know why I didn't get to the point of removing all the
spaces, probably got distracted by some shiny object ;-) 

Anyway, thanks for the update!

Rushowr 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Garstang
Sent: Saturday, July 29, 2006 6:58 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion; Asterisk Users
Mailing List - Non-Commercial Discussion
Subject: RE: [asterisk-users] AEL2 Looping

I actually did get it to work, by removing _all_ spaces from the for line...
 
for (x=0;${x}<3;x=${x}+1) {
 
This works for me. It's just a matter of finding WHICH space is breaking it.

-Original Message- 
From: Rushowr [mailto:[EMAIL PROTECTED] 
Sent: Sat 7/29/2006 12:24 PM 
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
    Cc: 
    Subject: RE: [asterisk-users] AEL2 Looping



>> context new_pbx_betty_start {
>>
>> _X. => {
>> for (x=0; ${x} < 3; x=${x} + 1) {
>> Verbose(x is ${x} !);
>> } 
>> };
>>
>> }
>I would have to see the output of "show dialplan
new_pbx_betty_start" to
know exactly >what is going on.  However, I'm guessing that if you
remove
the space between the
>semicolon and the "x=${x} + 1", it will work.

>On pretty much everything except expression evaluation (such as
${x} < 3),
Asterisk
>is sensitive to whitespace.  " x=${x} + 1" was most likely
translated
directly into
>Set( x=$[${x} = 1]).  That means you are setting the variable name,
" x",
including
>the leading space.  That is not the same variable as ${x} which you
are
using
>everywhere else.

Russel,

Stupid question, but isn't the AEL2 parser supposed to handle the
above code
first? Hypothetically, if the parser DOES handle the code the
example given
by Murf on voip-info (which is the exact code Douglas posted, other
than the
name new_pbx_betty_start) should work properly. Also, to answer your
question, removing the space does not help. I'm actually getting a
bug
report together concerning this, and I tested it with and without
spaces in
multiple places in the for loop definition. I'd give examples but I
don't
have access right now.

Keep up the great work guys!
Rushowr


___
--Bandwidth and Colocation provided by Easynews.com --

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




___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] AEL2 Looping

2006-07-29 Thread Douglas Garstang
I actually did get it to work, by removing _all_ spaces from the for line...
 
for (x=0;${x}<3;x=${x}+1) {
 
This works for me. It's just a matter of finding WHICH space is breaking it.

-Original Message- 
From: Rushowr [mailto:[EMAIL PROTECTED] 
Sent: Sat 7/29/2006 12:24 PM 
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
Cc: 
Subject: RE: [asterisk-users] AEL2 Looping



>> context new_pbx_betty_start {
>>
>> _X. => {
>> for (x=0; ${x} < 3; x=${x} + 1) {
>> Verbose(x is ${x} !);
>> } 
>> };
>>
>> }
>I would have to see the output of "show dialplan new_pbx_betty_start" 
to
know exactly >what is going on.  However, I'm guessing that if you 
remove
the space between the
>semicolon and the "x=${x} + 1", it will work.

>On pretty much everything except expression evaluation (such as ${x} < 
3),
Asterisk
>is sensitive to whitespace.  " x=${x} + 1" was most likely translated
directly into
>Set( x=$[${x} = 1]).  That means you are setting the variable name, " 
x",
including
>the leading space.  That is not the same variable as ${x} which you are
using
>everywhere else.

Russel,

Stupid question, but isn't the AEL2 parser supposed to handle the above 
code
first? Hypothetically, if the parser DOES handle the code the example 
given
by Murf on voip-info (which is the exact code Douglas posted, other 
than the
name new_pbx_betty_start) should work properly. Also, to answer your
question, removing the space does not help. I'm actually getting a bug
report together concerning this, and I tested it with and without 
spaces in
multiple places in the for loop definition. I'd give examples but I 
don't
have access right now.

Keep up the great work guys!
Rushowr


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] AEL2 Looping

2006-07-29 Thread Rushowr
>> context new_pbx_betty_start {
>> 
>> _X. => { 
>> for (x=0; ${x} < 3; x=${x} + 1) { 
>> Verbose(x is ${x} !); 
>> }  
>> };
>> 
>> }
>I would have to see the output of "show dialplan new_pbx_betty_start" to
know exactly >what is going on.  However, I'm guessing that if you remove
the space between the 
>semicolon and the "x=${x} + 1", it will work.

>On pretty much everything except expression evaluation (such as ${x} < 3),
Asterisk
>is sensitive to whitespace.  " x=${x} + 1" was most likely translated
directly into 
>Set( x=$[${x} = 1]).  That means you are setting the variable name, " x",
including 
>the leading space.  That is not the same variable as ${x} which you are
using 
>everywhere else.

Russel,

Stupid question, but isn't the AEL2 parser supposed to handle the above code
first? Hypothetically, if the parser DOES handle the code the example given
by Murf on voip-info (which is the exact code Douglas posted, other than the
name new_pbx_betty_start) should work properly. Also, to answer your
question, removing the space does not help. I'm actually getting a bug
report together concerning this, and I tested it with and without spaces in
multiple places in the for loop definition. I'd give examples but I don't
have access right now. 

Keep up the great work guys!
Rushowr


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] AEL2 Looping

2006-07-29 Thread Russell Bryant

- Douglas Garstang <[EMAIL PROTECTED]> wrote:
> context new_pbx_betty_start {
> 
> _X. => { 
> for (x=0; ${x} < 3; x=${x} + 1) { 
> Verbose(x is ${x} !); 
> }  
> }; 
> 
> }
> 
> Here's the output.
> 
> The var x never gets incremented! Is this a bug?
> The while loops seem to work ok.

I would have to see the output of "show dialplan new_pbx_betty_start" to know 
exactly what is going on.  However, I'm guessing that if you remove the space 
between the semicolon and the "x=${x} + 1", it will work.

On pretty much everything except expression evaluation (such as ${x} < 3), 
Asterisk is sensitive to whitespace.  " x=${x} + 1" was most likely translated 
directly into Set( x=$[${x} = 1]).  That means you are setting the variable 
name, " x", including the leading space.  That is not the same variable as ${x} 
which you are using everywhere else.

-- 
Russell Bryant
Software Developer
Digium, Inc.

___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] AEL2 Looping

2006-07-28 Thread Douglas Garstang
I was just experimenting with AEL2, and tried to use a for loop as per the 
example.
Here's what I have.

context new_pbx_betty_start {

_X. => { 
for (x=0; ${x} < 3; x=${x} + 1) { 
Verbose(x is ${x} !); 
}  
}; 

}

Here's the output.

The var x never gets incremented! Is this a bug?
The while loops seem to work ok.

x is 0 !
-- Executing Set("SIP/3254101-db4b", " x=1") in new stack
-- Executing Goto("SIP/3254101-db4b", "2") in new stack
-- Goto (new_pbx_betty_start,36521478,2)
-- Executing GotoIf("SIP/3254101-db4b", "1?3:6") in new stack
-- Goto (new_pbx_betty_start,36521478,3)
-- Executing Verbose("SIP/3254101-db4b", "x is 0 !") in new stack
x is 0 !
-- Executing Set("SIP/3254101-db4b", " x=1") in new stack
-- Executing Goto("SIP/3254101-db4b", "2") in new stack
-- Goto (new_pbx_betty_start,36521478,2)
-- Executing GotoIf("SIP/3254101-db4b", "1?3:6") in new stack
-- Goto (new_pbx_betty_start,36521478,3)
-- Executing Verbose("SIP/3254101-db4b", "x is 0 !") in new stack
x is 0 !
-- Executing Set("SIP/3254101-db4b", " x=1") in new stack
-- Executing Goto("SIP/3254101-db4b", "2") in new stack
-- Goto (new_pbx_betty_start,36521478,2)
-- Executing GotoIf("SIP/3254101-db4b", "1?3:6") in new stack
-- Goto (new_pbx_betty_start,36521478,3)
-- Executing Verbose("SIP/3254101-db4b", "x is 0 !") in new stack
x is 0 !
-- Executing Set("SIP/3254101-db4b", " x=1") in new stack
-- Executing Goto("SIP/3254101-db4b", "2") in new stack
-- Goto (new_pbx_betty_start,36521478,2)
-- Executing GotoIf("SIP/3254101-db4b", "1?3:6") in new stack
-- Goto (new_pbx_betty_start,36521478,3)
-- Executing Verbose("SIP/3254101-db4b", "x is 0 !") in new stack
x is 0 !
-- Executing Set("SIP/3254101-db4b", " x=1") in new stack
-- Executing Goto("SIP/3254101-db4b", "2") in new stack
-- Goto (new_pbx_betty_start,36521478,2)
-- Executing GotoIf("SIP/3254101-db4b", "1?3:6") in new stack
-- Goto (new_pbx_betty_start,36521478,3)
-- Executing Verbose("SIP/3254101-db4b", "x is 0 !") in new stack



x is 0 !
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2

2006-06-09 Thread Mr. James W. Laferriere

Hello All ,

On Fri, 9 Jun 2006, Gonzalo Servat wrote:

On 6/9/06, Joshua Colp <[EMAIL PROTECTED]> wrote:
[..snip..]

I'd just like to note that AEL2 was brought over into Asterisk trunk
(what will become 1.4) and the old AEL removed. That's where most
development is taking place on AEL2, and why you don't see patches on
the bug tracker.

Hi Joshua,
I was just reading the bug report and noticed it has been merged.
Awesome news! I'm still using 1.2.x so sticking to AEL for now, but
I'm going to quickly move to AEL2 as soon as I upgrade to 1.4!
(whenever it comes out)
Regards,
Gonzalo.

Something along the same lines .  Does anyone have link to complete
documentation of AEL2 ?  Did a small bit of checking & nothing
that seemed complete .  Tia ,  JimL
--
+--+
| James   W.   Laferriere |   SystemTechniques   | Give me VMS |
| NetworkEngineer | 3600 14th Ave SE #20-103 |  Give me Linux  |
| [EMAIL PROTECTED] |  Olympia ,  WA.   98501  |   only  on  AXP |
+--+
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2

2006-06-08 Thread Gonzalo Servat

On 6/9/06, Joshua Colp <[EMAIL PROTECTED]> wrote:
[..snip..]


I'd just like to note that AEL2 was brought over into Asterisk trunk
(what will become 1.4) and the old AEL removed. That's where most
development is taking place on AEL2, and why you don't see patches on
the bug tracker.


Hi Joshua,

I was just reading the bug report and noticed it has been merged.
Awesome news! I'm still using 1.2.x so sticking to AEL for now, but
I'm going to quickly move to AEL2 as soon as I upgrade to 1.4!
(whenever it comes out)

Regards,
Gonzalo.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2

2006-06-08 Thread Joshua Colp

Gonzalo Servat wrote:

Hi Doug,

On 6/9/06, Doug Crompton <[EMAIL PROTECTED]> wrote:

Replying to myself here... I got the latest 1.2 head via svn. Did a patch
diff'ed it to latest AEL2 (as described at:
http://voip-info.org/wiki/view/Asterisk+AEL2

Patched it. All went fine. On compile I get the following error

[..snip..]

This probably won't help you much, but you'll find one big bug report
in the Digium Bug Database used for AEL2 where you'll see lots of
input from the AEL2 guy. He's a good guy and real helpful. Infact,
here's the URL:

http://bugs.digium.com/view.php?id=6021

Hope this helps!

Regards,
Gonzalo.
___
--Bandwidth and Colocation provided by Easynews.com --

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


I'd just like to note that AEL2 was brought over into Asterisk trunk 
(what will become 1.4) and the old AEL removed. That's where most 
development is taking place on AEL2, and why you don't see patches on 
the bug tracker.


--
Joshua Colp
Software Developer
Digium
P - 256-428-6066
C - 506-878-0147
[EMAIL PROTECTED]
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2

2006-06-08 Thread Gonzalo Servat

Hi Doug,

On 6/9/06, Doug Crompton <[EMAIL PROTECTED]> wrote:

Replying to myself here... I got the latest 1.2 head via svn. Did a patch
diff'ed it to latest AEL2 (as described at:
http://voip-info.org/wiki/view/Asterisk+AEL2

Patched it. All went fine. On compile I get the following error

[..snip..]

This probably won't help you much, but you'll find one big bug report
in the Digium Bug Database used for AEL2 where you'll see lots of
input from the AEL2 guy. He's a good guy and real helpful. Infact,
here's the URL:

http://bugs.digium.com/view.php?id=6021

Hope this helps!

Regards,
Gonzalo.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2

2006-06-08 Thread Doug Crompton
Replying to myself here... I got the latest 1.2 head via svn. Did a patch
diff'ed it to latest AEL2 (as described at:
http://voip-info.org/wiki/view/Asterisk+AEL2

Patched it. All went fine. On compile I get the following error

pbx_ael2.c: In function `check_goto':
pbx_ael2.c:1063: parse error before `struct'
pbx_ael2.c:1065: `x3' undeclared (first use in this function)
pbx_ael2.c:1065: (Each undeclared identifier is reported only once
pbx_ael2.c:1065: for each function it appears in.)
pbx_ael2.c: In function `find_label_in_current_context':
pbx_ael2.c:1532: parse error before `struct'
pbx_ael2.c:1534: `x3' undeclared (first use in this function)
make[1]: *** [pbx_ael2.o] Error 1

Which boils down to a definition of x3 in pbx_ael2.c

Anyone played with this?

Doug


On Thu, 8 Jun 2006, Doug Crompton wrote:

> Being rather new to Asterisk I was wondering what the current status of
> AEL2 is? I see reference to it back in January but that was many versions
> ago. Is it in the current code?
>
> Doug
>
> 
> *  Doug Crompton *
> *  Richboro, PA 18954*
> *  215-431-6307  *
> **
> * [EMAIL PROTECTED]*
> * http://www.crompton.com  *
> 
>
>
> ___
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


"Those that sacrifice essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."  -- Ben Franklin (1759)


*  Doug Crompton   *
*  Richboro, PA 18954  *
*  215-431-6307*
*  *
* [EMAIL PROTECTED]*
* http://www.crompton.com  *



___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] AEL2

2006-06-08 Thread Doug Crompton
Being rather new to Asterisk I was wondering what the current status of
AEL2 is? I see reference to it back in January but that was many versions
ago. Is it in the current code?

Doug


*  Doug Crompton   *
*  Richboro, PA 18954  *
*  215-431-6307*
*  *
* [EMAIL PROTECTED]*
* http://www.crompton.com  *



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 and CID

2006-06-01 Thread Aaron Daniel
Correct me if I'm wrong, but doing this CID stuff in AEL may not make as 
much sense in terms of converting dialplans over as it seems.  I say this, 
because with the original usage of the CID checking in the old extension 
language, you could base PRIORITIES on the CID, therefore changing only 
part of the actual extension logic.  With how you're looking at it, that 
would effectively render an extension into two separate logical forms, 
which I know would definitely confuse people when converting the 
languages.  Also, doing the CID checks inside the extension gives a larger 
degree of control, and makes the dialplan a bit more eligible.  From an 
administration standpoint, you could have multiple EXTEN/CID's strewn 
about, but if you strictly use the in-extension checking, you know that 
*THIS* is the extension you're looking for, and *THOSE* CID's are the ones 
that are going to do something different.


Just my thoughts on the matter :) Hope they help a little.

On Thu, 1 Jun 2006, Julian Lyndon-Smith wrote:


Yes! That's the answer I was hoping ! I'm not stupid - it's a *feature* :)

Anything you need testing, let me know !

Julian


Steve Murphy wrote:

From: Douglas Garstang <[EMAIL PROTECTED]>
Yikes! I'm glad I didn't take the plunge into AEL2. Get #include
functionality, but lose cid in the dialplan. Hmmm.


-Original Message-
From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:21 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 and CID


Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, everyone 
else gets demo-moreinfo.


In AEL:

  111 => {
 Playback(demo-moreinfo);
 Hangup();
 };

  111/666 => {
 Playback(demo-congrats);
 Hangup();
 };

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian



Douglas!! Now, now!! That is not the proper attitude!! ;^) AEL is still
in the formation, we'll look to see if this little problem can be
remedied.

murf





___
--Bandwidth and Colocation provided by Easynews.com --

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




___
--Bandwidth and Colocation provided by Easynews.com --

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



--
Aaron Daniel
Computer Systems Technician
Sam Houston State University
[EMAIL PROTECTED]
(936) 294-4198
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 and CID

2006-06-01 Thread Julian Lyndon-Smith

Yes! That's the answer I was hoping ! I'm not stupid - it's a *feature* :)

Anything you need testing, let me know !

Julian


Steve Murphy wrote:

From: Douglas Garstang <[EMAIL PROTECTED]>
Yikes! I'm glad I didn't take the plunge into AEL2. Get #include
functionality, but lose cid in the dialplan. Hmmm.


-Original Message-
From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:21 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 and CID


Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, 
everyone 
else gets demo-moreinfo.


In AEL:

  111 => {
 Playback(demo-moreinfo);
 Hangup();
 };

  111/666 => {
 Playback(demo-congrats);
 Hangup();
 };

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian



Douglas!! Now, now!! That is not the proper attitude!! ;^) AEL is still
in the formation, we'll look to see if this little problem can be
remedied.

murf





___
--Bandwidth and Colocation provided by Easynews.com --

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




___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 and CID

2006-06-01 Thread Steve Murphy
> From: Douglas Garstang <[EMAIL PROTECTED]>
> Yikes! I'm glad I didn't take the plunge into AEL2. Get #include
> functionality, but lose cid in the dialplan. Hmmm.
> 
> > -Original Message-
> > From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 31, 2006 1:21 PM
> > To: asterisk-users@lists.digium.com
> > Subject: [Asterisk-Users] AEL2 and CID
> > 
> > 
> > Does anyone know how to get CID working in AEL2 ?
> > 
> > In extensions.conf you can do:
> > 
> > exten => 111/666,1,PlayBack(demo-congrats)
> > exten => 111/666,2,Hangup()
> > 
> > exten => 111,1,PlayBack(demo-moreinfo)
> > exten => 111,2,Hangup()
> > 
> > and if callerid 666 dialed 111, they would get demo-congrats, 
> > everyone 
> > else gets demo-moreinfo.
> > 
> > In AEL:
> > 
> >   111 => {
> >  Playback(demo-moreinfo);
> >  Hangup();
> >  };
> > 
> >   111/666 => {
> >  Playback(demo-congrats);
> >  Hangup();
> >  };
> > 
> > does not work. It always plays demo-moreinfo.
> > 
> > I cannot find and docs on how to do this.
> > 
> > Anyone got any idea ?
> > 
> > Many thanks.
> > 
> > Julian
> > 

Douglas!! Now, now!! That is not the proper attitude!! ;^) AEL is still
in the formation, we'll look to see if this little problem can be
remedied.

murf





___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 and CID

2006-05-31 Thread Julian Lyndon-Smith
Yeah, thanks, that was the way I was leaning to. Just was wanting to 
know if it was a syntax I was getting wrong, or if there is no other way 
of doing this.


Julian.

Mojo with Horan & Company, LLC wrote:

I guess you could do this, but it would be a little cumbersome:

context incoming {
s => {
if ("${CALLERID(num)}" = "8005551212")
{
NoOp("Dir. Asst. calling");
}
else if ("${CALLERID(num)}" = "800444")
{
NoOp("ANI calling");
}
}
}



Douglas Garstang wrote:
Yikes! I'm glad I didn't take the plunge into AEL2. Get #include 
functionality, but lose cid in the dialplan. Hmmm.



-Original Message-
From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:21 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 and CID


Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, 
everyone else gets demo-moreinfo.


In AEL:

  111 => {
 Playback(demo-moreinfo);
 Hangup();
 };

  111/666 => {
 Playback(demo-congrats);
 Hangup();
 };

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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





___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 and CID

2006-05-31 Thread Mojo with Horan & Company, LLC

Of course, without the quotes in the NoOp parameters, if it matters:
---
...
NoOp(Dir. Asst. calling);
...


Douglas Garstang wrote:

Yikes! I'm glad I didn't take the plunge into AEL2. Get #include functionality, 
but lose cid in the dialplan. Hmmm.


-Original Message-
From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:21 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 and CID


Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, 
everyone 
else gets demo-moreinfo.


In AEL:

  111 => {
 Playback(demo-moreinfo);
 Hangup();
 };

  111/666 => {
 Playback(demo-congrats);
 Hangup();
 };

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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



--
Mojo <[EMAIL PROTECTED]>
Office Manger, Horan & Company, LLC
(907) 747- x112

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 and CID

2006-05-31 Thread Mojo with Horan & Company, LLC

I guess you could do this, but it would be a little cumbersome:

context incoming {
s => {
if ("${CALLERID(num)}" = "8005551212")
{
NoOp("Dir. Asst. calling");
}
else if ("${CALLERID(num)}" = "800444")
{
NoOp("ANI calling");
}
}
}



Douglas Garstang wrote:

Yikes! I'm glad I didn't take the plunge into AEL2. Get #include functionality, 
but lose cid in the dialplan. Hmmm.


-Original Message-
From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:21 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 and CID


Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, 
everyone 
else gets demo-moreinfo.


In AEL:

  111 => {
 Playback(demo-moreinfo);
 Hangup();
 };

  111/666 => {
 Playback(demo-congrats);
 Hangup();
 };

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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



--
Mojo <[EMAIL PROTECTED]>
Office Manger, Horan & Company, LLC
(907) 747- x112
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 and CID

2006-05-31 Thread Douglas Garstang
Yikes! I'm glad I didn't take the plunge into AEL2. Get #include functionality, 
but lose cid in the dialplan. Hmmm.

> -Original Message-
> From: Julian Lyndon-Smith [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 31, 2006 1:21 PM
> To: asterisk-users@lists.digium.com
> Subject: [Asterisk-Users] AEL2 and CID
> 
> 
> Does anyone know how to get CID working in AEL2 ?
> 
> In extensions.conf you can do:
> 
> exten => 111/666,1,PlayBack(demo-congrats)
> exten => 111/666,2,Hangup()
> 
> exten => 111,1,PlayBack(demo-moreinfo)
> exten => 111,2,Hangup()
> 
> and if callerid 666 dialed 111, they would get demo-congrats, 
> everyone 
> else gets demo-moreinfo.
> 
> In AEL:
> 
>   111 => {
>  Playback(demo-moreinfo);
>  Hangup();
>  };
> 
>   111/666 => {
>  Playback(demo-congrats);
>  Hangup();
>  };
> 
> does not work. It always plays demo-moreinfo.
> 
> I cannot find and docs on how to do this.
> 
> Anyone got any idea ?
> 
> Many thanks.
> 
> Julian
> 
> 
> ___
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] AEL2 and CID

2006-05-31 Thread Julian Lyndon-Smith

Does anyone know how to get CID working in AEL2 ?

In extensions.conf you can do:

exten => 111/666,1,PlayBack(demo-congrats)
exten => 111/666,2,Hangup()

exten => 111,1,PlayBack(demo-moreinfo)
exten => 111,2,Hangup()

and if callerid 666 dialed 111, they would get demo-congrats, everyone 
else gets demo-moreinfo.


In AEL:

 111 => {
Playback(demo-moreinfo);
Hangup();
};

 111/666 => {
Playback(demo-congrats);
Hangup();
};

does not work. It always plays demo-moreinfo.

I cannot find and docs on how to do this.

Anyone got any idea ?

Many thanks.

Julian


___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread Steve Murphy
On Fri, 2006-01-13 at 10:24 -0700, Douglas Garstang wrote:
> Does ael support #include statements yet?
> Is there any way to perform a reload in asterisk and reload extensions.ael?
> 
> If both of these aren't available yet, then AEL isn't ready for real-world 
> use.
> 
> Doug.
> 

Oh, and one more thing about the reload of AEL2---
   

I provide in the patch, in the utils/ subdir, the standalone exec,
aelparse, which will parse the file and generate any errors it might
have during the load. It is far better to lint out the problems before
feeding it to asterisk, and taking the whole switch out of commission
whilst you muck with the file.

There are a bunch of errors I just plain will not be able to detect
before run-time. Hopefully you don't have to use reload until all the
syntax and semantic errors are cleaned up.


murf

-- 
Steve Murphy <[EMAIL PROTECTED]>
Electronic Tools Company

___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread trixter aka Bret McDanel
On Fri, 2006-01-13 at 11:42 -0700, Steve Murphy wrote:
> to reload, 
> 
> > ael2 reload
> 

ael1 supported that too, the file inclusion was a really nice feature to
add, something I felt was fundamentally missing from ael1.  

I like the syntax checker too, so you dont check by potentially breaking
a live install with typos :/  

Good work so far :)

-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
http://www.sacaug.org/ Sacramento Asterisk Users Group


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread Steve Murphy
On Fri, 2006-01-13 at 10:24 -0700, Douglas Garstang wrote:
> Does ael support #include statements yet?
> Is there any way to perform a reload in asterisk and reload extensions.ael?
> 
> If both of these aren't available yet, then AEL isn't ready for real-world 
> use.
> 
> Doug.
> 

Doug--

Good news, then!

#include ""
where  can be either absolute, or relative to /etc/asterisk
and, on top of that, the #include "" stuff can be used to include
contexts, extensions, or even just stuff inside an extension. You can
use it ALMOST anywhere in the file. The scanner replaces it with the
contents of the file. Nesting is OK. 50 levels deep max.

to reload, 

> ael2 reload

in the asterisk command shell.

This is all there in the WIKI. Do not confuse AEL with AEL2.
See  http://www.voip-info.org/wiki/view/Asterisk+AEL2

AEL2, I've done in the last month.

Check it out, work it over. Report your experience.

murf




-- 
Steve Murphy <[EMAIL PROTECTED]>
Electronic Tools Company


smime.p7s
Description: S/MIME cryptographic signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread Bartosz Piec

Douglas Garstang wrote:

Does ael support #include statements yet?


Based on http://www.voip-info.org/wiki/view/Asterisk+AEL2:

To reload extensions.ael2, the following command can be issued at the CLI.

*CLI> ael2 reload


Is there any way to perform a reload in asterisk and reload extensions.ael?


From the same site:

You can include other files with the #include "filepath" construct.

   1. include "/etc/asterisk/testfor.ael2"

Read the site for more details.

--
Best regards,
Bartosz Piec
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread Douglas Garstang
Does ael support #include statements yet?
Is there any way to perform a reload in asterisk and reload extensions.ael?

If both of these aren't available yet, then AEL isn't ready for real-world use.

Doug.

-Original Message-
From: Steve Murphy [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 9:54 AM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] AEL2 -- The Future --


Call to Action!

For those who have the courage/ability, go grab an SVN copy of the 
asterisk release, the HEAD version,

and my latest patch, from:  http://bugs.digium.com/view.php?id=6021

Right now, the latest version of the patch is 0.10.

apply it to the SVN head version, and do a "make".

Read the Wiki on AEL2:  http://www.voip-info.org/wiki/view/Asterisk+AEL2

Look at the examples at: 
  http://www.voip-info.org/wiki/view/AEL+Example+Snippets

Then, sit down and rewrite your extension.conf
to /etc/asterisk/extensions.ael2

Use "utils/aelparse -n" to check your file. Get rid of all the syntax
errors. Repeat until clean.

Then, see if your extensions.ael2 loads. Remove all the contexts except
[general] from your extensions.conf, and restart asterisk. Test the new
dialplan.

Now, at this point, you have some information that would be useful to
me! I need to know your trials, troubles, confusions, and solutions.
Perhaps there's some added check that AEL2 could make that might have
warned or helped you. Perhaps you'll help find some bug and solify AEL2.

WHY ON EARTH WOULD I WANT TO DO ALL THAT WORK?, you might ask!

In answer to that, my reply is the Parable of the Programmer:

**
In the beginning, there was machine code, and the Programmer thought it
was great.

Then, along came the assembler, and the programmer found it very useful.

Then, along came the macro assembler, and the programmer was excited
indeed.

But then came the "programming language", and the programmer left behind
the "macro assembler", and never went back to it.
**

Now, the goal is for the same to happen to you, in moving from the
extensions.conf method of programming dialplans to extensions.ael2.

If you don't think it will improve the quality of the code you write for
dialplans, or reduce your costs of dialplan development, then we'll
scrap the project and hand ourselves over to public humiliation. ;^)

murf


-- 
Steve Murphy <[EMAIL PROTECTED]>
Electronic Tools Company

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] AEL2 -- The Future --

2006-01-13 Thread Steve Murphy
Call to Action!

For those who have the courage/ability, go grab an SVN copy of the 
asterisk release, the HEAD version,

and my latest patch, from:  http://bugs.digium.com/view.php?id=6021

Right now, the latest version of the patch is 0.10.

apply it to the SVN head version, and do a "make".

Read the Wiki on AEL2:  http://www.voip-info.org/wiki/view/Asterisk+AEL2

Look at the examples at: 
  http://www.voip-info.org/wiki/view/AEL+Example+Snippets

Then, sit down and rewrite your extension.conf
to /etc/asterisk/extensions.ael2

Use "utils/aelparse -n" to check your file. Get rid of all the syntax
errors. Repeat until clean.

Then, see if your extensions.ael2 loads. Remove all the contexts except
[general] from your extensions.conf, and restart asterisk. Test the new
dialplan.

Now, at this point, you have some information that would be useful to
me! I need to know your trials, troubles, confusions, and solutions.
Perhaps there's some added check that AEL2 could make that might have
warned or helped you. Perhaps you'll help find some bug and solify AEL2.

WHY ON EARTH WOULD I WANT TO DO ALL THAT WORK?, you might ask!

In answer to that, my reply is the Parable of the Programmer:

**
In the beginning, there was machine code, and the Programmer thought it
was great.

Then, along came the assembler, and the programmer found it very useful.

Then, along came the macro assembler, and the programmer was excited
indeed.

But then came the "programming language", and the programmer left behind
the "macro assembler", and never went back to it.
**

Now, the goal is for the same to happen to you, in moving from the
extensions.conf method of programming dialplans to extensions.ael2.

If you don't think it will improve the quality of the code you write for
dialplans, or reduce your costs of dialplan development, then we'll
scrap the project and hand ourselves over to public humiliation. ;^)

murf


-- 
Steve Murphy <[EMAIL PROTECTED]>
Electronic Tools Company

___
--Bandwidth and Colocation provided by Easynews.com --

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