|
|
|
|
@ -741,26 +741,6 @@ static const char *call_offer_answer_ng(bencode_item_t *input, struct callmaster
|
|
|
|
|
if (!ret)
|
|
|
|
|
ret = sdp_replace(chopper, &parsed, monologue->active_dialogue, &flags);
|
|
|
|
|
|
|
|
|
|
rwlock_unlock_w(&call->master_lock);
|
|
|
|
|
redis_update(call, m->conf.redis_write);
|
|
|
|
|
obj_put(call);
|
|
|
|
|
|
|
|
|
|
gettimeofday(&(monologue->started), NULL);
|
|
|
|
|
|
|
|
|
|
errstr = "Error rewriting SDP";
|
|
|
|
|
|
|
|
|
|
if (ret == ERROR_NO_FREE_PORTS || ret == ERROR_NO_FREE_LOGS) {
|
|
|
|
|
ilog(LOG_ERR, "Destroying call");
|
|
|
|
|
call_destroy(call);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ret)
|
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
bencode_dictionary_add_iovec(output, "sdp", &g_array_index(chopper->iov, struct iovec, 0),
|
|
|
|
|
chopper->iov_num, chopper->str_len);
|
|
|
|
|
bencode_dictionary_add_string(output, "result", "ok");
|
|
|
|
|
|
|
|
|
|
struct recording *recording = call->recording;
|
|
|
|
|
if (call->record_call && recording != NULL && recording->meta_fp != NULL) {
|
|
|
|
|
struct iovec *iov = &g_array_index(chopper->iov, struct iovec, 0);
|
|
|
|
|
@ -772,6 +752,7 @@ static const char *call_offer_answer_ng(bencode_item_t *input, struct callmaster
|
|
|
|
|
if (metadata.len > 0 && call->recording != NULL) {
|
|
|
|
|
if (call->recording->metadata != NULL) {
|
|
|
|
|
free(call->recording->metadata);
|
|
|
|
|
call->recording->metadata = NULL;
|
|
|
|
|
}
|
|
|
|
|
call->recording->metadata = str_dup(&metadata);
|
|
|
|
|
}
|
|
|
|
|
@ -781,6 +762,26 @@ static const char *call_offer_answer_ng(bencode_item_t *input, struct callmaster
|
|
|
|
|
bencode_list_add_string(recordings, recording_path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rwlock_unlock_w(&call->master_lock);
|
|
|
|
|
redis_update(call, m->conf.redis_write);
|
|
|
|
|
obj_put(call);
|
|
|
|
|
|
|
|
|
|
gettimeofday(&(monologue->started), NULL);
|
|
|
|
|
|
|
|
|
|
errstr = "Error rewriting SDP";
|
|
|
|
|
|
|
|
|
|
if (ret == ERROR_NO_FREE_PORTS || ret == ERROR_NO_FREE_LOGS) {
|
|
|
|
|
ilog(LOG_ERR, "Destroying call");
|
|
|
|
|
call_destroy(call);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ret)
|
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
bencode_dictionary_add_iovec(output, "sdp", &g_array_index(chopper->iov, struct iovec, 0),
|
|
|
|
|
chopper->iov_num, chopper->str_len);
|
|
|
|
|
bencode_dictionary_add_string(output, "result", "ok");
|
|
|
|
|
|
|
|
|
|
errstr = NULL;
|
|
|
|
|
out:
|
|
|
|
|
sdp_free(&parsed);
|
|
|
|
|
|