Module: kamailio
Branch: master
Commit: 3b8d7950539be080770e3665ced07b491b9065bb
URL: https://github.com/kamailio/kamailio/commit/3b8d7950539be080770e3665ced07b4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-12-02T08:20:34+01:00
kamctl: added rpcfifo control engine
- interact with kamailio via a fifo file using jsonrpc-s module
- CTLENGINE has to be set to RPCFIFO
- RPCFIFOPATH has to be set to the fifo file created by jsonrpc-s module
- kamctl rpc command is available for sending raw jsonrpc commands
- it forwards number cli parameters as number type in jsonrpc commands
- the prefix s: or i: can be used to enforce type string or int for
parameters
kamctl rpc jsonrpc.eco abc 123
kamctl rpc jsonrpc.eco s:abc i:123
kamctl rpc jsonrpc.eco s:888 i:123
---
Added: utils/kamctl/kamctl.rpcfifo
Modified: utils/kamctl/kamctl
Modified: utils/kamctl/kamctlrc
---
Diff: https://github.com/kamailio/kamailio/commit/3b8d7950539be080770e3665ced07b4…
Patch: https://github.com/kamailio/kamailio/commit/3b8d7950539be080770e3665ced07b4…
Module: kamailio
Branch: master
Commit: f611b34157d135936f1b1e5e83f891201426936f
URL: https://github.com/kamailio/kamailio/commit/f611b34157d135936f1b1e5e83f8912…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-12-01T21:16:24+01:00
kamunix: small adjustments to the code
---
Modified: utils/kamunix/kamunix.c
---
Diff: https://github.com/kamailio/kamailio/commit/f611b34157d135936f1b1e5e83f8912…
Patch: https://github.com/kamailio/kamailio/commit/f611b34157d135936f1b1e5e83f8912…
---
diff --git a/utils/kamunix/kamunix.c b/utils/kamunix/kamunix.c
index b7c527c..7612a9e 100644
--- a/utils/kamunix/kamunix.c
+++ b/utils/kamunix/kamunix.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Copyright (C) 2004 FhG FOKUS
*
* This file is part of Kamailio, a free SIP server.
@@ -15,8 +13,8 @@
* 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
+ * 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
*
*/
@@ -70,7 +68,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Error while opening socket: %s\n", strerror(errno));
return -1;
}
-
+
memset(&from, 0, sizeof(from));
from.sun_family = PF_LOCAL;
@@ -78,10 +76,13 @@ int main(int argc, char** argv)
if (chroot_dir == NULL)
chroot_dir = "";
sprintf(name, "%s/tmp/Kamailio.%d.XXXXXX", chroot_dir, getpid());
- umask(0); /* set mode to 0666 for when Kamailio is running as non-root user and kamctl is running as root */
+ umask(0);
+ /* set mode to 0666 for when Kamailio is running as non-root user
+ * and kamctl is running as root */
if (mkstemp(name) == -1) {
- fprintf(stderr, "Error in mkstemp with name=%s: %s\n", name, strerror(errno));
+ fprintf(stderr, "Error in mkstemp with name=%s: %s\n",
+ name, strerror(errno));
return -2;
}
if (unlink(name) == -1) {
@@ -98,16 +99,18 @@ int main(int argc, char** argv)
memset(&to, 0, sizeof(to));
to.sun_family = PF_LOCAL;
strncpy(to.sun_path, argv[1], sizeof(to.sun_path) - 1);
-
+
len = fread(buffer, 1, BUF_SIZE, stdin);
if (len) {
- if (sendto(sock, buffer, len, 0, (struct sockaddr*)&to, SUN_LEN(&to)) == -1) {
+ if (sendto(sock, buffer, len, 0, (struct sockaddr*)&to,
+ SUN_LEN(&to)) == -1) {
fprintf(stderr, "Error in sendto: %s\n", strerror(errno));
goto err;
}
from_len = sizeof(from);
- len = recvfrom(sock, buffer, BUF_SIZE, 0, (struct sockaddr*)&from, &from_len);
+ len = recvfrom(sock, buffer, BUF_SIZE, 0,
+ (struct sockaddr*)&from, &from_len);
if (len == -1) {
fprintf(stderr, "Error in recvfrom: %s\n", strerror(errno));
goto err;
Module: kamailio
Branch: master
Commit: 9c94ffa85a2a55e746f6de505f8b47947bf7dbce
URL: https://github.com/kamailio/kamailio/commit/9c94ffa85a2a55e746f6de505f8b479…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-12-01T21:03:26+01:00
kamunix: removed svn id from man page file
---
Modified: utils/kamunix/kamunix.8
---
Diff: https://github.com/kamailio/kamailio/commit/9c94ffa85a2a55e746f6de505f8b479…
Patch: https://github.com/kamailio/kamailio/commit/9c94ffa85a2a55e746f6de505f8b479…
---
diff --git a/utils/kamunix/kamunix.8 b/utils/kamunix/kamunix.8
index 6035c56..afe0b3a 100644
--- a/utils/kamunix/kamunix.8
+++ b/utils/kamunix/kamunix.8
@@ -1,7 +1,6 @@
-.\" $Id$
-.TH kamunix 8 21.06.2006 kamailio "Kamailio"
+.TH kamunix 8 21.06.2006 kamailio "Kamailio"
.\" Process with
-.\" groff -man -Tascii kamunix.8
+.\" groff -man -Tascii kamunix.8
.\"
.SH NAME
kamunix \- Kamailio UNIX socket wrapper
@@ -20,7 +19,7 @@ This is a binary alternative to the textual FIFO interface.
.B kamunix
reads from standard input one
.B Kamailio
-command along with its paramters (if any) and prints the response
+command along with its paramters (if any) and prints the response
to standard output.
.SH PARAMETERS
@@ -32,7 +31,7 @@ external commands
.SH EXAMPLES
.PP
An Kamailio commands consists in one ore more lines: first contains the
-command name enclosed between ":", the following lines containing the
+command name enclosed between ":", the following lines containing the
command parameters, one per line.
.PP
echo ":uptime:" | kamunix /tmp/kamailio.sock
@@ -40,7 +39,7 @@ echo ":uptime:" | kamunix /tmp/kamailio.sock
.SH AUTHORS
-see
+see
.B /usr/share/doc/kamailio/AUTHORS
.SH SEE ALSO
@@ -50,8 +49,8 @@ Full documentation on Kamailio is available at
.I http://www.kamailio.org/.
.PP
Mailing lists:
-.nf
+.nf
users(a)lists.kamailio.org - Kamailio user community
-.nf
+.nf
devel(a)lists.kamailio.org - Kamailio development, new features and unstable version
Hello all,
The way sipcapture now works, for requests it inserts the actual method
name into the "method" field. But for replies, it inserts the SIP Status
(i.e. 200, 407) into the "method" field.
It would be better to extract the actual method name from the CSEQ header
and insert it into the "method" field, as well as adding a "status" field
to the tables and inserting there the actual SIP Status.
I've made a patch for sipcapture.c and sipcapture.h which do just that.
I will also be submitting a PR to homer for this, as db tables need to be
modified to accept the status field.
How do i do the pull request?
I don't seem to be allowed to do commits to a branch i created locally
Regards,
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
<https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=david.villasmil.work@gma…>
phone: +34669448337