When a dynamic feature calls a macro, how to find out which user has requested the feature
For example imagine that we want to set *222 to play a recorded message for each number.
features.conf:
and in extentions.conf:
[globals]
DYNAMIC_FEATURES=>playfeature
...
[macro-playfeature]
exten => s,1,NoOp()
exten => s,n,Playback(/etc/asterisk/arianda/playfeature/${CALLERID(number)})
In this case plays the message based on the peer’s callerid
in another case:
[macro-playfeature]
exten => s,1,NoOp()
exten => s,n,Playback(/etc/asterisk/arianda/playfeature/${DIALEDPEERNUMBER})
In this case,it works fine when peer is the caller.
These means that when dynamic feature calls a macro, just information about the side which macro is executing on is passed. How to find out who has requested the feature???