[App_rpt-users] Better Telemetry!!!
Skyler F
electricity440 at gmail.com
Wed Mar 1 06:30:26 UTC 2017
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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20170228/74c116e5/attachment.html>
More information about the App_rpt-users
mailing list