I need to execute an AGI script in one of the 6 inbound did rules. The call goes across different time conditions, and finally finishes ringing different groups depending on the time.
I need to find the exact context or macro prior to dial aplication, to execute an agi script. This script is able to make a query to a database and then, the name of the caller, is shown on the telephone.
You could find the [ext-did-000N] in /etc/asterisk/extensions_additional.conf that contains your DID and add selectivity to the AGI script in [ext-did-000n-custom] as all DID’s in that context share the same “custom” context
I’ve reading the extensions_additional.conf, and I found the part that dial the phone number, and I write two lines for executing it. It works, but it would be better to put them in macro-dial, but I can’t find it. Does it really exist? Should be perfect to execute it in every inboubd call on extensions:
Read the [macro-dial] context in /etc/asterisk/extensions.conf, it is not directly tied to any incoming call however only any derivative routing that might dial extensions.