|
50 | 50 | #include "transformations.h"
|
51 | 51 | #include "script_var.h"
|
52 | 52 | #include "pvar.h"
|
| 53 | +#include "sdp_ops.h" |
53 | 54 | #include "flags.h"
|
54 | 55 | #include "xlog.h"
|
55 | 56 |
|
@@ -1746,6 +1747,18 @@ static int pv_get_msg_body(struct sip_msg *msg, pv_param_t *param,
|
1746 | 1747 | return pv_get_strval(msg, param, res, &s);
|
1747 | 1748 | }
|
1748 | 1749 |
|
| 1750 | + |
| 1751 | +static int pv_get_sdp(struct sip_msg *msg, pv_param_t *_, pv_value_t *res) |
| 1752 | +{ |
| 1753 | + pv_param_t param; |
| 1754 | + |
| 1755 | + memset(¶m, 0, sizeof param); |
| 1756 | + param.pvn.u.isname.name.n = ((TYPE_APPLICATION<<16)+SUBTYPE_SDP); |
| 1757 | + |
| 1758 | + return pv_get_msg_body(msg, ¶m, res); |
| 1759 | +} |
| 1760 | + |
| 1761 | + |
1749 | 1762 | static int pv_get_authattr(struct sip_msg *msg, pv_param_t *param,
|
1750 | 1763 | pv_value_t *res)
|
1751 | 1764 | {
|
@@ -4284,6 +4297,21 @@ const pv_export_t _pv_names_table[] = {
|
4284 | 4297 | {str_const_init("ruri.user"), /* */
|
4285 | 4298 | PVT_RURI_USERNAME, pv_get_ruri_attr, pv_set_ruri_user,
|
4286 | 4299 | 0, 0, pv_init_iname, 1},
|
| 4300 | + {str_const_init("sdp"), /* */ |
| 4301 | + PVT_SDP, pv_get_sdp, pv_set_sdp, |
| 4302 | + 0, 0, pv_init_iname, 1}, |
| 4303 | + {str_const_init("sdp"), /* */ |
| 4304 | + PVT_SDP, pv_get_sdp, pv_set_sdp, |
| 4305 | + pv_parse_sdp_name, 0, pv_init_iname, 1}, |
| 4306 | + {str_const_init("sdp.line"), /* */ |
| 4307 | + PVT_SDP_LINE, pv_get_sdp_line, pv_set_sdp_line, |
| 4308 | + pv_parse_sdp_line_name, 0, 0, 0}, |
| 4309 | + {str_const_init("sdp.stream"), /* */ |
| 4310 | + PVT_SDP_STREAM, pv_get_sdp_stream, pv_set_sdp_stream, |
| 4311 | + pv_parse_sdp_stream_name, 0, 0, 0}, |
| 4312 | + {str_const_init("sdp.session"), /* */ |
| 4313 | + PVT_SDP_SESSION, pv_get_sdp_session, pv_set_sdp_session, |
| 4314 | + pv_parse_sdp_session_name, 0, 0, 0}, |
4287 | 4315 | {str_const_init("src_ip"), /* */
|
4288 | 4316 | PVT_SRCIP, pv_get_srcip, 0,
|
4289 | 4317 | 0, 0, 0, 0},
|
|
0 commit comments