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

Function rtpengine_play_dtmf_f

modules/rtpengine/rtpengine.c:4760–4785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4758}
4759
4760static int rtpengine_play_dtmf_f(struct sip_msg* msg, str *code, str *flags, pv_spec_t *spvar)
4761{
4762 bencode_buffer_t bencbuf;
4763 bencode_item_t *ret, *d_code;
4764
4765 if (set_rtpengine_set_from_avp(msg) == -1)
4766 return -1;
4767
4768 if (bencode_buffer_init(&bencbuf)) {
4769 LM_ERR("could not initialize bencode_buffer_t\n");
4770 return -2;
4771 }
4772 d_code = bencode_dictionary(&bencbuf);
4773 if (!d_code) {
4774 LM_ERR("could not initialize bencode dictionary\n");
4775 return -2;
4776 }
4777 bencode_dictionary_add_str(d_code, "code", code);
4778 ret = rtpe_function_call_ok(&bencbuf, msg, OP_PLAY_DTMF,
4779 flags, NULL, spvar, NULL, NULL, d_code);
4780 if (!ret)
4781 return -2;
4782
4783 bencode_buffer_free(&bencbuf);
4784 return 1;
4785}
4786
4787static void rtpengine_raise_event(int sender, void *p)
4788{

Callers

nothing calls this directly

Calls 6

bencode_buffer_initFunction · 0.85
bencode_dictionaryFunction · 0.85
rtpe_function_call_okFunction · 0.85
bencode_buffer_freeFunction · 0.85

Tested by

no test coverage detected