ast_copy_string(referdata->refer_to, c, sizeof(referdata->refer_to));
ast_copy_string(referdata->referred_by, "", sizeof(referdata->referred_by));
ast_copy_string(referdata->refer_contact, "", sizeof(referdata->refer_contact));
- referdata->refer_call = dialog_unref(referdata->refer_call, "unreffing referdata->refer_call");
/* Set new context */
ast_string_field_set(p, context, transfer_context);
return 0;
if (p->refer->refer_call->owner) {
ast_channel_unlock(p->refer->refer_call->owner);
}
+ p->refer->refer_call = dialog_unref(p->refer->refer_call, "unref dialog p->refer->refer_call");
}
if (authpeer) {
authpeer = sip_unref_peer(authpeer, "sip_unref_peer, from handle_request_invite authpeer");