[sr-dev] git:master:9c94ffa8: kamunix: removed svn id from man page file

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 9c94ffa85a2a55e746f6de505f8b47947bf7dbce
URL: 
https://github.com/kamailio/kamailio/commit/9c94ffa85a2a55e746f6de505f8b47947bf7dbce

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
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/9c94ffa85a2a55e746f6de505f8b47947bf7dbce.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9c94ffa85a2a55e746f6de505f8b47947bf7dbce.patch

---

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
 us...@lists.kamailio.org - Kamailio user community
-.nf 
+.nf
 de...@lists.kamailio.org - Kamailio development, new features and unstable 
version
 


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f2181d7c: jsonrpc-s: implemented datagram transport

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f2181d7cb461527747e2b720f2a37cfc987fa518
URL: 
https://github.com/kamailio/kamailio/commit/f2181d7cb461527747e2b720f2a37cfc987fa518

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T23:00:57+01:00

jsonrpc-s: implemented datagram transport

- via unix socket files or network sockets ipv4/ipv6

---

Added: modules/jsonrpc-s/jsonrpcs_fifo.c
Added: modules/jsonrpc-s/jsonrpcs_sock.c
Modified: modules/jsonrpc-s/jsonrpc-s_mod.c
Modified: modules/jsonrpc-s/jsonrpc-s_mod.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/f2181d7cb461527747e2b720f2a37cfc987fa518.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f2181d7cb461527747e2b720f2a37cfc987fa518.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f611b341: kamunix: small adjustments to the code

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f611b34157d135936f1b1e5e83f891201426936f
URL: 
https://github.com/kamailio/kamailio/commit/f611b34157d135936f1b1e5e83f891201426936f

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
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/f611b34157d135936f1b1e5e83f891201426936f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f611b34157d135936f1b1e5e83f891201426936f.patch

---

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(, 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.XX", 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(, 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*), 
SUN_LEN()) == -1) {
+   if (sendto(sock, buffer, len, 0, (struct sockaddr*),
+   SUN_LEN()) == -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*), _len);
+   len = recvfrom(sock, buffer, BUF_SIZE, 0,
+   (struct sockaddr*), _len);
if (len == -1) {
fprintf(stderr, "Error in recvfrom: %s\n", 
strerror(errno));
goto err;


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:3b8d7950: kamctl: added rpcfifo control engine

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 3b8d7950539be080770e3665ced07b491b9065bb
URL: 
https://github.com/kamailio/kamailio/commit/3b8d7950539be080770e3665ced07b491b9065bb

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
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/3b8d7950539be080770e3665ced07b491b9065bb.diff
Patch: 
https://github.com/kamailio/kamailio/commit/3b8d7950539be080770e3665ced07b491b9065bb.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [SR-Users] VERY IMPORTANT: deciding when to remove the MI code

2016-12-01 Thread jh
> I would also say that at this point, almost all classical uses of MI
> that I know of can be met with RPC.

Alex,

Did you see my message about pua_mi?  Is there now rpc version of it that
I have missed to notice?

-- Juha


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [SR-Users] VERY IMPORTANT: deciding when to remove the MI code

2016-12-01 Thread Alex Balashov
I would also say that at this point, almost all classical uses of MI
that I know of can be met with RPC. 

If, in removing MI for v5.0, something should be overlooked, I trust any
howls of protest will expediently illuminate any small things that fell
through the cracks. The major functionality for most modules is clearly
there, though.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [SR-Users] VERY IMPORTANT: deciding when to remove the MI code

2016-12-01 Thread Juha Heinanen
Brandon Armstead writes:

> +1 - I'm all for cleaning up any technical debt and moving on with more
> normalized concept.

I'm also in favor of getting rid on MI interface. I'm myself relying
only on one MI command (pua_publish) for which an RPC command does not
exist (or did not exist last time when I checked).

Some years ago I tried to implement RPC version of pua_publish, but was
not able to get the call back working correctly.  I also sent some
messages including a piece of code to the dev list, but it was a dead
end then.

Very nice if pua.publish would see a day of light again.

-- Juha

___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sipcapture: expose pv $hep(src_ip) (#877)

2016-12-01 Thread Alexandr Dubovikov
@miconda already wrote you in your prevision push. Please follow the guide line:

https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md

in your patch a lot changes that not needed. Please re-push.


-- 
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/pull/877#issuecomment-264289997___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] sipcapture: expose pv $hep(src_ip) (#877)

2016-12-01 Thread David Villasmil
- when using with Homer, on onreply_route it is not possible to
  get the source ip address sending the reply. This patch exposes
  pv $hep(src_ip), i.e.:

  onreply_route {
...
xlog("[onreply_route] Source IP: $hep(src_ip)\n");
...
  }
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/877

-- Commit Summary --

  * sipcapture: expose pv $hep(src_ip)

-- File Changes --

M modules/sipcapture/sipcapture.c (83)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/877.patch
https://github.com/kamailio/kamailio/pull/877.diff

-- 
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/pull/877
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio crashes when it receives a 404 reply to an INVITE originated after a 302. (#875)

2016-12-01 Thread Joel Serrano
My bad... didn't realize I didn't have dbg installed.

Attached is the real backtrace.

[backtrace-bt_full.txt](https://github.com/kamailio/kamailio/files/625062/backtrace-bt_full.txt)
[backtrace-info_locals.txt](https://github.com/kamailio/kamailio/files/625063/backtrace-info_locals.txt)


-- 
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/875#issuecomment-264208065___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [SR-Users] VERY IMPORTANT: deciding when to remove the MI code

2016-12-01 Thread Brandon Armstead
+1 - I'm all for cleaning up any technical debt and moving on with more
normalized concept.

:)

Sincerely,
Brandon Armstead

On Thu, Dec 1, 2016 at 6:17 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> we started discussing about removing MI (so called management interface)
> for very long time, more or less since 2008. The RPC should remain the
> control interface, given its better structure for commands, parameters,
> etc ... MI is custom protocol using a line-oriented communication via
> fifo or socket file with kamailio (e.g., implemented mi_fifo and
> mi_datagram modules). RPC is the alternative, a more standardized
> concept, with better structured format.
>
> I think it's time to set a clear roadmap for doing the removal. Overall,
> it will be easier to maintain the code, right now being duplicated code
> for doing the same operation over MI or RPC, and MI shows its
> limitations (or complexity to deal with) for advanced needs (see the
> discussions about how to provide multi-line value parameters over MI).
>
> So, I want to know if there are many relying on MI directly and they
> still want to keep it, what would be the expected duration they need for
> upgrading their tools to work with RPC interface, other relevant aspects
> people have in favour of mi vs rpc.
>
> I am even willing to do the removal in time befire freezing the 5.0
> branch. We will ensure a clean start of 5.x series.
>
> The main concern from my point of view is kamctl -- but I think we can
> preserve the compatibility for kamctl commands and parameters (so
> command line execution of kamctl will be the same), but the output might
> be different. That's because it should be easy to updated it to
> communicate with jsonrpc-s module, but then it will get json-formatted
> results.
>
> To summarize, two big questions to answer:
>
> a) Are you ok to remove the MI code/commands?
>
> b) If yes to a), are you ok to be done for v5.0?
>
> Not providing feedback will be considered as 'yes' for both questions,
> so **speak up if you want MI to be kept or delay it removal**.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-us...@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Victor Seva
core: core.kamailio.sig11.29831
log from pid that crash:
```
2016-12-01T16:16:21.463526+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:595]: parse_msg(): SIP Request:
2016-12-01T16:16:21.463531+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:597]: parse_msg():  method:  
2016-12-01T16:16:21.463534+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:599]: parse_msg():  uri: 
2016-12-01T16:16:21.463538+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:601]: parse_msg():  version: 
2016-12-01T16:16:21.463548+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:1254]: parse_via_param(): Found param type 232,  = 
; state=16
2016-12-01T16:16:21.463562+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:2642]: parse_via(): end of header reached, state=5
2016-12-01T16:16:21.463567+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:486]: parse_headers(): Via found, flags=2
2016-12-01T16:16:21.463570+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:488]: parse_headers(): this is the first via
2016-12-01T16:16:21.463574+01:00 spce proxy[29831]: DEBUG:  
[receive.c:178]: receive_msg(): After parse_msg...
2016-12-01T16:16:21.463583+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:1254]: parse_via_param(): Found param type 234,  
= <127.0.2.1>; state=6
2016-12-01T16:16:21.463638+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:1254]: parse_via_param(): Found param type 235,  = 
<51602>; state=6
2016-12-01T16:16:21.463653+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:1254]: parse_via_param(): Found param type 232,  = 
; state=16
2016-12-01T16:16:21.463657+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_via.c:2642]: parse_via(): end of header reached, state=5
2016-12-01T16:16:21.463661+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:486]: parse_headers(): Via found, flags=
2016-12-01T16:16:21.463664+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:499]: parse_headers(): this is the second via
2016-12-01T16:16:21.463671+01:00 spce proxy[29831]: DEBUG:  
[parser/parse_addr_spec.c:871]: parse_addr_spec(): end of header reached, 
state=10
2016-12-01T16:16:21.463675+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:171]: get_hdr_field():  [25]; 
uri=[sip:4311...@spce.test]
2016-12-01T16:16:21.463678+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:172]: get_hdr_field(): to body 
[#015#012]
2016-12-01T16:16:21.463704+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:152]: get_hdr_field(): cseq : <1> 
2016-12-01T16:16:21.463720+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:183]: get_hdr_field(): content_length=0
2016-12-01T16:16:21.463727+01:00 spce proxy[29831]: DEBUG:  
[parser/msg_parser.c:89]: get_hdr_field(): found end of header
2016-12-01T16:16:21.463734+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} DEBUG:  
[receive.c:221]: receive_msg(): preparing to run routing scripts...
2016-12-01T16:16:21.463784+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} DEBUG:  
[forward.c:702]: update_sock_struct_from_via(): trying SRV lookup
2016-12-01T16:16:21.463800+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} DEBUG:  
[msg_translator.c:158]: check_via_address(): (127.0.0.1, 127.0.0.1, 0)
2016-12-01T16:16:21.463839+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} DEBUG:  
[parser/parse_addr_spec.c:171]: parse_to_param(): DEBUG: add_param: 
tag=30543SIPpTag001
2016-12-01T16:16:21.463881+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} DEBUG:  
[parser/parse_addr_spec.c:871]: parse_addr_spec(): end of header reached, 
state=29
2016-12-01T16:16:21.463891+01:00 spce proxy[29831]: {1 1 CANCEL 
NGCP%incoming_peer_user_404%///1-30543@127.0.2.1} NOTICE: 

Re: [sr-dev] [kamailio/kamailio] Sipcapture: When inserting a reply, this module would insert the SIP … (#876)

2016-12-01 Thread Alexandr Dubovikov
you are talking about  "view", that can be easy changed in UI and API. but I 
try to make a pointer on back compatibility with already existing setups. In 
this case more effective way is to add a cseq_method field and add mod param 
for this feature.

also 5 cents for the cseq's method. What sense write it into DB as a separate 
field ? Do search ONLY on this field ? Unlikely because normally you always 
do search on a "reply code" + cseq method (i.e. method="200" AND cseq like "% 
INVITE") and the "reply code" (method) is already  indexed and wildcard will be 
effective just like a filter. Sorry, but just want to see real arguments.

If the case only for "nice view": it's just a small trigger for the result 
grid. Not need to change a lot components for this.

Thank you!







-- 
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/pull/876#issuecomment-264198234___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture: When inserting a reply, this module would insert the SIP … (#876)

2016-12-01 Thread David Villasmil
The way it works now, on a reply the SIP Status is inserted into the "method" 
field, this isn't very nice as, if you're working with the table, you'd need to 
actually look into the cseq and break it into Sequence and Method to be able to 
do anything useful. Then you'd need to check if the "method" field is an actual 
method or a status code. The patch makes it much more readable:

```
+-+--+++---+--+
| date| micro_ts | method | status | reply_reason   
   | ruri |
+-+--+++---+--+
| 2016-12-01 02:18:31 | 1480558711188146 | INVITE ||
   | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711188584 | INVITE | 100| Trying 
   |  |
| 2016-12-01 02:18:31 | 1480558711189884 | INVITE | 407| Proxy 
Authentication Required |  |
| 2016-12-01 02:18:31 | 1480558711391719 | ACK||
   | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711391871 | INVITE ||
   | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711392194 | INVITE | 100| Trying 
   |  |
| 2016-12-01 02:18:31 | 1480558711411499 | INVITE | 403| Forbidden  
   |  |
| 2016-12-01 02:18:31 | 1480558711796623 | ACK||
   | sip:12345@1.2.3.4|

```
Which is easier to read than the current way:

```
+-+--++---+--+
| date| micro_ts | method | reply_reason
  | ruri |
+-+--++---+--+
| 2016-12-01 02:18:31 | 1480558711188146 | INVITE | 
  | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711188584 | 100| Trying  
  |  |
| 2016-12-01 02:18:31 | 1480558711189884 | 407| Proxy Authentication 
Required |  |
| 2016-12-01 02:18:31 | 1480558711391719 | ACK| 
  | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711391871 | INVITE | 
  | sip:12345@1.2.3.4|
| 2016-12-01 02:18:31 | 1480558711392194 | 100| Trying  
  |  |
| 2016-12-01 02:18:31 | 1480558711411499 | 403| Forbidden   
  |  |
| 2016-12-01 02:18:31 | 1480558711796623 | ACK| 
  | sip:12345@1.2.3.4|

```

Also, I'm doing a PR to homer as well to take into account this change, which 
will show in the "sip search" as a "Status" column.



-- 
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/pull/876#issuecomment-264192515___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture: When inserting a reply, this module would insert the SIP … (#876)

2016-12-01 Thread Alexandr Dubovikov
it can be approved only if it can be activated by param i.e.:
modparam("sipcapture", "version_schema", 5);

anyway, I don't see why we should do this way and not just add a cseq_method 
field ? This will avoid a lot potential issues and give you same possibility 
for searches. 


-- 
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/pull/876#issuecomment-264188366___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] sipcapture sip-status and method

2016-12-01 Thread Mikko Lehto
+1 for the improvement initiative, I've found myself sometimes doing those
kind of queries with SQL... :|


David Villasmil  wrote:

> How do i do the pull request?
> 
> I don't seem to be allowed to do commits to a branch i created locally

Do you have your branch in Github?
Maybe you just need to say something like "git push origin 
sipcapture_enhancement_branch"


When branch is visible in Github web, try loading branch specific page¹ and
then select "Compare". That should bring you the pull request dialog.

[1] Something like
https://github.com/your_account/kamailio/tree/sipcapture_enhancement_branch;

-- 
Mikko

___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture: When inserting a reply, this module would insert the SIP … (#876)

2016-12-01 Thread Daniel-Constantin Mierla
Please format the commit log messages according with the guidelines from:

  * https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md

You should be able to amend previous commit log message in your branch and 
repush.

-- 
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/pull/876#issuecomment-264186008___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] Sipcapture: When inserting a reply, this module would insert the SIP … (#876)

2016-12-01 Thread David Villasmil
…Status as the reply method. I've patched sipcapture.c and sipcapture.h to 
insert the actual SIP Status into a 'status' field on replies, and the Method 
extracted from the CSEQ into the 'method' field. This means when using this 
version of the module, you're tables must include a 'status' varchar(5) NULL 
field.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/876

-- Commit Summary --

  * Sipcapture: When inserting a reply, this module would insert the SIP Status 
as the reply method. I've patched sipcapture.c and sipcapture.h to insert the 
actual SIP Status into a 'status' field on replies, and the Method extracted 
from the CSEQ into the 'method' field. This means when using this version of 
the module, you're tables must include a 'status' varchar(5) NULL field.

-- File Changes --

M modules/sipcapture/sipcapture.c (83)
M modules/sipcapture/sipcapture.h (1)
M modules/sipcapture/sql/create_sipcapture_postgress.sql (3)
M modules/sipcapture/sql/schema_data.sql (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/876.patch
https://github.com/kamailio/kamailio/pull/876.diff

-- 
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/pull/876
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] VERY IMPORTANT: deciding when to remove the MI code

2016-12-01 Thread Daniel-Constantin Mierla
Hello,

we started discussing about removing MI (so called management interface)
for very long time, more or less since 2008. The RPC should remain the
control interface, given its better structure for commands, parameters,
etc ... MI is custom protocol using a line-oriented communication via
fifo or socket file with kamailio (e.g., implemented mi_fifo and
mi_datagram modules). RPC is the alternative, a more standardized
concept, with better structured format.

I think it's time to set a clear roadmap for doing the removal. Overall,
it will be easier to maintain the code, right now being duplicated code
for doing the same operation over MI or RPC, and MI shows its
limitations (or complexity to deal with) for advanced needs (see the
discussions about how to provide multi-line value parameters over MI).

So, I want to know if there are many relying on MI directly and they
still want to keep it, what would be the expected duration they need for
upgrading their tools to work with RPC interface, other relevant aspects
people have in favour of mi vs rpc.

I am even willing to do the removal in time befire freezing the 5.0
branch. We will ensure a clean start of 5.x series.

The main concern from my point of view is kamctl -- but I think we can
preserve the compatibility for kamctl commands and parameters (so
command line execution of kamctl will be the same), but the output might
be different. That's because it should be easy to updated it to
communicate with jsonrpc-s module, but then it will get json-formatted
results.

To summarize, two big questions to answer:

a) Are you ok to remove the MI code/commands?

b) If yes to a), are you ok to be done for v5.0?

Not providing feedback will be considered as 'yes' for both questions,
so **speak up if you want MI to be kept or delay it removal**.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Daniel-Constantin Mierla
Can you add in kamailio.cfg:

```
log_prefix="{$mt $hdr(CSeq) $ci} "
```

Then reproduce the issue and grab again the log messages with debug=3. It will 
help to track better the messages printed for invite or cancel.

Would be a easy way that I can reproduce it easy without a need to build a 
complex testbed?

-- 
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/872#issuecomment-264178684___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Victor Seva
I'm getting core per pid, no other core was generated.

-- 
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/872#issuecomment-264173705___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:95d5be47: sl: updated the used of old style logging macros

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 95d5be47d77287320c0c4f40be834f636406ff85
URL: 
https://github.com/kamailio/kamailio/commit/95d5be47d77287320c0c4f40be834f636406ff85

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T14:22:48+01:00

sl: updated the used of old style logging macros

---

Modified: modules/sl/sl_funcs.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/95d5be47d77287320c0c4f40be834f636406ff85.diff
Patch: 
https://github.com/kamailio/kamailio/commit/95d5be47d77287320c0c4f40be834f636406ff85.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:ad00a617: sipcapture: fix captid extraction from hep header for v3

2016-12-01 Thread grumvalski
Module: kamailio
Branch: 4.4
Commit: ad00a617dec57073a1e9facc64cf3a64904c6592
URL: 
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592

Author: Federico Cabiddu 
Committer: grumvalski 
Date: 2016-12-01T14:15:34+01:00

sipcapture: fix captid extraction from hep header for v3

(cherry picked from commit 969f4600193139d95b5f876378e0c92d4eab9a7a)

---

Modified: modules/sipcapture/hep.c
Modified: modules/sipcapture/hep.h
Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ad00a617dec57073a1e9facc64cf3a64904c6592.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:6291792e: sipcapture: perform ntohs on src and dst port when payload is not SIP

2016-12-01 Thread grumvalski
Module: kamailio
Branch: 4.4
Commit: 6291792ecaee0bfb1855bf6ba4560e4d6af09f3e
URL: 
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e

Author: Federico Cabiddu 
Committer: grumvalski 
Date: 2016-12-01T14:04:45+01:00

sipcapture: perform ntohs on src and dst port when payload is not SIP

(cherry picked from commit 1fbca28c3a6e90ca478d152e116aca5e64780e9e)

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6291792ecaee0bfb1855bf6ba4560e4d6af09f3e.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 57f1c05..7b2f4b7 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -2285,11 +2285,11 @@ int receive_logging_json_msg(char * buf, unsigned int 
len, struct hep_generic_re
/*source ip*/
sco.source_ip.s = ipstr_src;
sco.source_ip.len = strlen(ipstr_src);
-   sco.source_port = hg->src_port->data;
+   sco.source_port = ntohs(hg->src_port->data);
 
sco.destination_ip.s = ipstr_dst;
sco.destination_ip.len = strlen(ipstr_dst);
-   sco.destination_port = hg->dst_port->data;
+   sco.destination_port = ntohs(hg->dst_port->data);
 
if(heptime && heptime->tv_sec != 0) {
sco.tmstamp = (unsigned long 
long)heptime->tv_sec*100+heptime->tv_usec; /* micro ts */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture fixes (#874)

2016-12-01 Thread Alexandr Dubovikov
@grumvalski yes, please do cherry pick :-)

thank you!

-- 
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/pull/874#issuecomment-264167541___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture fixes (#874)

2016-12-01 Thread Federico Cabiddu
Should I adapt the fixes for 4.4?
Being a fix I'd say yes.

On Thu, Dec 1, 2016 at 1:55 PM, Alexandr Dubovikov  wrote:

> Merged #874 .
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> , or mute
> the thread
> 
> .
>


-- 
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/pull/874#issuecomment-264167239___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:97492c52: Merge pull request #874 from grumvalski/sipcapture-fixes

2016-12-01 Thread GitHub
Module: kamailio
Branch: master
Commit: 97492c5284b4fa5ec3eab123272abbdca67e3447
URL: 
https://github.com/kamailio/kamailio/commit/97492c5284b4fa5ec3eab123272abbdca67e3447

Author: Alexandr Dubovikov 
Committer: GitHub 
Date: 2016-12-01T13:55:30+01:00

Merge pull request #874 from grumvalski/sipcapture-fixes

Sipcapture fixes

---

Modified: modules/sipcapture/hep.c
Modified: modules/sipcapture/hep.h
Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/97492c5284b4fa5ec3eab123272abbdca67e3447.diff
Patch: 
https://github.com/kamailio/kamailio/commit/97492c5284b4fa5ec3eab123272abbdca67e3447.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture fixes (#874)

2016-12-01 Thread Alexandr Dubovikov
thank you!

-- 
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/pull/874#issuecomment-264166812___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:1fbca28c: sipcapture: perform ntohs on src and dst port when payload is not SIP

2016-12-01 Thread grumvalski
Module: kamailio
Branch: master
Commit: 1fbca28c3a6e90ca478d152e116aca5e64780e9e
URL: 
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e

Author: Federico Cabiddu 
Committer: grumvalski 
Date: 2016-11-30T18:23:46+01:00

sipcapture: perform ntohs on src and dst port when payload is not SIP

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1fbca28c3a6e90ca478d152e116aca5e64780e9e.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 19ffbe6..84bc6ed 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -2372,11 +2372,11 @@ int receive_logging_json_msg(char * buf, unsigned int 
len, struct hep_generic_re
/*source ip*/
sco.source_ip.s = ipstr_src;
sco.source_ip.len = strlen(ipstr_src);
-   sco.source_port = hg->src_port->data;
+   sco.source_port = ntohs(hg->src_port->data);
 
sco.destination_ip.s = ipstr_dst;
sco.destination_ip.len = strlen(ipstr_dst);
-   sco.destination_port = hg->dst_port->data;
+   sco.destination_port = ntohs(hg->dst_port->data);
 
if(heptime && heptime->tv_sec != 0) {
sco.tmstamp = (unsigned long 
long)heptime->tv_sec*100+heptime->tv_usec; /* micro ts */


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Sipcapture fixes (#874)

2016-12-01 Thread Alexandr Dubovikov
Merged #874.

-- 
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/pull/874#event-878409246___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:969f4600: sipcapture: fix captid extraction from hep header for v3

2016-12-01 Thread grumvalski
Module: kamailio
Branch: master
Commit: 969f4600193139d95b5f876378e0c92d4eab9a7a
URL: 
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a

Author: Federico Cabiddu 
Committer: grumvalski 
Date: 2016-11-30T18:23:46+01:00

sipcapture: fix captid extraction from hep header for v3

---

Modified: modules/sipcapture/hep.c
Modified: modules/sipcapture/hep.h
Modified: modules/sipcapture/sipcapture.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/969f4600193139d95b5f876378e0c92d4eab9a7a.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Daniel-Constantin Mierla
Are you getting only a corefile (dumping corefiles per pid should be enabled)? 
Because this one looks a bit clean and I want to be sure it is not because 
another core dump was done first and then overwriten.

-- 
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/872#issuecomment-264166126___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio crashes when it receives a 404 reply to an INVITE originated after a 302. (#875)

2016-12-01 Thread Daniel-Constantin Mierla
For a useful backtrace, you have to install debugging symbols, respectively 
kamailio dbg package. Then get the output from gdb for 'bt full' and 'info 
locals'.

-- 
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/875#issuecomment-264164010___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sending repeated CANCEL (#870)

2016-12-01 Thread Daniel-Constantin Mierla
Can you provide the pcap with the traffic for such case as well as the log 
messages from syslog with debug=3 in the kamailio.cfg?

-- 
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/870#issuecomment-264163128___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:0527dea7: modules: readme files regenerated - acc_radius ...

2016-12-01 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 0527dea7022551f45990d5be88731c014a3d050a
URL: 
https://github.com/kamailio/kamailio/commit/0527dea7022551f45990d5be88731c014a3d050a

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2016-12-01T13:17:09+01:00

modules: readme files regenerated - acc_radius ...

---

Modified: modules/acc_radius/README
Modified: modules/http_async_client/README
Modified: modules/ims_qos/README
Modified: modules/ims_usrloc_pcscf/README
Modified: modules/nsq/README
Modified: modules/rtpengine/README
Modified: modules/sdpops/README
Modified: modules/ss7ops/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/0527dea7022551f45990d5be88731c014a3d050a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0527dea7022551f45990d5be88731c014a3d050a.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:25946c10: tm: converted log messages to use macros with prefix

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 25946c1094f495090d0c20c5e4ce84010555bcef
URL: 
https://github.com/kamailio/kamailio/commit/25946c1094f495090d0c20c5e4ce84010555bcef

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T13:13:13+01:00

tm: converted log messages to use macros with prefix

- coherent indentation and whitespacing for msg builder code

---

Modified: modules/tm/t_msgbuilder.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/25946c1094f495090d0c20c5e4ce84010555bcef.diff
Patch: 
https://github.com/kamailio/kamailio/commit/25946c1094f495090d0c20c5e4ce84010555bcef.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio crashes when it receives a 404 reply to an INVITE originated after a 302. (#875)

2016-12-01 Thread surendratiwari3
please give the core dump to debug this more.

-- 
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/875#issuecomment-264157579___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:4991821d: ss7ops: safety check before freeing allocated isup json buffer

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 4991821daf9053cdd68957b18bfa23b8e906a00e
URL: 
https://github.com/kamailio/kamailio/commit/4991821daf9053cdd68957b18bfa23b8e906a00e

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T12:37:06+01:00

ss7ops: safety check before freeing allocated isup json buffer

---

Modified: modules/ss7ops/ss7ops_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4991821daf9053cdd68957b18bfa23b8e906a00e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4991821daf9053cdd68957b18bfa23b8e906a00e.patch

---

diff --git a/modules/ss7ops/ss7ops_mod.c b/modules/ss7ops/ss7ops_mod.c
index 26aaeb6..efeb816 100644
--- a/modules/ss7ops/ss7ops_mod.c
+++ b/modules/ss7ops/ss7ops_mod.c
@@ -61,7 +61,7 @@ struct mtp_level_3_hdr {
  * ss7 module - helper module to convert M2UA/ISUP to JSON
  *
  */
-static const char *isup_last;
+static const char *isup_last = NULL;
 
 static int w_isup_to_json(struct sip_msg* _m, char* param1, char* param2);
 static int pv_get_isup(struct sip_msg *msg, pv_param_t *param, pv_value_t 
*res);
@@ -259,7 +259,7 @@ static int w_isup_to_json(struct sip_msg *_m, char *param1, 
char *param2)
int opc, dpc, mtp_type, int_len, rc;
size_t len;
 
-   free((char *) isup_last);
+   if(isup_last) free((char *) isup_last);
isup_last = NULL;
 
data = fetch_payload(_m, "$var(payload)", _len);


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:49d43d78: ss7ops: fix the dobook markdown and properly named the sections

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 49d43d789eb0cecdfd60c5c43a0cf478e101cd47
URL: 
https://github.com/kamailio/kamailio/commit/49d43d789eb0cecdfd60c5c43a0cf478e101cd47

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T12:37:39+01:00

ss7ops: fix the dobook markdown and properly named the sections

---

Modified: modules/ss7ops/doc/ss7ops_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/49d43d789eb0cecdfd60c5c43a0cf478e101cd47.diff
Patch: 
https://github.com/kamailio/kamailio/commit/49d43d789eb0cecdfd60c5c43a0cf478e101cd47.patch

---

diff --git a/modules/ss7ops/doc/ss7ops_admin.xml 
b/modules/ss7ops/doc/ss7ops_admin.xml
index f38ee6c..fc28573 100644
--- a/modules/ss7ops/doc/ss7ops_admin.xml
+++ b/modules/ss7ops/doc/ss7ops_admin.xml
@@ -35,26 +35,37 @@



-   

-   Parameters
-   
-   isup_to_json (integer)
+   Functions
+   
+   isup_to_json(proto)
+   isup_to_json
+   
+   Pass the HEP protocol type as parameter (e.g. 8 for M2UA) and 
the
+   contained ISUP payload will be converted to a JSON string. The 
result
+   can be accessed using the $isup(1) variable.
+   

-   Pass the HEP type as parameter (e.g. 8 for M2UA) and the 
contained
-   ISUP payload will be converted to a JSON string. It can be 
consumed
-   using the $isup(1) parameter.
+   
+   isup_to_json usage
+   
+...
+isup_to_json(8);
+...
+
+   




-   Functions
+   Variables

-   isup (integer)
+   isup(id)

-   If set to 1, return the JSON representation as string for the 
last
+   If id is set to 1, return the JSON representation as string for 
the last
message that was parsed.


+   
 
 


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:689d1274: tm: fix wrong CRLF position when building local request when reusing received buffer

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 4.4
Commit: 689d12741b86f101d00b1bcd348c3093f47d5158
URL: 
https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T12:22:12+01:00

tm: fix wrong CRLF position when building local request when reusing received 
buffer

- should affect only configs when tm parameters for reparsing request
  were changed from their default value
- reported by Helio Okuyama

(cherry picked from commit 6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd)

---

Modified: modules/tm/t_msgbuilder.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158.diff
Patch: 
https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158.patch

---

diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c
index 09bb6dc..4781a05 100644
--- a/modules/tm/t_msgbuilder.c
+++ b/modules/tm/t_msgbuilder.c
@@ -198,8 +198,8 @@ char *build_local(struct cell *Trans,unsigned int branch,
append_str( p, Trans->cseq_n.s, Trans->cseq_n.len );
append_str( p, " ", 1 );
append_str( p, method, method_len );
-   append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
append_str( p, CRLF, CRLF_LEN );
+   append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
 
if (!is_local(Trans))  {
for ( hdr=Trans->uas.request->headers ; hdr ; hdr=hdr->next )


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:6db0e6b5: tm: fix wrong CRLF position when building local request when reusing received buffer

2016-12-01 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd
URL: 
https://github.com/kamailio/kamailio/commit/6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2016-12-01T12:21:34+01:00

tm: fix wrong CRLF position when building local request when reusing received 
buffer

- should affect only configs when tm parameters for reparsing request
  were changed from their default value
- reported by Helio Okuyama

---

Modified: modules/tm/t_msgbuilder.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd.patch

---

diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c
index 09bb6dc..4781a05 100644
--- a/modules/tm/t_msgbuilder.c
+++ b/modules/tm/t_msgbuilder.c
@@ -198,8 +198,8 @@ char *build_local(struct cell *Trans,unsigned int branch,
append_str( p, Trans->cseq_n.s, Trans->cseq_n.len );
append_str( p, " ", 1 );
append_str( p, method, method_len );
-   append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
append_str( p, CRLF, CRLF_LEN );
+   append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
 
if (!is_local(Trans))  {
for ( hdr=Trans->uas.request->headers ; hdr ; hdr=hdr->next )


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Victor Seva
>  Are you doing async (suspend/continue) in the config?

No

> Back to the issue -- can it be reproduced

Yes, We can

-- 
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/872#issuecomment-264128890___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Daniel-Constantin Mierla
Are you doing async (suspend/continue) in the config? The 8814e5f is somehow 
related to that and I couldn't spot any relation with the report details of the 
issue.

Back to the issue -- can it be reproduced, or it was like one time event?

-- 
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/872#issuecomment-264127452___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] kamailio crashes on CANCEL due to empty reply_lumps (#872)

2016-12-01 Thread Victor Seva
Maybe related to 8814e5fc2e44f792cbff8e83d184034b3d1ebc59 ?

-- 
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/872#issuecomment-264115643___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev