- [x ] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
- [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description Added missing kemi exports for RTP Engine module play_dtmf event_callback functions and Dialog module dlg_req_within function
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4245
-- Commit Summary --
* Add support for playing DTMF tones in RTP engine module using Kemi * Add support for KEMI callbacks in RTP engine events * Add `ki_dlg_req_within4` handling for dialog requests
-- File Changes --
M src/modules/dialog/dialog.c (24) M src/modules/rtpengine/rtpengine.c (215)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4245.patch https://github.com/kamailio/kamailio/pull/4245.diff
@ggontariu pushed 1 commit.
5aa6f53e92c478c3152e67ca292e703ab3475cf8 Kemi export play_dtmf event_callback
@ggontariu pushed 1 commit.
cf61ac8e85c7e89d7bcd7b3f5c2e3d1642290243 Kemi export Dialog dlg_req_within
@miconda commented on this pull request.
Thanks for submissions, there are some comments made inline within the patches.
@@ -2602,6 +2602,26 @@ static int ki_dlg_var_is_null(sip_msg_t *msg, str *name)
return -1; }
+/** + * + */ +static int ki_dlg_req_within4(struct sip_msg *msg, char *side, char *method, + char *content_type, char *content)
The `char*` params have to be changed to `str*`, that's the prototype expected by KEMI engine. FTR, the `str->s` values are NULL terminated, so they can be used for functions that expect `char*`.
@@ -2602,6 +2602,26 @@ static int ki_dlg_var_is_null(sip_msg_t *msg, str *name)
return -1; }
+/** + * + */ +static int ki_dlg_req_within4(struct sip_msg *msg, char *side, char *method, + char *content_type, char *content) +{ + dlg_cell_t *dlg; + int ret; + + dlg = dlg_get_msg_dialog(msg); + if(dlg == NULL) { + return 1; + } + ret = w_dlg_req_with_content(dlg, side, method, content_type, content);
Calling this function is not the correct way, because it is the function exported to kamailio.cfg, and its parameters are expected to be `fixed-up` at startup, being evaluated at runtime for cfg vars.
I split the function w_dlg_req_with_headers_and_content() in commit 0cb4dd3282ec12cdaefca491f9ed43acd0f21bdd, you need to update this functuin to use the new one ki_dlg_req_with_headers_and_content() directly.
@ggontariu pushed 1 commit.
a08c04d8caa2fe5b031488ba4f033a02de135ad5 Merge branch 'kamailio:master' into master
@ggontariu pushed 0 commits.
@ggontariu pushed 1 commit.
0a0830869650056f4e7a85c3ac91aaee70e97c57 Add `ki_dlg_req_within4` handling for dialog requests
@ggontariu pushed 1 commit.
2c7885b3ffc806ec068c670244deae27983d3b9d Add `ki_dlg_req_within4` handling for dialog requests
@ggontariu pushed 1 commit.
379287c38202cf0af7569636ae00f88ea09dc3e7 dialog: kemi export dlg_req_within
@ggontariu pushed 1 commit.
f15a155419c20e88c1ead8b7b33befafa025ece9 dialog: kemi export dlg_req_within
@ggontariu pushed 1 commit.
e8698b783e13cf823eb1486c32d36aa9571973f6 dialog: kemi export dlg_req_within
@ggontariu pushed 1 commit.
fa707f4e9ad55cf015420f661a0954bc67c4e225 dialog: kemi export dlg_req_within