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

Function req_within

modules/tm/uac.c:669–691  ·  view source on GitHub ↗

* Send a message within a dialog */

Source from the content-addressed store, hash-verified

667 * Send a message within a dialog
668 */
669int req_within(str* method, str* headers, str* body, dlg_t* dialog,
670 transaction_cb completion_cb,void* cbp,release_tmcb_param release_func)
671{
672 if (!method || !dialog) {
673 LM_ERR("invalid parameter value\n");
674 goto err;
675 }
676
677 if (dialog->state != DLG_CONFIRMED) {
678 LM_ERR("dialog is not confirmed yet\n");
679 goto err;
680 }
681
682 if ( !( ((method->len == 3) && !memcmp("ACK", method->s, 3)) ||
683 ((method->len == 6) && !memcmp("CANCEL", method->s, 6)) ) ) {
684 dialog->loc_seq.value++; /* Increment CSeq */
685 }
686
687 return t_uac(method, headers, body, dialog,
688 completion_cb, cbp, release_func);
689err:
690 return -1;
691}
692
693
694/*

Callers

nothing calls this directly

Calls 1

t_uacFunction · 0.85

Tested by

no test coverage detected