<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
With rtpengine module play_media function it is possible to play media to one of the endpoints(Kamailio is normal proxy) but I like to use Kamailio+rtpengine as an end point playing music for caller(simple media server).
### Expected behavior
Possible to use Kamailio+rtpengine as an end point playing media.
### Possible Solutions
I see some efforts in mailing list trying to build/generate a 183 response inside script to simulate a dummy end point and then use rtpengine_play_media function.
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
Regards.
Babak
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2315
Module: kamailio
Branch: master
Commit: dd15786aba0b48a83efeef258d689217ac5375a9
URL: https://github.com/kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-01T13:10:29+02:00
crypto: aes helper functions relocated to dedicated files
---
Added: src/modules/crypto/crypto_aes.c
Added: src/modules/crypto/crypto_aes.h
---
Diff: https://github.com/kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
Patch: https://github.com/kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
---
diff --git a/src/modules/crypto/crypto_aes.c b/src/modules/crypto/crypto_aes.c
new file mode 100644
index 0000000000..9573c7264d
--- /dev/null
+++ b/src/modules/crypto/crypto_aes.c
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2016-2020 Daniel-Constantin Mierla (asipto.com)
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
diff --git a/src/modules/crypto/crypto_aes.h b/src/modules/crypto/crypto_aes.h
new file mode 100644
index 0000000000..a98a95016e
--- /dev/null
+++ b/src/modules/crypto/crypto_aes.h
@@ -0,0 +1,35 @@
+/**
+ * Copyright (C) 2016-2020 Daniel-Constantin Mierla (asipto.com)
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _CRYPTO_AES_H_
+#define _CRYPTO_AES_H_
+
+#include <openssl/evp.h>
+
+int crypto_aes_init(unsigned char *key_data, int key_data_len,
+ unsigned char *salt, EVP_CIPHER_CTX *e_ctx, EVP_CIPHER_CTX *d_ctx);
+
+unsigned char *crypto_aes_encrypt(EVP_CIPHER_CTX *e, unsigned char *plaintext,
+ int *len);
+
+unsigned char *crypto_aes_decrypt(EVP_CIPHER_CTX *e, unsigned char *ciphertext,
+ int *len);
+#endif
\ No newline at end of file