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

Function request

modules/tm/uac.c:722–756  ·  view source on GitHub ↗

* Send a transactional request, no dialogs involved */

Source from the content-addressed store, hash-verified

720 * Send a transactional request, no dialogs involved
721 */
722int request(str* m, str* ruri, str* to, str* from, str* h, str* b, str *oburi,
723 transaction_cb cb, void* cbp,release_tmcb_param release_func)
724{
725 str callid, fromtag;
726 dlg_t* dialog;
727 int res;
728
729 if (check_params(m, to, from, &dialog) < 0) goto err;
730
731 generate_callid(&callid);
732 generate_fromtag(&fromtag, &callid);
733
734 if (new_dlg_uac(&callid, &fromtag, DEFAULT_CSEQ, from, to, NULL, &dialog) < 0) {
735 LM_ERR("failed to create temporary dialog\n");
736 goto err;
737 }
738
739 if (ruri) {
740 dialog->rem_target.s = ruri->s;
741 dialog->rem_target.len = ruri->len;
742 dialog->hooks.request_uri = &dialog->rem_target;
743 }
744
745 if (oburi && oburi->s) dialog->hooks.next_hop = oburi;
746
747 w_calculate_hooks(dialog);
748
749 res = t_uac(m, h, b, dialog, cb, cbp, release_func);
750 dialog->rem_target.s = 0;
751 free_dlg(dialog);
752 return res;
753
754err:
755 return -1;
756}
757
758
759void setlocalTholder(struct cell** holder)

Callers

nothing calls this directly

Calls 7

check_paramsFunction · 0.85
generate_callidFunction · 0.85
generate_fromtagFunction · 0.85
new_dlg_uacFunction · 0.85
w_calculate_hooksFunction · 0.85
t_uacFunction · 0.85
free_dlgFunction · 0.85

Tested by

no test coverage detected