IAX2 Registering but failing on codecs

Hi
I have a PBX for a small number of users. They wish to use softphones from their PC’s/smartphones but although I can get the accounts to register I get an error stating “Can’t match codec in IAX Call (16)”. I have googled but no joy…

I have checked logs and can see the codecs etc seem ok. I have specified a single codec both on the pbx and on the softphone and it still drops the call with the error as soon as it connects.

Can anyone help?

Thanks

Well this seems like you have mismatch between the allowed codecs on your softphones and your PBX.
Could you post your iax.conf as well as one of your softphones config?

Thanks for taking a look de_facto, I don’t think this is the case as I have specified ulaw, alaw and gsm in iax settings in freepbx GUI and the same in Zoiper client, I have also tried with single codecs in both but get the same error. In the log events I am seeing that the client attempts to connect by eg ulaw and that the host preference is ulaw but still get the error - sometimes it seems to match and other times it does not (as per example below from logs);

requested format = ulaw,
requested prefs = (),
actual format = gsm,
host prefs = (ulaw|alaw|slin|gsm),
priority = mine

I have included my iax.conf below, cannot get a settings page from my zoiper clients I’m afraid.

iax.conf;
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
; This file is part of FreePBX.
;
; FreePBX is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 2 of the License, or
; (at your option) any later version.
;
; FreePBX is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with FreePBX. If not, see http://www.gnu.org/licenses/.
;
; Copyright © 2004 Coalescent Systems Inc (Canada)
; Copyright © 2006 Why Pay More 4 Less Pty Ltd (Australia)
; Copyright © 2007 Astrogen LLC (USA)

[general]

; These will all be included in the [general] context
#include iax_general_additional.conf
#include iax_general_custom.conf
#include iax_registrations_custom.conf
#include iax_registrations.conf

; These should all be expected to come after the [general] context
;
;iax_custom.conf is the proper place to start creating new contexts that you
;might have a need for. Dundi IAX trunks is one example of when this file is needed.
;
#include iax_custom.conf
#include iax_additional.conf
;
;iax_custom_post.conf will allow you to modify FreePBX generated IAX setups so
;that you can add additional parameters to a auto-generated setup.
;if you have a auto-generated context of [foobar] and need to add a parameter
;to it then create this line foobar and place your additions on the next line
;
#include iax_custom_post.conf

Any further assistance you can give I would be grateful. To be honest, as I have several other PBX’s working for this without issue I am considering a rebuild of the PBX, but woud love to fix it and understand the cause of the issue in case it crops up again in the future.

Regards

Dave

It is best to get support for GUIs from the provider of the GUI, but when someone asks for your iax.conf here they assume that you wrote it yourself and it doesn’t include other files. If there are other files, you need to provide all those included to any depth.

My apologies, I am not an expert and do indeed use the freepbx GUI.

I am as satisfied as I can be that it is not a simple mismatch of codec availability. I’ll maybe try the rebuild options and see how I get on, although in the meantime if anyone has any further thoughts they would be gratefully appreciated.

Regards

Dave

As david said, when there are included files you should post them all since this config doesn’t really give any info which could help resolving the issue. You say that sometimes codecs seem to match, does that mean that you could complete a call in some cases? If so what are those cases (e.g. only internal/external calls are completing) ? What is the freepbx version? If possible could you provide a full trace of a call that doesn’t complete?