MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / call_transfer_reply

Function call_transfer_reply

modules/callops/callops.c:377–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377static void call_transfer_reply(struct cell *t, int type, struct tmcb_params *ps)
378{
379 str status, new_callid, state;
380 struct dlg_cell *dlg = *ps->param;
381 int_str isval;
382
383 /* not interested in provisional replies, are we? */
384 if (ps->code < 200)
385 return;
386
387 /* take the status from the message itself */
388 if (ps->rpl != FAKED_REPLY) {
389 status.s = ps->rpl->first_line.u.reply.status.s;
390 status.len = ps->rpl->first_line.u.reply.reason.s +
391 ps->rpl->first_line.u.reply.reason.len -
392 ps->rpl->first_line.u.reply.status.s;
393
394 /* not interested in provisional replies, are we? */
395 if (ps->code >= 300)
396 init_str(&state, "fail");
397 else
398 init_str(&state, "ok");
399 } else {
400 init_str(&state, "fail");
401 init_str(&status, "408 Request Timeout");
402 }
403
404 if (get_callid(ps->req, &new_callid) < 0)
405 init_str(&new_callid, "unknown");
406
407 call_transfer_raise(dlg, &new_callid, call_get_ruri(ps->req), &state, &status);
408 isval.s = empty_str;
409 call_dlg_api.store_dlg_value(dlg, &call_transfer_param, &isval,
410 DLG_VAL_TYPE_STR);
411}
412
413/* expects the old_dlg to be reffed by the get_dlg* function
414 * NOTE: on error, the success, the caller should not unref the dialog! */

Callers

nothing calls this directly

Calls 4

init_strFunction · 0.85
get_callidFunction · 0.85
call_transfer_raiseFunction · 0.85
call_get_ruriFunction · 0.85

Tested by

no test coverage detected