Calling Cards External Script
This option is available starting from MOR 9
What is it for?
This functionality is designed to allow clients to modify the way how MOR Core behaves with Calling Cards.
MOR itself has some logic which allows to change this from the GUI.
But very often it is necessary to extend or change such behavior.
This functionality is made as external script in which clients (with enough programming skills) can define the way how MOR reacts to some situations.
With External Script it is possible:
- Adjust Time which is told to the Card User
- Adjust Balance which is told to the Card User
- Adjust real call duration of the Card User
How to turn it on?
By default it is OFF:
Turn it ON:
NOTE: When External Script is ON, Ghost Minutes and Ghost Balance functionality is NOT used from the GUI. It is defined in External Script.
How to use it?
File which does all the logic is in /usr/src/mor/agi/mor_cc_external.c
It is written in C with a lot of commentaries which explains all the logic INSIDE THE FILE.
Same script can be rewritten in any other programming language by experienced programmer which knows how to interact with Asterisk over AGI.
Make changes to this file, execute ./install.sh in same folder to compile and move it to correct place.
How to know it is working?
Make a call using Calling Cards with enabled Tell Time/Balance and watch Asterisk CLI:
This shows the output BEFORE telling the balance to the Card User.
NOTE: default External Script DOES NOT change any values, it is just for demo.
This shows the output BEFORE telling the time to the Card User.
NOTE: default External Script DOES NOT change any values, it is just for demo.
IMPORTANT: To make sure script works OK, you SHOULD see line:
MOR CC External Script stopped.