Module: kamailio
Branch: master
Commit: 238219f126e3a155d109fab415d58f8903ee618d
URL:
https://github.com/kamailio/kamailio/commit/238219f126e3a155d109fab415d58f8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-02T17:06:58+02:00
sdpops: implemented $sdp(o:ip) - origin ip
---
Modified: src/modules/sdpops/sdpops_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/238219f126e3a155d109fab415d58f8…
Patch:
https://github.com/kamailio/kamailio/commit/238219f126e3a155d109fab415d58f8…
---
diff --git a/src/modules/sdpops/sdpops_mod.c b/src/modules/sdpops/sdpops_mod.c
index 63243c3c3f6..3675d48718e 100644
--- a/src/modules/sdpops/sdpops_mod.c
+++ b/src/modules/sdpops/sdpops_mod.c
@@ -2098,7 +2098,7 @@ static int pv_get_sdp(sip_msg_t *msg, pv_param_t *param, pv_value_t
*res)
}
return pv_get_null(msg, param, res);
case 2:
- /* connection ip */
+ /* c:ip - connection ip */
if(sdp->sessions == NULL) {
return pv_get_null(msg, param, res);
}
@@ -2125,6 +2125,17 @@ static int pv_get_sdp(sip_msg_t *msg, pv_param_t *param, pv_value_t
*res)
}
}
}
+ case 3:
+ /* o:ip - origin ip */
+ if(sdp->sessions == NULL) {
+ return pv_get_null(msg, param, res);
+ }
+ if(sdp->sessions->o_ip_addr.s != NULL
+ && sdp->sessions->o_ip_addr.len > 0) {
+ return pv_get_strval(
+ msg, param, res, &sdp->sessions->o_ip_addr);
+ }
+ return pv_get_null(msg, param, res);
case 4:
/* m0:rtp:port */
if(sdp->sessions == NULL) {