| 3022 | } |
| 3023 | |
| 3024 | static int |
| 3025 | set_rtpengine_set_from_avp(struct sip_msg *msg) |
| 3026 | { |
| 3027 | struct usr_avp *avp; |
| 3028 | int_str setid_val; |
| 3029 | struct rtpe_set *set; |
| 3030 | |
| 3031 | if ((setid_avp_param == NULL) || |
| 3032 | (avp = search_first_avp(setid_avp_type, setid_avp.n, &setid_val, 0)) |
| 3033 | == NULL) |
| 3034 | return 1; |
| 3035 | |
| 3036 | if (avp->flags&AVP_VAL_STR) { |
| 3037 | LM_ERR("setid_avp must hold an integer value\n"); |
| 3038 | return -1; |
| 3039 | } |
| 3040 | |
| 3041 | if ((set=select_rtpe_set(setid_val.n)) == NULL) { |
| 3042 | LM_ERR("could not locate rtpengine set %d\n", setid_val.n); |
| 3043 | return -1; |
| 3044 | } |
| 3045 | |
| 3046 | rtpe_ctx_set_fill( set ); |
| 3047 | LM_DBG("using rtpengine set %d\n", setid_val.n); |
| 3048 | |
| 3049 | return 1; |
| 3050 | } |
| 3051 | |
| 3052 | |
| 3053 | static int rtpe_function_call_simple(struct sip_msg *msg, enum rtpe_operation op, |
no test coverage detected