[App_rpt-users] Better Telemetry!!!
Skyler F
electricity440 at gmail.com
Wed Mar 1 06:34:03 UTC 2017
Didn't finish typing before I hit send.
Once the editing is done, in the asterisk directory, type
./configure
make
make install
If anybody has any comments on how to add it as an option in the rpt.conf
file, let me know. The code is pretty dirty at this stage, and it is my
first real modification to the source code.
On Tue, Feb 28, 2017 at 11:30 PM, Skyler F <electricity440 at gmail.com> wrote:
> I was toying around in app_rpt.c, and I figured out a way to shorten the
> telemetry down.
>
> NODE XXXXX Connected to node XXXXX
>
> Is now replaced with:
>
> NODE XXXXX Connected
>
>
> First, go to the app_rpt.c file, located in
> /usr/src/utils/astsrc/asterisk/apps
>
> OR
> /usr/src/astsrc-1.4.23/asterisk/apps
>
>
> View the file app_rpt.c and search for this code below:
>
>
> if (n < 3) return;
> if (wait_interval(myrpt, DLY_TELEM, mychannel) == -1)
> return;
> res = saynode(myrpt,mychannel,strs[2]);
> if (!res)
> res = ast_streamfile(mychannel, "rpt/connected",
> mychannel->language);
> if (!res)
> res = ast_waitstream(mychannel, "");
> else
> ast_log(LOG_WARNING, "ast_streamfile failed on
> %s\n", mychannel->name);
> ast_stopstream(mychannel);
> res = ast_streamfile(mychannel, "digits/2",
> mychannel->language);
> if (!res)
> res = ast_waitstream(mychannel, "");
> else
> ast_log(LOG_WARNING, "ast_streamfile failed on
> %s\n", mychannel->name);
> ast_stopstream(mychannel);
> saynode(myrpt,mychannel,strs[1]);
> return;
>
>
>
> Replace That chunk of code with :
>
> if (n < 3) return;
> if (wait_interval(myrpt, DLY_TELEM, mychannel) == -1) return;
> if (strcmp(strs[1], myrpt->name) == 0)
> {
> ast_verbose("\nDialed OUT\n");
> res = saynode(myrpt,mychannel,strs[2]);
> }
> else{
> ast_verbose("\nDialed IN\n");
> res = saynode(myrpt,mychannel,strs[1]);
> }
> ast_verbose("Node Connection Test strs[1]=%s ,strs[2]=%s,
> my_node=%s\n",strs[1],strs[2], myrpt->name);
> if (!res)
> res = ast_streamfile(mychannel, "rpt/connected",
> mychannel->language);
> if (!res)
> res = ast_waitstream(mychannel, "");
> else
> ast_log(LOG_WARNING, "ast_streamfile failed on
> %s\n", mychannel->name);
> ast_stopstream(mychannel);
> /*res = ast_streamfile(mychannel, "digits/2",
> mychannel->language);*/
> if (!res)
> res = ast_waitstream(mychannel, "");
> else
> ast_log(LOG_WARNING, "ast_streamfile failed on
> %s\n", mychannel->name);
> ast_stopstream(mychannel);
> /*saynode(myrpt,mychannel,strs[1]);*/
> return;
>
--
Skyler Fennell
amsatnet.info
KDØWHB
electricity440 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20170228/490a11b3/attachment.html>
More information about the App_rpt-users
mailing list