# Better Telemetry!!!

**URL:** <https://community.allstarlink.org/t/better-telemetry/13089>\
**Category:** AllStarLink\
**Created:** [March 1, 2017, 6:30am UTC](https://community.allstarlink.org/t/better-telemetry/13089 "2017-03-01T06:30:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Electricity440](https://community.allstarlink.org/user_avatar/community.allstarlink.org/electricity440/32/1474_2.png) [@Electricity440](https://community.allstarlink.org/u/Electricity440)\
**Post date:** [March 1, 2017, 6:30am UTC](https://community.allstarlink.org/t/better-telemetry/13089/1 "2017-03-01T06:30:26Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![Electricity440](https://community.allstarlink.org/user_avatar/community.allstarlink.org/electricity440/32/1474_2.png) [@Electricity440](https://community.allstarlink.org/u/Electricity440)\
**Post date:** [March 1, 2017, 6:34am UTC](https://community.allstarlink.org/t/better-telemetry/13089/2 "2017-03-01T06:34:03Z")

</div>

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@gmail.com](mailto:electricity440@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:
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > Replace That chunk of code with :
> 
> > 
> 
> > 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;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](http://amsatnet.info)
> 
> KDØWHB
> 
> [electricity440@gmail.com](mailto:electricity440@gmail.com)

---

<div class="post-metadata">

**Author:** ![Benjamin\_Naber](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/b/cdc98d/32.png) [@Benjamin\_Naber](https://community.allstarlink.org/u/Benjamin_Naber)\
**Post date:** [March 7, 2017, 12:52am UTC](https://community.allstarlink.org/t/better-telemetry/13089/3 "2017-03-07T00:52:40Z")

</div>

While reading an email from another VoIP email reflector, I got to thinking about some of the codecs we use.

Perusing through the iax.conf through a few allstar network linking distros, each seem to have their own preferred set of codecs.

I'm rather disturbed that iLBC and speex remains in any of them, while I'm sure for compatibility of older installations. However, low quality bandwidth codes sounds no better than echo-stink. This is one of the reason why we use Allstarlink, for better audio quality, is it not?

As I connect to different allstar nodes throughout the world, more-so in the US, some are using iLBC or gsm... and a majority are hub nodes. This to me, is unacceptable, and appears the codec being used are whatever the allstar box has been packaged with.

So, given than I'm not a Steve Henke or Steve Zingman, but I want to ensure that I'm doing my part to achieve high fidelity through g711 codec and proper URI \<-\> radio hardware interfacing techniques.

Which stanza in the iax.conf is for out-going connections?

I was under the impression [radio-proxy] was, however, when a node with:  
disallow=all  
allow=ulaw  
allow=g726aal2  
allow=gsm

connects to my node which has the \*same\* key=value pairs under [radio] stanza, I got the message something along the lines of:

connected: IP  
codes available: g726aal2/gsm  
host codecs available: ulaw|g726aal2|gsm|ilbc  
actual codec: g726aal  
...

bost sides do not have ilbc \*anywhere\*. The codec has been removed/deleted. Why does it still show up?

What is the ultimate deciding factor of which codec is used if both side have codecpriority=mine?

~Benjamin, KB9LFZ

---

<div class="post-metadata">

**Author:** ![tsawyer](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tsawyer](https://community.allstarlink.org/u/tsawyer)\
**Post date:** [March 7, 2017, 4:36am UTC](https://community.allstarlink.org/t/better-telemetry/13089/4 "2017-03-07T04:36:38Z")

</div>

I believe the receive side of the connection determines the codec. You can’t force it on the other end.

Do you have a [radio] stanza in one of your node? Maybe that’s where iLBC is.

> **···**
>
> On Mon, Mar 6, 2017 at 4:52 PM, Benjamin L. Naber [benjamin@project23d.com](mailto:benjamin@project23d.com) wrote:
> 
> > While reading an email from another VoIP email reflector, I got to thinking about some of the codecs we use.
> > 
> > Perusing through the iax.conf through a few allstar network linking distros, each seem to have their own preferred set of codecs.
> > 
> > I’m rather disturbed that iLBC and speex remains in any of them, while I’m sure for compatibility of older installations. However, low quality bandwidth codes sounds no better than echo-stink. This is one of the reason why we use Allstarlink, for better audio quality, is it not?
> > 
> > As I connect to different allstar nodes throughout the world, more-so in the US, some are using iLBC or gsm… and a majority are hub nodes. This to me, is unacceptable, and appears the codec being used are whatever the allstar box has been packaged with.
> > 
> > So, given than I’m not a Steve Henke or Steve Zingman, but I want to ensure that I’m doing my part to achieve high fidelity through g711 codec and proper URI ↔ radio hardware interfacing techniques.
> > 
> > Which stanza in the iax.conf is for out-going connections?
> > 
> > I was under the impression [radio-proxy] was, however, when a node with:
> > 
> > disallow=all
> > 
> > allow=ulaw
> > 
> > allow=g726aal2
> > 
> > allow=gsm
> > 
> > connects to my node which has the _same_ key=value pairs under [radio] stanza, I got the message something along the lines of:
> > 
> > connected: IP
> > 
> > codes available: g726aal2/gsm
> > 
> > host codecs available: ulaw|g726aal2|gsm|ilbc
> > 
> > actual codec: g726aal
> > 
> > …
> > 
> > bost sides do not have ilbc _anywhere_. The codec has been removed/deleted. Why does it still show up?
> > 
> > What is the ultimate deciding factor of which codec is used if both side have codecpriority=mine?
> > 
> > ~Benjamin, KB9LFZ
> > 
> > * * *
> > 
> > App\_rpt-users mailing list
> > 
> > [App\_rpt-users@lists.allstarlink.org](mailto:App_rpt-users@lists.allstarlink.org)
> > 
> > [http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app\_rpt-users](http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users)
> > 
> > To unsubscribe from this list please visit [http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app\_rpt-users](http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users) and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”
> > 
> > You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.
> 
> –
> 
> –
> 
> Tim

---

<div class="post-metadata">

**Author:** ![Shulerburton](https://community.allstarlink.org/user_avatar/community.allstarlink.org/shulerburton/32/5006_2.png) [@Shulerburton](https://community.allstarlink.org/u/Shulerburton)\
**Post date:** [March 7, 2017, 6:19am UTC](https://community.allstarlink.org/t/better-telemetry/13089/5 "2017-03-07T06:19:49Z")

</div>

That’s correct in asterisk world you give a group of codecs that you would like to use but your connection is a negotiation of what the other end is using… you can prioritize but can’t choose one.

Shuler Burton

> **···**
>
> On Mar 6, 2017, at 11:36 PM, Tim Sawyer [tisawyer@gmail.com](mailto:tisawyer@gmail.com) wrote:
> 
> > Allstarlink

---

<div class="post-metadata">

**Author:** ![TK1BI](https://community.allstarlink.org/user_avatar/community.allstarlink.org/tk1bi/32/3512_2.png) [@TK1BI](https://community.allstarlink.org/u/TK1BI)\
**Post date:** [March 7, 2017, 10:22am UTC](https://community.allstarlink.org/t/better-telemetry/13089/6 "2017-03-07T10:22:06Z")

</div>

Not necessarly. This depends on available bandwidth 😉

We have distributed repeaters and a central hub. We're using high quality / high bandwidth for interlinks between repeaters and the hub. But the hub also accepts IAX2 connections from 3G/mobile users (using softphones such as Zoiper). When mobile network is poor, or when driving, using low-bandwidth codecs such as iLBC or Speex does have a sense. Codec can be choosen by users on the client side.

> **···**
>
> Le 07/03/2017 à 01:52, Benjamin L. Naber a écrit :
> 
> > I'm rather disturbed that iLBC and speex remains in any of them, while I'm sure for compatibility of older installations. However, low quality bandwidth codes sounds no better than echo-stink. This is one of the reason why we use Allstarlink, for better audio quality, is it not?
