FreePBX Custom Files

Hello,

I’m trying to make some improvements in my telephony scenario with FreePBX, I want to collect the hangucause of the calls and make the deal. But I did a test, I am using AEL, I created a macro that collects the status of the variables and then I play in a context so that it can generate me log and I accompany it inside the asterisk logs, but I observe that nothing happens, I created the macro with just the name that the standard macro calls (macro-dialout-trunk-custom) that according to the Freepbx documentation, the customizations must be made within the custom files.

I notice that within the file “extensions_additions.conf” there is the macro “macro-dialout-trunk” macro that starts with an “macro-dialout-trunk-custom” macro include the one I created and should have interaction between the two, correct?

I’m using:
FreePBX 12
CentOS 6
Asterisk 11

But it does not work, can anybody help me with this?

Below are some additional information.

extensions.ael

 globals {


};


context analise {
     s => {
        teste1:
        NoOp(Inicio HangupCause);
        NoOp(Usando AEL no FreePBX!);
        NoOp(O valor de DIALSTATUS_AVG é :......: ${DIALSTATUS_AVG});
        NoOp(O valor de HANGUPCAUSE_AVG é :......: ${HANGUPCAUSE_AVG});
        NoOp(O valor de DIAL_TRUNK_AVG é :......: ${DIAL_TRUNK_AVG});
        NoOp(=== FIM - ANALISE DE HANGUPCALL ====);
        hangup();
        }
}

macro macro-dialout-trunk-custom() {
        NoOp(=== INICIO - ANALISE DE HANGUPCALL ===);
        NoOp(=== CARREGANDO VARIAVEIS ===);
        Set(DIALSTATUS_AVG=${DIALSTATUS});
        Set(HANGUPCAUSE_AVG=${HANGUPCAUSE});
        Set(DIAL_TRUNK_SVG=${DIAL_TRUNK});
        NoOp(O valor de DIALSTATUS_AVG é :......: ${DIALSTATUS_AVG});
        NoOp(O valor de HANGUPCAUSE_AVG é :......: ${HANGUPCAUSE_AVG});
        NoOp(O valor de DIAL_TRUNK_AVG é :......: ${DIAL_TRUNK_AVG});
        NoOp(=== FIM - ANALISE DE HANGUPCALL ====);
        goto analise|s|teste1;

}

We don’t see a lot of AEL code - most people just enter the macro and the code in “extensions_custom.comf” and hook it the way you did.

If you decide to do that, I’m sure @xrobau or maybe @dicko will be able to look at if and tell you in two sentences where your code is not going right. .

The first place I’d look is in the “Set()” function arguments. I haven’t looked lately, but I think the order is “SET(Destination, Source)”. If that’s the case, yours in the macro appear to be backwards. When you start debugging, all of the macro and context information will be displayed in the /var/log/asterisk/full file. Post and excerpt of that and we’ll be able to help you.

Hello,

I understand, in my full log I do not have this information, so this dudivo if I need to do some link in another custom file.

Regarding set (), in AEL I already use it this way and it works, but I’ll check if there is any other way to use it.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.