How can I trigger this macro only for extension 6822?

I have a macro that is triggering a growl message to be sent to my desktop computer when a call comes into to our customer service queue. Asterisk is sending me three duplicate Growl messages every time a call is received, one for each extension in the Queue.

How can I trigger this macro only for extension 6822?

Here is the current macro:

[code];
############################################################################
; Macros [macro]
; ############################################################################

; Rings one or more extensions. Handles things like call forwarding and DND
; We don’t call dial directly for anything internal anymore.
; ARGS: $TIMER, $OPTIONS, $EXT1, $EXT2, $EXT3, …
; Use a Macro call such as the following:
; Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,…)
[macro-dial]
exten => s,1,GotoIf($["${MOHCLASS}" = “”]?dial)

;PIXAR MOD dialecticphp.agi
exten => s,n,AGI(dialecticphp.agi)[/code]

I also tried this but it did not work:

;PIXAR MOD dialecticphp.agi exten => 6822,n,AGI(dialecticphp.agi)

does anyone know how to do this?

You haven’t provided enough information for me to really understand what you are trying to do and the context in which you are trying to do it.

(Incidentally, macros are deprecated.)

[quote=“david55”]You haven’t provided enough information for me to really understand what you are trying to do and the context in which you are trying to do it.

(Incidentally, macros are deprecated.)[/quote]

This macro gets executed three times when a caller enters a call queue that contains three extensions:
exten => s,n,AGI(dialecticphp.agi)

I tried to modify the macro so it only gets executed when extension 6822 is called but this version of the macro does nothing at all:
exten => 6822,n,AGI(dialecticphp.agi)

In what version were macros deprecated and what has replaced them? I am using Asterisk version 1.6.2.13.

What causes the macro to get called?

Macro was deprecated in 1.6.1 and possibly 1.6.0. Internally it is now implemented using the subroutine mechanism, with only limited attempts to retain the original semantics. New designs should use subroutines. I am pretty sure the version you are using has had the macros removed from the sample extensions.conf.

The macro gets called when someone calls in. Currently it is getting triggered three times (once for each extension in the call queue). We only want it to be called once, for just one of the extensions in the call queue.

I am not really sure what the definition of a macro is. What were are doing is calling a AGI script written in PHP. It is being called using the following line in the extensions.conf:

exten => s,n,AGI(dialecticphp.agi)

I am not sure that this is the proper place to put it but this is only place that it has worked so far.

How does it get called when someone calls in?

I am trying to get a copy of the php script from the person at our company that wrote it.

I am not exactly sure what you mean by “how is it being called?”. All the php script is doing is making a database connection and modifying some fields based on incoming agi parameters. It doesn’t do anything with extensions, trunks, inbound routes, etc.

Is the extensions.conf file where this php script trigger should go?

How should I modify this so it only get’s trigger when a specific extension is called?

exten => s,n,AGI(dialecticphp.agi)

Can someone please tell me if the extensions.conf file is the correct place for us to put this macro?

exten => s,n,AGI(dialecticphp.agi)

anyone?