Because this problem is due to the dynamic string allocation, it would be difficult to reproduce the exact same error. Hopefully what's in this file will be enough to demonstrate the cause and solution. As mentioned in the issue report, there were a number of problems encountered, and they varied depending on the configuration and sequence of events. For the purpose of explanation, only one problem will be focused on here. The scenario is dialing in from a normal telco provider, through an IAX service provider. In iax.conf, the provider is registered, and also has a declaration which includes the following (the order of the lines is significant): type=user context=jnc-incoming inkeys=jnctn The contents of the jnc-incoming context in extensions.conf is not relevant, except to confirm that it contained an extension with the exact number called as well as patterns to match any number (part of the debugging effort). In following, the called DID will be shown as 5101234567. Code line references will be corrected to remove offsets from debug statements. Code is version 1.8.2.2. running asterisk -vvvc, the console showed this (numbers changed for privacy): [Jan 23 22:25:22] NOTICE[32749]: chan_iax2.c:10906 socket_process: Rejected connect attempt from 60.127.100.30, request '15101234567@jnc-incoming' does not exist However, looking at the log file, the output is slightly different: [Jan 23 22:59:09] NOTICE[448]: chan_iax2.c:10906 socket_process: Rejected connect attempt from 66.227.100.30, request '15101234567@jnc-incoming^F' does not exist Repeated testing confirmed that the spurious ^F was consistant. Of course, in printing, "^F" is two characters, but it represents an unprintable number. From this point, a number of debugging statements were added, to trace the error backwards from the point of known error and also forwards from the point where the configuration file is read. The point at which the transition was first noted is in channels/chan_iax2.c: << Here, iaxs[callno]->context has the correct value, "jnc-incoming" Line 7663: ast_string_field_set(iaxs[callno], inkeys, user->inkeys); << Here, iaxs[callno]->context has the incorrect value "jnc-incoming^F" Clearly, setting the value for the inkeys string trampled on the context string. Since ast strings write the length in the byte before the actual string storage location, this "^F" is probably the length of inkeys. Examined at byte level for confirmation: [output_index] = decimal_value, char_value [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [0] = 106 , j [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [1] = 110 , n [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [2] = 99 , c [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [3] = 45 , - [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [4] = 105 , i [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [5] = 110 , n [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [6] = 99 , c [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [7] = 111 , o [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [8] = 109 , m [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [9] = 105 , i [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [10] = 110 , n [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [11] = 103 , g [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [12] = 6 , ^F [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [13] = 0 , [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [14] = 0 , [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [15] = 106 , j [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [16] = 110 , n [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [17] = 99 , c [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [18] = 116 , t [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [19] = 110 , n [Jan 27 21:43:12] WARNING[8009]: chan_iax2.c:7667 check_access: [20] = 0 , The two bytes in relative postitions 13 and 14 are allocated to contain the length of the inkey string, "jnctn" [strlen() + 1] = 6. However, the storage address (for that "field" of size ast_string_field_allocation) is being treated as relative bytes 12 and 13. Tracing further from this point, the issue is finally resolved as caused by a macro defined in utils/asterisk/stringfields.h: 00298 typedef uint16_t ast_string_field_allocation; 00299 00300 /*! 00301 \brief Macro to provide access to the allocation field that lives immediately in front of a string field 00302 \param x Pointer to the string field 00303 */ 00304 #define AST_STRING_FIELD_ALLOCATION(x) *((ast_string_field_allocation *) (x - sizeof(ast_string_field_allocation))) The problem is that the Kirkwood (and other ARM cpus) require alignment by word, half-word, or byte, depending upon the type being stored. uint16_t is a half-word, so it must be so aligned. In this situation, trying to write to the second byte of the half-word causes the value to be written into the "correct" location -- starting with the preceeding byte. Tested this hypothesis with different length strings. jnc-incomin SUCCEEDS [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [0] = 106 , j [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [1] = 110 , n [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [2] = 99 , c [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [3] = 45 , - [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [4] = 105 , i [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [5] = 110 , n [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [6] = 99 , c [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [7] = 111 , o [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [8] = 109 , m [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [9] = 105 , i [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [10] = 110 , n [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [11] = 0 , [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [12] = 6 , ^F [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [13] = 0 , [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [14] = 106 , j [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [15] = 110 , n [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [16] = 99 , c [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [17] = 116 , t [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [18] = 110 , n [Jan 24 20:41:05] WARNING[9362]: chan_iax2.c:7667 check_access: [19] = 0 , (Initial failure) jnc-incoming FAILS [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [0] = 106 , j [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [1] = 110 , n [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [2] = 99 , c [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [3] = 45 , - [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [4] = 105 , i [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [5] = 110 , n [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [6] = 99 , c [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [7] = 111 , o [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [8] = 109 , m [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [9] = 105 , i [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [10] = 110 , n [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [11] = 103 , g [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [12] = 6 , ^F [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [13] = 0 , [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [14] = 0 , [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [15] = 106 , j [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [16] = 110 , n [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [17] = 99 , c [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [18] = 116 , t [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [19] = 110 , n [Jan 27 20:43:12] WARNING[9488]: chan_iax2.c:7667 check_access: [20] = 0 , jnc-incoming1 SUCCEEDS [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [0] = 106 , j [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [1] = 110 , n [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [2] = 99 , c [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [3] = 45 , - [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [4] = 105 , i [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [5] = 110 , n [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [6] = 99 , c [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [7] = 111 , o [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [8] = 109 , m [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [9] = 105 , i [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [10] = 110 , n [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [11] = 103 , g [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [12] = 49 , 1 [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [13] = 0 , [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [14] = 6 , ^F [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [15] = 0 , [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [16] = 106 , j [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [17] = 110 , n [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [18] = 99 , c [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [19] = 116 , t [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [20] = 110 , n [Jan 27 21:44:35] WARNING[9547]: chan_iax2.c:7667 check_access: [21] = 0 , jnc-incoming12 FAILS [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [0] = 106 , j [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [1] = 110 , n [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [2] = 99 , c [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [3] = 45 , - [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [4] = 105 , i [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [5] = 110 , n [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [6] = 99 , c [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [7] = 111 , o [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [8] = 109 , m [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [9] = 105 , i [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [10] = 110 , n [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [11] = 103 , g [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [12] = 49 , 1 [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [13] = 50 , 2 [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [14] = 6 , ^F [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [15] = 0 , [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [16] = 0 , [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [17] = 106 , j [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [18] = 110 , n [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [19] = 99 , c [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [20] = 116 , t [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [21] = 110 , n [Jan 27 21:45:07] WARNING[9631]: chan_iax2.c:7667 check_access: [22] = 0 ,