GSM Call

How-To: Use Superfecta for Outbound CalleeID Lookups

This article was inspired by the work in this link.

There are two options to let IncrediblePBX be aware of the Outbound dialed number calleeID.

1- Install an unsigned module [Click here for the Module] that does all the work for changing the [macro-dialout-trunk] so as Asterisk can lookup the outbound dialed number callerID and saves it to the "userfield" of the Asterisk CDRs. Utilizing this option, you are able to enable/disable the outbound dialed number callerID lookup feature from the PBX GUI. The cons of this option is that you get an alert of an unsigned module inside the GUI. The module will modify the [macro-dialout-trunk] inside the "/etc/astrisk/extensions_additional.conf" by adding some extra lines/commands to the dialplan.

N.B. Once you install the module via the "Admin" --> "Module Admin", you need to enable the module as well as enable the feature set inside the module for it to start working. You can enable the module's feature set by accessing the module from "Admin" --> "Outbound CNAM" (refer to the below picture)

2- Manually modify [macro-dialout-trunk] inside the "/etc/astrisk/extensions_additional.conf" file by adding the following lines
exten => s,n,Set(CIDSFSCHEME=QUxMfEFMTA==)
exten => s,n,Set(temp1=${CALLERID(name)})
exten => s,n,Set(CALLERID(name)=)
exten => s,n,Set(temp2=${CALLERID(number)})
exten => s,n,Set(CALLERID(number)=${DIAL_NUMBER})
exten => s,n,AGI(/var/www/html/admin/modules/superfecta/agi/superfecta.agi)
exten => s,n,Set(CALLERID(name)=${temp1})
exten => s,n,Set(CALLERID(number)=${temp2})
exten => s,n,Set(CDR(userfield,r)=${lookupcid})
exten => s,n,Set(CONNECTEDLINE(name,i)=${lookupcid})
Note: exten => s,n,Set(CIDSFSCHEME=, i should ask Randy about this!!
Those lines should be inserted right after the line that says;
exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(CONNECTEDLINE(name,i)=CID:${CALLERID(number)}))
and before the line that says;
exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
(1) In order to show outbound dialed calleeIDs on both the CDRs as well as AMI events collected by the "Call-Status" script, we had to use "accountcode" Asterisk field instead of "userfield".
(2) Outbound dialed CalleeID can be displayed on the Caller VoIP phone if the "Send RPID" is set to "Send Remote-Part-ID Header" on the extension's configuration page in FreePBX.
Since we have introduced some changes to the "/etc/asterisk/extensions_additional.conf" file that "Outbound CNAM" wrote its original code in, If you use option (2) in this KB you will face no problems when applying new changes in the future via the IncrediblePBX GUI. While if you use option (1), [macro-dialout-trunk] will keep reverting back to use the "userfield" instead of the "accountcode" field. To solve this we added the whole [macro-dialout-trunk] macro to extensions_override_freepbx.conf so as to avoid it reverting back to the original code set by the "Outbound CNAM" module which uses "userfield".

    • Related Articles

    • How-To: Use GSMcall Fax Portal

      Login to GSM Call Fax Portal 1- Point your Internet browser to '' to go to the PBX splash screen. Replace 'PBX_name' with your company 's name. 2- Start logining to the fax portal by clicking on the fax icon that is on PBX ...
    • Reporting Statistics

      To use Reporting, first login to your PBX. HTTP:// From here select PBX Administration  Then select Reports -> Call Statistics This will then connect to the reports module: