else
ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten));
+ ast_channel_unlock(tc);
res = ast_call(tc, numsubst, 0); /* Place the call, but don't wait on the answer */
/* Save the info in cdr's that we called them */
chan->hangupcause = tc->hangupcause;
}
ast_channel_unlock(chan);
- ast_channel_unlock(tc);
ast_hangup(tc);
tc = NULL;
ast_free(tmp);
senddialevent(chan, tc, numsubst);
ast_verb(3, "Called %s\n", numsubst);
ast_channel_unlock(chan);
- ast_channel_unlock(tc);
if (!ast_test_flag64(peerflags, OPT_ORIGINAL_CLID)) {
ast_set_callerid(tc, tmpexten, get_cid_name(cidname, sizeof(cidname), chan), NULL);
}