[Home]

Summary:ASTERISK-16199: requirecalltoken does not work with Realtime
Reporter:Mindaugas Kezys (mkezys)Labels:
Date Opened:2010-06-03 07:44:29Date Closed:2010-06-03 08:22:24
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have field requirecalltoken=no set in database and in iax2.conf globally.

But calls over IAX2 are not possible.




****** ADDITIONAL INFORMATION ******

[Jun  3 15:36:03] ERROR[15437]: chan_iax2.c:4323 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 192.168.0.148 in the calltokenoptional list or setting user 101 requirecalltoken=no

localhost*CLI> iax2 show peer 101


 * Name       : 101
 Secret       : <Set>
 Context      : mor_local
 Mailbox      :
 Dynamic      : Yes
 Callnum limit: 0
 Calltoken req: No
 Trunk        : No
 Callerid     : "" <9999999>
 Expire       : -1
 ACL          : Yes
 Addr->IP     : 192.168.0.148 Port 4569
 Defaddr->IP  : 0.0.0.0 Port 4569
 Username     : 101
 Codecs       : 0x3f1fff (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|ilbc|g726aal2|g722|jpeg|png|h261|h263|h263p|h264)
 Codec Order  : (none)
 Status       : UNKNOWN
 Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

--------

In order to make IAX2 work over Realtime with Asterisk 1.4.33-rc1 I had to apply such patch which disables requirecalltoken functionality at all:

--- chan_iax2.c_orig    2010-03-03 20:02:27.000000000 +0200
+++ chan_iax2.c 2010-06-03 15:40:42.000000000 +0300
@@ -1866,6 +1866,9 @@                                                                                                                                                                    if (option_debug) {
       ast_log(LOG_DEBUG, "Determining if address %s with username %s requires calltoken validation.  Optional = %d  calltoken_required = %d \n", ast_inet_ntoa(sin->sin_addr),
name, optional, calltoken_required);
       }
+
+       calltoken_required = CALLTOKEN_NO;
+
       if (((calltoken_required == CALLTOKEN_NO) || (calltoken_required == CALLTOKEN_AUTO)) ||
               (optional && (calltoken_required == CALLTOKEN_DEFAULT))) {
               res = 0;
Comments:By: Paul Belanger (pabelanger) 2010-06-03 08:22:24

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. Thanks!