[App_rpt-users] Codec Negotiation

David McGough kb4fxc at inttek.net
Fri Feb 9 14:38:51 UTC 2018


Will,

iLBC and g729 probably sound best over highly "jittery" mobile networks.

Note that the hamvoip iLBC implementation is patched to use 20msec frames, 
NOT 30msec frames, which are the default in Asterisk. You *MUST* use 
20msec frames with AllStar!

My patches for Asterisk to add iLBC and use 20msec frames were published 
years ago. If interested, here is the link: 
https://hamvoip.org/downloads/patch-kit-with-ilbc.tgz


And, here are example iax.conf stanzas, which only allow a specific CODEC:



[radio-ulaw]
type=user
disallow=all
allow=ulaw
codecpriority=host
context=radio-secure
transfer=no

[radio-g726]
type=user
disallow=all
allow=g726aal2
codecpriority=host
context=radio-secure
transfer=no

[radio-g729]
type=user
disallow=all
allow=g729
codecpriority=host
context=radio-secure
transfer=no

[radio-ilbc]
type=user
disallow=all
allow=ilbc
codecpriority=host
context=radio-secure
transfer=no


....For your setups, take a look at the CODEC definitions in the [radio] 
stanza. Also, you can have multiple stanzas (like above), and force 
various nodes to connect with a specific CODEC, etc. I run this style 
setup on all my systems.


73, David KB4FXC


On Thu, 8 Feb 2018, Will Bashlor wrote:

> Hi List,
> 
> Ok, so I have a portable node and it works great at home but on the road
> using my iPhone hotspot with Verizon it's quite jittery and doesn't sound
> very good, even when I have 2 or 3 bars. I can connect to the same node
> using echolink and it works fine even with 1 to 2 bars.
> 
> I'm using the hamvoip image without any codec changes and I notice it
> connects to our local repeater hamvoip node with g726aal2 which makes sense
> because  g726aal2 is first in [general] which I believe controls outbound
> connections.
> 
> So I wanted to see what I sounded like so I connected to 40894 so I could
> hear my own voice. It connected using ulaw for some reason. The only way I
> could get it to change was to comment out the codecs I didn't want to use
> in [general]. Apparently it doesn't negotiate how I think it does.
> 
> On ulaw and  g726aal2 it sounded pretty terrible. gsm was better but it was
> still broken up. I wanted to try ilbc but codec negotiation failed which
> I'm sure means that 40894 doesn't allow ilbc.
> 
> I then connected successfully to our local repeater node with ilbc and it
> sounded just fine, even with one bar, but I need to test more...
> 
> Is this anyone else's experience with using hotspots?
> 
> I've modified the codec under [genera] to the below, which the way I
> understand is for outgoing connections. And the codec order is the order of
> attempted negotiation. I ordered them on my portable node in order of least
> bandwidth to greatest.
> 
> So with that said, when I connect to my local node, which allows ilbc, why
> does it negotiate to g726aal2?
> 
> And how can I setup iax.conf so it always connects using the lowest
> bandwidth codec that the other side allows?
> 
> allow=ilbc
> allow=gsm
> allow=g726aal2
> allow=ulaw
> 
> 73,
> 
> Will, KE4IAJ
> 




More information about the App_rpt-users mailing list