Re: [asterisk-users] 1.6 upgrade issues

2008-12-17 Thread Chris Bagnall
> It is precisely relevant to this issue.  All subroutines, whether they're
> called macros or not, in AEL (in 1.6) are Gosub routines.  So to invoke that
> subroutine, you need to call out with Gosub, not with Macro.  So it probably
> should be along the lines of:  Gosub(outbound,s,1
> (${EXTEN},provider1,provider2)).

Thanks to all who replied. Looks like I just need to do a bit of 
extensions.conf find/replace then.

Any thoughts on the CDR issue?

TIA.

Regards,

Chris



___
-- 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] 1.6 upgrade issues

2008-12-16 Thread Watkins, Bradley
 

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of 
> Atis Lezdins
> Sent: Tuesday, December 16, 2008 5:05 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] 1.6 upgrade issues
> 
> On Tue, Dec 16, 2008 at 8:36 PM, Tilghman Lesher
>  wrote:
> > On Monday 15 December 2008 22:03:37 Chris Bagnall wrote:
> >> Greetings list,
> >>
> >> Over the last few days I've been gearing up to replace a 
> couple of our
> >> servers with 1.6 as something of a testbed, but I'm 
> encountering a few
> >> problems, and wondering if anyone can help...
> >>
> >> In extensions.conf, there are a number of contexts defined 
> for each group
> >> of users, along the lines of: [groupa] [groupb] etc.
> >>
> >> In each of those, there's a command include => outbound
> >>
> >> [outbound] has entries similar to the following:
> >> exten => _0[123],1,Macro(outbound,${EXTEN}, 
> provider1, provider2)
> >>
> >> the macro "outbound" is defined in extensions.ael as follows:
> >> macro outbound (number, route1, route2) {
> >>   dosomestuff;
> >> }
> >>
> >> This has worked fine in 1.2 and 1.4, but seems to be 
> choking on 1.6. I've
> >> looked through the various changes.txt files, and have 
> read mention of
> >> replacing macro calls with Gosub(), but I'm not sure 
> that's relevant to
> >> this issue.
> >
> > It is precisely relevant to this issue.  All subroutines, 
> whether they're
> > called macros or not, in AEL (in 1.6) are Gosub routines.  
> So to invoke that
> > subroutine, you need to call out with Gosub, not with 
> Macro.  So it probably
> > should be along the lines of:  Gosub(outbound,s,1
> > (${EXTEN},provider1,provider2)).
> >
> 
> Actually there's ampersand operator prefixing macro name, so AEL
> parser will automatically check dependencies etc:
> 
> &outbound(${EXTEN},provider1,provider2);
> 
> Regards,
> Atis
> 

Yes, but in his instance he's mixing AEL-written dialplan with regular
extensions.conf-style dialplan.  He's trying to call a macro where AEL
in 1.6 is not creating a "macro" in the extensions.conf sense.  It is
creating a subroutine to be used with GoSub.  Therefore, there is no
context called [macro-outbound] if you do a dialplan show.

Were he calling this macro from AEL, then yes moving from 1.4 to 1.6
would have been more transparent although he would still have the issue
of overlapping context names (his handwritten outbound context versus
the subroutine AEL is generating).

- Brad

___
-- 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] 1.6 upgrade issues

2008-12-16 Thread Atis Lezdins
On Tue, Dec 16, 2008 at 8:36 PM, Tilghman Lesher
 wrote:
> On Monday 15 December 2008 22:03:37 Chris Bagnall wrote:
>> Greetings list,
>>
>> Over the last few days I've been gearing up to replace a couple of our
>> servers with 1.6 as something of a testbed, but I'm encountering a few
>> problems, and wondering if anyone can help...
>>
>> In extensions.conf, there are a number of contexts defined for each group
>> of users, along the lines of: [groupa] [groupb] etc.
>>
>> In each of those, there's a command include => outbound
>>
>> [outbound] has entries similar to the following:
>> exten => _0[123],1,Macro(outbound,${EXTEN}, provider1, provider2)
>>
>> the macro "outbound" is defined in extensions.ael as follows:
>> macro outbound (number, route1, route2) {
>>   dosomestuff;
>> }
>>
>> This has worked fine in 1.2 and 1.4, but seems to be choking on 1.6. I've
>> looked through the various changes.txt files, and have read mention of
>> replacing macro calls with Gosub(), but I'm not sure that's relevant to
>> this issue.
>
> It is precisely relevant to this issue.  All subroutines, whether they're
> called macros or not, in AEL (in 1.6) are Gosub routines.  So to invoke that
> subroutine, you need to call out with Gosub, not with Macro.  So it probably
> should be along the lines of:  Gosub(outbound,s,1
> (${EXTEN},provider1,provider2)).
>

Actually there's ampersand operator prefixing macro name, so AEL
parser will automatically check dependencies etc:

&outbound(${EXTEN},provider1,provider2);

Regards,
Atis


-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
a...@iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

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

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


Re: [asterisk-users] 1.6 upgrade issues

2008-12-16 Thread Watkins, Bradley
 

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of 
> Tilghman Lesher
> Sent: Tuesday, December 16, 2008 1:37 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] 1.6 upgrade issues
> > [outbound] has entries similar to the following:
> > exten => _0[123],1,Macro(outbound,${EXTEN}, 
> provider1, provider2)
> >
> > the macro "outbound" is defined in extensions.ael as follows:
> > macro outbound (number, route1, route2) {
> > dosomestuff;
> > }
> >
> > This has worked fine in 1.2 and 1.4, but seems to be 
> choking on 1.6. I've
> > looked through the various changes.txt files, and have read 
> mention of
> > replacing macro calls with Gosub(), but I'm not sure that's 
> relevant to
> > this issue.
> 
> It is precisely relevant to this issue.  All subroutines, 
> whether they're
> called macros or not, in AEL (in 1.6) are Gosub routines.  So 
> to invoke that
> subroutine, you need to call out with Gosub, not with Macro.  
> So it probably
> should be along the lines of:  Gosub(outbound,s,1
> (${EXTEN},provider1,provider2)).
> 

Also, as a result of AEL using GoSub now for what it calls "macros", the
contexts are indeed named the same.  You will need to have one or the
other change names.

- Brad

___
-- 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] 1.6 upgrade issues

2008-12-16 Thread Tilghman Lesher
On Monday 15 December 2008 22:03:37 Chris Bagnall wrote:
> Greetings list,
>
> Over the last few days I've been gearing up to replace a couple of our
> servers with 1.6 as something of a testbed, but I'm encountering a few
> problems, and wondering if anyone can help...
>
> In extensions.conf, there are a number of contexts defined for each group
> of users, along the lines of: [groupa] [groupb] etc.
>
> In each of those, there's a command include => outbound
>
> [outbound] has entries similar to the following:
> exten => _0[123],1,Macro(outbound,${EXTEN}, provider1, provider2)
>
> the macro "outbound" is defined in extensions.ael as follows:
> macro outbound (number, route1, route2) {
>   dosomestuff;
> }
>
> This has worked fine in 1.2 and 1.4, but seems to be choking on 1.6. I've
> looked through the various changes.txt files, and have read mention of
> replacing macro calls with Gosub(), but I'm not sure that's relevant to
> this issue.

It is precisely relevant to this issue.  All subroutines, whether they're
called macros or not, in AEL (in 1.6) are Gosub routines.  So to invoke that
subroutine, you need to call out with Gosub, not with Macro.  So it probably
should be along the lines of:  Gosub(outbound,s,1
(${EXTEN},provider1,provider2)).

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