Yes,
G726 is enabled:
node616535CLI> module show like codec
Module Description Use Count Status Support Level
codec_a_mu.so A-law and Mulaw direct Coder/Decoder 0 Running core
codec_adpcm.so Adaptive Differential PCM Coder/Decoder 0 Running core
codec_alaw.so A-law Coder/Decoder 0 Running core
codec_dahdi.so Generic DAHDI Transcoder Codec Translato 0 Running core
codec_g722.so ITU G.722-64kbps G722 Transcoder 0 Running core
codec_g726.so ITU G.726-32kbps G726 Transcoder 0 Running core
codec_gsm.so GSM Coder/Decoder 0 Running core
codec_resample.so SLIN Resampling Codec 0 Running core
codec_ulaw.so mu-Law Coder/Decoder 16 Running core
9 modules loaded
node616535CLI>
If I am logged into the destination node (668170) and watch in CLI, it appears to be negotiating to ulaw. Interestingly, if you look at the calling (616535) node's requested prefs, you will see ulaw at the beginning of the negotiation line, but in the actual iax.cong file of the calling node (616535), you will see that G726 is placed above ulaw.
node668170CLI>
-- Hungup 'IAX2/98.221.146.29:4574-2120'
-- Hungup 'DAHDI/pseudo-2076025456'
-- Accepting UNAUTHENTICATED call from 98.221.146.29:4574:
-- > requested format = ulaw,
-- > requested prefs = (ulaw|g726aal2|adpcm|g722|gsm|ilbc),
-- > actual format = ulaw,
-- > host prefs = (ulaw|adpcm|g722|g726aal2|gsm|ilbc),
-- > priority = caller
-- Executing [668170@radio-secure:1] Set("IAX2/98.221.146.29:4574-12360", "NODENUM=616535") in new stack
-- Executing [668170@radio-secure:2] NoOp("IAX2/98.221.146.29:4574-12360", "Connect from node: 616535") in new stack
-- Executing [668170@radio-secure:3] NoOp("IAX2/98.221.146.29:4574-12360", "Connect to: 668170") in new stack
-- Executing [668170@radio-secure:4] NoOp("IAX2/98.221.146.29:4574-12360", "Channel type: IAX2") in new stack
-- Executing [668170@radio-secure:5] GotoIf("IAX2/98.221.146.29:4574-12360", "1?:allowlist") in new stack
-- Executing [668170@radio-secure:6] NoOp("IAX2/98.221.146.29:4574-12360", "Channel Peer IP: 98.221.146.29") in new stack
-- Executing [668170@radio-secure:7] GotoIf("IAX2/98.221.146.29:4574-12360", "0?connect") in new stack
-- Executing [668170@radio-secure:8] GotoIf("IAX2/98.221.146.29:4574-12360", "1?denylist") in new stack
-- Goto (radio-secure,668170,12)
-- Executing [668170@radio-secure:12] GotoIf("IAX2/98.221.146.29:4574-12360", "0?:connect") in new stack
-- Goto (radio-secure,668170,15)
-- Executing [668170@radio-secure:15] Rpt("IAX2/98.221.146.29:4574-12360", "668170") in new stack
== Spawn extension (radio-secure, 668170, 15) exited non-zero on 'Surrogate/IAX2/98.221.146.29:4574-12360'
node668170CLI>
IAX.CONF (616535):
; 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 ; mediocre 36 kbps
;allow = slin16
;allow = slin
allow = g726aal2
allow = ulaw
allow = adpcm
allow = g722
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 = g726aal2
allow = ulaw
allow = adpcm
allow = g722
allow = gsm
allow = ilbc
codecpriority = caller
context = radio-secure
transfer = no
I then went so far as to change the incoming priority for node 668170 to put G726 at the top of the list:
; Incoming radio connections
[radio]
type = user
disallow = all
;allow = slin16
;allow = slin
allow = g726aal2
allow = ulaw
allow = adpcm
allow = g722
allow = gsm
allow = ilbc
codecpriority = caller
context = radio-secure
transfer = no
It still negotiates to ulaw:
node668170CLI>
-- Hungup 'IAX2/98.221.146.29:4574-11758'
-- Hungup 'DAHDI/pseudo-677372540'
-- Accepting UNAUTHENTICATED call from 98.221.146.29:4574:
-- > requested format = ulaw,
-- > requested prefs = (ulaw|g726aal2|adpcm|g722|gsm|ilbc),
-- > actual format = ulaw,
-- > host prefs = (g726aal2|ulaw|adpcm|g722|gsm|ilbc),
-- > priority = caller
-- Executing [668170@radio-secure:1] Set("IAX2/98.221.146.29:4574-2031", "NODENUM=616535") in new stack
-- Executing [668170@radio-secure:2] NoOp("IAX2/98.221.146.29:4574-2031", "Connect from node: 616535") in new stack
-- Executing [668170@radio-secure:3] NoOp("IAX2/98.221.146.29:4574-2031", "Connect to: 668170") in new stack
-- Executing [668170@radio-secure:4] NoOp("IAX2/98.221.146.29:4574-2031", "Channel type: IAX2") in new stack
-- Executing [668170@radio-secure:5] GotoIf("IAX2/98.221.146.29:4574-2031", "1?:allowlist") in new stack
-- Executing [668170@radio-secure:6] NoOp("IAX2/98.221.146.29:4574-2031", "Channel Peer IP: 98.221.146.29") in new stack
-- Executing [668170@radio-secure:7] GotoIf("IAX2/98.221.146.29:4574-2031", "0?connect") in new stack
-- Executing [668170@radio-secure:8] GotoIf("IAX2/98.221.146.29:4574-2031", "1?denylist") in new stack
-- Goto (radio-secure,668170,12)
-- Executing [668170@radio-secure:12] GotoIf("IAX2/98.221.146.29:4574-2031", "0?:connect") in new stack
-- Goto (radio-secure,668170,15)
-- Executing [668170@radio-secure:15] Rpt("IAX2/98.221.146.29:4574-2031", "668170") in new stack
== Spawn extension (radio-secure, 668170, 15) exited non-zero on 'Surrogate/IAX2/98.221.146.29:4574-2031'
node668170CLI>
If I re-enable SLIN, which I have at the top of the list of the calling node, but second in the list in the host node, it negotiates to SLIN just fine:
ode668170CLI>
-- Accepting UNAUTHENTICATED call from 98.221.146.29:4574:
-- > requested format = slin,
-- > requested prefs = (slin|g726aal2|ulaw|adpcm|g722|gsm|ilbc),
-- > actual format = slin,
-- > host prefs = (g726aal2|slin|ulaw|adpcm|g722|gsm|ilbc),
-- > priority = caller
-- Executing [668170@radio-secure:1] Set("IAX2/98.221.146.29:4574-11019", "NODENUM=616535") in new stack
-- Executing [668170@radio-secure:2] NoOp("IAX2/98.221.146.29:4574-11019", "Connect from node: 616535") in new stack
-- Executing [668170@radio-secure:3] NoOp("IAX2/98.221.146.29:4574-11019", "Connect to: 668170") in new stack
-- Executing [668170@radio-secure:4] NoOp("IAX2/98.221.146.29:4574-11019", "Channel type: IAX2") in new stack
-- Executing [668170@radio-secure:5] GotoIf("IAX2/98.221.146.29:4574-11019", "1?:allowlist") in new stack
-- Executing [668170@radio-secure:6] NoOp("IAX2/98.221.146.29:4574-11019", "Channel Peer IP: 98.221.146.29") in new stack
-- Executing [668170@radio-secure:7] GotoIf("IAX2/98.221.146.29:4574-11019", "0?connect") in new stack
-- Executing [668170@radio-secure:8] GotoIf("IAX2/98.221.146.29:4574-11019", "1?denylist") in new stack
-- Goto (radio-secure,668170,12)
-- Executing [668170@radio-secure:12] GotoIf("IAX2/98.221.146.29:4574-11019", "0?:connect") in new stack
-- Goto (radio-secure,668170,15)
-- Executing [668170@radio-secure:15] Rpt("IAX2/98.221.146.29:4574-11019", "668170") in new stack
== Spawn extension (radio-secure, 668170, 15) exited non-zero on 'Surrogate/IAX2/98.221.146.29:4574-11019'
node668170CLI>
One more example:
if the outgoing node stanza is:
;Audio Quality Bandwidth
;allow = ulaw ; best 87 kbps
;allow = adpcm ; good 55 kbps
;allow = gsm ; mediocre 36 kbps
;allow = slin16
allow = g726aal2
;allow = slin
allow = ulaw
allow = adpcm
allow = g722
allow = gsm
allow = ilbc
the requested shown is:
Accepting UNAUTHENTICATED call from 98.221.146.29:4574:
-- > requested format = ulaw,
-- > requested prefs = (ulaw|g726aal2|adpcm|g722|gsm|ilbc),
-- > actual format = ulaw,
-- > host prefs = (g726aal2|slin|ulaw|adpcm|g722|gsm|ilbc),
-- > priority = caller
if the outgoing stanza is:
disallow = all ; The permitted codecs for outgoing connections
;Audio Quality Bandwidth
;allow = ulaw ; best 87 kbps
;allow = adpcm ; good 55 kbps
;allow = gsm ; mediocre 36 kbps
;allow = slin16
allow = g726aal2
allow = slin
allow = ulaw
allow = adpcm
allow = g722
allow = gsm
allow = ilbc
the requested shown is:
Hungup 'DAHDI/pseudo-1383343994'
-- Accepting UNAUTHENTICATED call from 98.221.146.29:4574:
-- > requested format = slin,
-- > requested prefs = (slin|g726aal2|ulaw|adpcm|g722|gsm|ilbc),
-- > actual format = slin,
-- > host prefs = (g726aal2|slin|ulaw|adpcm|g722|gsm|ilbc),
-- > priority = caller
It appears that the order specified in iax.conf is not being fully followed by app-rpt (I am guessing, not sure exactly) during the handshaking/negotiation process.
Eric
K2CB