--- channels/chan_iax2.c	2003-09-01 01:36:25.000000000 -0500
+++ channels/chan_iax2-fixed.c	2003-08-31 21:18:09.000000000 -0500
@@ -4025,9 +4025,9 @@
 					fr.callno = make_trunk(fr.callno, 1);
 				}
 				/* This might re-enter the IAX code and need the lock */
-				ast_mutex_unlock(&iaxs[fr.callno]);
+				ast_mutex_unlock(&iaxsl[fr.callno]);
 				exists = ast_exists_extension(NULL, iaxs[fr.callno]->context, iaxs[fr.callno]->exten, 1, iaxs[fr.callno]->callerid);
-				ast_mutex_lock(&iaxs[fr.callno]);
+				ast_mutex_lock(&iaxsl[fr.callno]);
 				if (!strlen(iaxs[fr.callno]->secret) && !strlen(iaxs[fr.callno]->inkeys)) {
 					if (strcmp(iaxs[fr.callno]->exten, "TBD") && !exists) {
 						memset(&ied0, 0, sizeof(ied0));