Incoming connections - one way audio

I had been getting reports that other nodes connecting to my node would see rx activity indication, but would not hear any audio from my node. I could hear audio from their node.

Upon troubleshooting, I noticed that their inbound connection would request ULAW, and my node would accept that request, however, my node would respond back by using SLIN for the return connection, even though SLIN was not in their request:

Accepting UNAUTHENTICATED call from 173.54.166.23:4569:
-- > requested format = ulaw,
-- > requested prefs = (ulaw|ilbc|speex16|gsm),
-- > actual format = ulaw,
-- > host prefs = (ulaw|adpcm|g722|g726aal2|gsm|ilbc),
-- > priority = mine

Disabling SLIN in the incoming section of the iax.conf file, this would still occur.
Once I disabled SLIN in the outgoing connections section of the iax.conf file, they were able to succesfully connect and have audio in both directions. However, this now precludes me from using SLIN when connecting outbound to other nodes. It appears the codec rules for outgoing connections is being applied to incoming connection requests.

Shouldn't the connection request be properly answered with one of the requested codec, regardless of how I have my incoming and outgoing connection rules set?

Does the "PRIORITY =MINE" in the connection request handshake have something to do with that? Can that be changed to use the incoming node's priority? Is that controlled by the "codecpriority = host" line in the incoming connection radio section? If so, do I comment it out, or change the = to user or something similar?

Maybe I have something in my iax.conf file set incorrectly?

Here it is for reference:

; Inter-Asterisk eXchange driver definition

[general]
; !!! IAX registration will be discontinued at some point !!!
; Setup rpt_http_registartions.conf instead.
; remove the leading ";"
;register => 1999:12345@register.allstarlink.org ; This must be changed to your node number, password
register => 616530:Password@register.allstarlink.org

bindport = 4569 ; bindport and bindaddr may be specified

; NOTE: bindport must be specified BEFORE
; bindaddr or may be specified on a specific
; bindaddr if followed by colon and port
; (e.g. bindaddr=192.168.0.1:4569)

; bindaddr = 192.168.0.1 ; more than once to bind to multiple
; addresses, but the first will be the
; default

disallow = all ; The permitted codecs for outgoing connections
;Audio Quality Bandwidth
;allow = ulaw ; best 87 kbps
;allow = adpcm ; good 55 kbps
;allow = gsm ; medicore 36 kbps
allow = slin16
allow = slin
allow = ulaw
allow = adpcm
allow = g722
allow = g726aal2
allow = gsm
allow = ilbc

jitterbuffer = yes
forcejitterbuffer = yes
dropcount = 2
maxjitterbuffer = 4000
maxjitterinterps = 10
resyncthreshold = 1000
maxexcessbuffer = 80
minexcessbuffer = 10
jittershrinkrate = 1
tos = 0x1E
autokill = yes
delayreject = yes
; iaxthreadcount = 30
; iaxmaxthreadcount = 150

; Incoming radio connections

[radio]
type = user
disallow = all
allow = slin16
allow = slin
allow = ulaw
allow = adpcm
allow = g722
allow = g726aal2
allow = gsm
allow = ilbc
codecpriority = host
context = radio-secure
transfer = no

[iaxrpt] ; Connect from iaxrpt Username field (PC AllStar Client)
type = user ; Notice type is user here <---------------
context = iaxrpt ; Context to jump to in extensions.conf
auth = md5
secret = Password
host = dynamic
disallow = all
allow = slin
allow = ulaw
allow = adpcm
allow = gsm
transfer = no

[phone-iaxrpt]
type = friend
context = phone-iaxrpt
auth = md5
secret = Password
host = dynamic
disallow = all
allow = slin
allow = ulaw
allow = adpcm
allow = gsm
transfer = no

[iaxclient] ; Connect from iax client (Zoiper...)
type = friend ; Notice type here is friend <--------------
context = iax-client ; Context to jump to in extensions.conf
auth = md5
secret = Your_Secret_Password_Here
host = dynamic
disallow = all
allow = slin
allow = ulaw
allow = adpcm
allow = gsm
transfer = no

[allstar-sys]
type = user
context = allstar-sys
auth = rsa
inkeys = allstar
disallow = all
allow = slin
allow = ulaw
allow = adpcm
allow = gsm

[allstar-public]
type = user
context = allstar-public
auth = md5
secret = allstar
;calltokenoptional=0.0.0.0/0.0.0.0
requirecalltoken=no
disallow = all
allow = slin
allow = ulaw
allow = adpcm
allow = gsm

; The following should be un-commented to support Allstar Autopatch service
; [allstar-autopatch]
; type = peer
; host = register.allstarlink.org
; username =
; secret =
; auth = md5
; disallow = all
; allow = ulaw
; transfer = no

#tryinclude custom/iax.conf

Eric
K2CB

Not entirely sure what to make of that.

This is a normal handshake. And you both are using ulaw.
But I don't see that

This has NO host preference to slin.
If you force a codec the other party does not have, they will hear nothing I suppose.
But I thought the connection would drop at that point during handshake . Maybe not?

I might suggest you remove all those codec settings in individual stanzas and put one set in the [general] section that will apply to all.
Unless you have good reason for setting one stanza differently. Then only that stanza.

And check modules.conf to be sure all the codecs you are wanting to use are loading.

I never quite understood why you would want to use anything outside of ulaw unless you were in a low bandwidth situation. gsm works for that.

And I'm not quite sure what happens if you are using say iaxrpt and forcing slin while everything else is using ulaw. Some transcoding I guess. Have to be some extra headroom in doing that.

Quite a bit to think through. But, while I forget most of the specifics, you might want to read on the codec handshake in the current asterisk manual. Something may have changed when we bumped up many versions. I have had no reason to look again since asterisk 9.
We are on v20.
Perhaps that gets you somewhere.

have you run an apt update and apt upgrade lately?

Yes. Once I re-enabled SLIN in the list of outgoing codecs, certain HamVOIP nodes can no longer receive audio when connecting to my node. I am going to do some more testing with them in the next day or two, and capture the handshaking via the CLI. Hopefully it will shed some light as to the issue.

Eric
K2CB

Well, I can't speak to if hamvoip has altered the asterisk handshake process.
But the intended process is printed in the asterisk manual.

I seem to remember a similar issue with hamvoip some time ago, before asl3.
You might look back in the forum for it but that may be difficult as folks title their posts poorly.

My only advice to to KISS it.- Keep It Simple Stupid.
Choose only a few codecs, with ulaw and gsm included, perhaps 2 others.
And make sure they are all enabled in modules.conf.
Sorry, no better help on this.