Hi, I've just had to enable the requirecalltoken=no option in iax.conf for one of my IAX2 trunks, and I don't think it works properly in the realtime version. I've created the requirecalltoken field in my (Postgres via ODBC) database, type text, and have variously tried it with 'yes', 'no' and 'auto' in the field. But the setting never seems to be used and thus calls fail down the trunk. If I try the same thing using iax.conf flat file, the requirecalltoken parameter works fine, so I was wondering if anyone else has seen this and wonder if I've tripped over a bug? All this was tested using 1.6.1 SVN, r216266. Gary H -- Gary Hawkins MBCS <gary.hawkins at garyhawkins.me.uk> OpenPGP Key ID: 0x9A1037BB Web: http://www.garyhawkins.me.uk
On Friday 04 September 2009 12:08:26 Gary Hawkins wrote:> I've just had to enable the requirecalltoken=no option in iax.conf for > one of my IAX2 trunks, and I don't think it works properly in the > realtime version. I've created the requirecalltoken field in my > (Postgres via ODBC) database, type text, and have variously tried it > with 'yes', 'no' and 'auto' in the field. But the setting never seems > to be used and thus calls fail down the trunk. > > If I try the same thing using iax.conf flat file, the requirecalltoken > parameter works fine, so I was wondering if anyone else has seen this > and wonder if I've tripped over a bug?Please try the attached patch. -- Tilghman & Teryl with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies) and Harry, BB, & George (dogs) -------------- next part -------------- Index: channels/chan_iax2.c ==================================================================--- channels/chan_iax2.c (revision 216548) +++ channels/chan_iax2.c (working copy) @@ -1894,8 +1894,10 @@ /* ----- Case 2 ----- */ if ((subclass == IAX_COMMAND_NEW) && (user = find_user(find))) { calltoken_required = user->calltoken_required; - } else if ((subclass != IAX_COMMAND_NEW) && (peer = find_peer(find, 1))) { + } else if ((subclass != IAX_COMMAND_NEW) && (peer = find_peer(find, 0))) { calltoken_required = peer->calltoken_required; + } else if ((subclass != IAX_COMMAND_NEW) && (peer = realtime_peer(find, sin))) { + calltoken_required = peer->calltoken_required; } if (peer) {
herb at cfht.hawaii.edu
2009-Sep-17 21:13 UTC
[asterisk-users] requirecalltoken and Realtime
Aloha, I too am running into a similar problem. I have version 1.6.1.5 that works fine, however 1.6.1.6 does not. I have both requirecalltoken=no & calltokenignore=xxx.xxx.xxx.xxx in iax.conf, but I am still getting this error message. [Sep 17 09:54:23] ERROR[32335]: chan_iax2.c:4529 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address xxx.xxx.xxx.xxx in the calltokenignore list or setting user (null) requirecalltoken=no Thanks in advance!