Editing /etc/iax.conf by accident

I edited /etc/iax.conf by accident since I missed the header.
I erased everything I did.

  1. Did I break FreePBX?

  2. I keep getting this error in the logs:
    chan_iax2.c: Call rejected, CallToken Support required. If unexpected, resolve by placing address 127.0.0.1 in the calltokenignore list or setting user iaxmodem requirecalltoken=no

How do I fix it?

You did not mention what version of FreePBX.

Assuming it is something later than 2.6 add the calltokenoptional and requirecalltoken variables via the IAX config module in FreePBX.

FreePBX 2.9.0.9 is my version.

Can you tell me what values to set these variables to?
As well, where is the IAX config module?

–Mohit

Mohit, Google is your friend. If you had Googled it (like I had to since I don’t know the answer by memory) you would have found the following:

calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382

FreePBX/IAX Settings

Add additional settings at the bottom of the page.

I tried what you suggested and I still get the error message in the log…
I am googling and trying to find alternative solutions but am unsuccessful.
Any other ideas?

You must not have put the variables in correctly.

Please post the contents of /etc/asterisk/iax.conf, iax_general_additional.conf and the output of ‘iax show settings’

Please use the [code]tags[/code] so your text formats correctly when you post.

Thanks

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 (C) 2004 Coalescent Systems Inc (Canada)
; Copyright (C) 2006 Why Pay More 4 Less Pty Ltd (Australia)
; Copyright (C) 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


iax_general_additional.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       ;
;--------------------------------------------------------------------------------;
;

disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes
tos=ef

iax show settings–this command fails in the CLI. There are no other similar commands.

It seems no modem is registered:

Host                  dnsmgr  Username    Perceived             Refresh  State
0 IAX2 registrations.

AS well according to the documentation I found I need to add this to extensions.conf

[fax-out]
exten => _X.,1,Dial(SIP/123456/${EXTEN})

I have put the following in extensions_overide_pbx.conf

[fax-out]
exten => _X.,1,Dial(SIP/123456/${EXTEN})

Thanks for using the code tags. You are right you can’t see the IAX settings only SIP.

It doesn’t matter because the calltokenoption or maxcalls statements are net in the iax_general_additional so you must not have added them in the iax settings module.

Hi,

After I added those variables I do seem them in the command console when it is reloaded.
Could they be stored somewhere else?
They are not in /etc/asterisk/ files because I grepped for the variabled and did not see them anywhere…

What is a command console?

FreePBX writes the IAX settings to iax_general_additional.conf

Can you send a screenshot of what you have done in the IAX settings page?

I see no option to append a file.
How do I do that?

You have to upload the pic to one of picture posting sites then use the BBCode Image tag to post it in the message. See “input format” below the box you type your text into.

These are the settings that you need.

calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382

Not sure where you got the requirecalltoken from, I don’t even think it is a keyword.

I get the same problem in the logs:

ERROR[20403] chan_iax2.c: Call rejected, CallToken Support required. If unexpected, resolve by placing address 127.0.0.1 in the calltokenignore list or setting user iaxmodem requirecalltoken=no

You think the asterisk server might be broken?

No I think you are setting something wrong. Until I see those settings in your screen shot and in iax_general_additional.conf

You must be making a simple mistake.