| 4758 | } |
| 4759 | |
| 4760 | static 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 | |
| 4787 | static void rtpengine_raise_event(int sender, void *p) |
| 4788 | { |
nothing calls this directly
no test coverage detected