[Asterisk-Users] How do i make best use of Macro?

Mark Spencer markster at digium.com
Fri Jun 13 01:06:41 MST 2003


There is already a "MeetmeCount" application if that's helpful.

mark

On Wed, 11 Jun 2003, Christopher Arnold wrote:

>
> Hi,
>
> im trying to setup a chat system. And i belive the best way is using an
> macro. But a couple of questions regarding using macros pops up.
>
> a) Is there state building up if my macro calls itself recusivly?
>
> Pseudo example:
> [macro-chat]
> to_many? Macro(chat, next_room)
> increase # of users in chat
>
> meeteme(room)
>
> exit from meetme: decrease # of users in chat then Macro(chat, next_room)
>
> exten => h,1, decrease # of users in chat
>
> <end example>
>
> In this example i call the macro again and again until hangup.
>
> Is this a good way to implement my chat functionality?
> Or should i try another path?
>
>
> b) How do i return from a macro?
> Do i just fall out by not having any more valid extensions in the macro?
> Vill execution then continue at the next priority?
>
> Or should i use a Goto(newcontext,s,1)?
>
>
> 	/Chris
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list