Re: [sr-dev] [kamailio/kamailio] uac: contact_addr field added into db uacreg table (#2470)

2020-09-07 Thread ovoshlook
@ovoshlook pushed 1 commit.

b3f6e23280e72d790293b80ee752abd0079b7488  revert accidentaly removed empty 
lines and other formatting


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2470/files/9fbed998e03935193c05186325c188271a9f686e..b3f6e23280e72d790293b80ee752abd0079b7488
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.3:8079c537: uac: restore first display name then uri with dialog callback

2020-09-07 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.3
Commit: 8079c537fa34be1ca075617d2b79143cd932e719
URL: 
https://github.com/kamailio/kamailio/commit/8079c537fa34be1ca075617d2b79143cd932e719

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-09-07T20:35:28+02:00

uac: restore first display name then uri with dialog callback

- same as for rr callback, otherwise the new header can be malformed:
the case of initial INVITE with From URI having no angle brackets and goes
out with display name and angle brackets, the ACK for 200ok results with
>From broken when forwarded
- backport of commit efa6c6a9bf13c430d5be5146168d1ded4c39dba7 (master)
- backport of commit 1a49cc015609c8701057d5a9cf50f68db61870c1 (5.4)

---

Modified: src/modules/uac/replace.c

---

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

---

diff --git a/src/modules/uac/replace.c b/src/modules/uac/replace.c
index 8da8fc7441..ebde602595 100644
--- a/src/modules/uac/replace.c
+++ b/src/modules/uac/replace.c
@@ -936,26 +936,6 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
old_uri.len, old_uri.s, new_display->len, 
new_display->s,
new_uri->len, new_uri->s);
 
-   /* duplicate the decoded value */
-   p = pkg_malloc( new_uri->len);
-   if (!p) {
-   LM_ERR("no more pkg mem\n");
-   return;
-   }
-   memcpy( p, new_uri->s, new_uri->len);
-
-   /* build del/add lumps */
-   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
-   if (l==0) {
-   LM_ERR("del lump failed\n");
-   goto free;
-   }
-
-   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
-   LM_ERR("insert new lump failed\n");
-   goto free;
-   }
-
/* deal with display name */
l = 0;
/* first remove the existing display */
@@ -966,8 +946,8 @@ static void replace_callback(struct dlg_cell *dlg, int type,
l = del_lump(msg, body->display.s-msg->buf, body->display.len, 
0);
if (l==0) {
LM_ERR("display del lump failed\n");
-   goto free;
-   }
+   return;
+   }
}
if (new_display->s && new_display->len > 0) {
LM_DBG("inserting display [%.*s]\n",
@@ -976,20 +956,40 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
buf.s = pkg_malloc(new_display->len + 2);
if (buf.s==0) {
LM_ERR("no more pkg mem\n");
-   goto free;
+   return;
}
memcpy( buf.s, new_display->s, new_display->len);
buf.len = new_display->len;
if (l==0 && (l=get_display_anchor(msg, hdr, body, )) == 0) {
LM_ERR("failed to insert anchor\n");
-   goto free2;
+   goto free1;
}
if (insert_new_lump_after(l, buf.s, buf.len, 0) == 0) {
LM_ERR("insert new display lump failed\n");
-   goto free2;
+   goto free1;
}
}
 
+   /* uri - duplicate the decoded value */
+   p = pkg_malloc( new_uri->len);
+   if (!p) {
+   LM_ERR("no more pkg mem\n");
+   return;
+   }
+   memcpy( p, new_uri->s, new_uri->len);
+
+   /* build del/add lumps */
+   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
+   if (l==0) {
+   LM_ERR("del lump failed\n");
+   goto free2;
+   }
+
+   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
+   LM_ERR("insert new lump failed\n");
+   goto free2;
+   }
+
/* register tm callback to change replies,
 * but only if not registered earlier */
if (!(msg->msg_flags & (FL_USE_UAC_FROM|FL_USE_UAC_TO)) &&
@@ -1003,10 +1003,10 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
return;
 
 free2:
-   pkg_free(buf.s);
-
-free:
pkg_free(p);
+
+free1:
+   pkg_free(buf.s);
 }
 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.4:1a49cc01: uac: restore first display name then uri with dialog callback

2020-09-07 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: 1a49cc015609c8701057d5a9cf50f68db61870c1
URL: 
https://github.com/kamailio/kamailio/commit/1a49cc015609c8701057d5a9cf50f68db61870c1

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-09-07T19:48:29+02:00

uac: restore first display name then uri with dialog callback

- same as for rr callback, otherwise the new header can be malformed:
the case of initial INVITE with From URI having no angle brackets and goes
out with display name and angle brackets, the ACK for 200ok results with
>From broken when forwarded

(cherry picked from commit efa6c6a9bf13c430d5be5146168d1ded4c39dba7)

---

Modified: src/modules/uac/replace.c

---

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

---

diff --git a/src/modules/uac/replace.c b/src/modules/uac/replace.c
index c64af52999..3a476a3d82 100644
--- a/src/modules/uac/replace.c
+++ b/src/modules/uac/replace.c
@@ -942,26 +942,6 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
old_uri.len, old_uri.s, new_display->len, 
new_display->s,
new_uri->len, new_uri->s);
 
-   /* duplicate the decoded value */
-   p = pkg_malloc( new_uri->len);
-   if (!p) {
-   PKG_MEM_ERROR;
-   return;
-   }
-   memcpy( p, new_uri->s, new_uri->len);
-
-   /* build del/add lumps */
-   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
-   if (l==0) {
-   LM_ERR("del lump failed\n");
-   goto free;
-   }
-
-   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
-   LM_ERR("insert new lump failed\n");
-   goto free;
-   }
-
/* deal with display name */
l = 0;
/* first remove the existing display */
@@ -972,8 +952,8 @@ static void replace_callback(struct dlg_cell *dlg, int type,
l = del_lump(msg, body->display.s-msg->buf, body->display.len, 
0);
if (l==0) {
LM_ERR("display del lump failed\n");
-   goto free;
-   }
+   return;
+   }
}
if (new_display->s && new_display->len > 0) {
LM_DBG("inserting display [%.*s]\n",
@@ -982,20 +962,40 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
buf.s = pkg_malloc(new_display->len + 2);
if (buf.s==0) {
PKG_MEM_ERROR;
-   goto free;
+   return;
}
memcpy( buf.s, new_display->s, new_display->len);
buf.len = new_display->len;
if (l==0 && (l=get_display_anchor(msg, hdr, body, )) == 0) {
LM_ERR("failed to insert anchor\n");
-   goto free2;
+   goto free1;
}
if (insert_new_lump_after(l, buf.s, buf.len, 0) == 0) {
LM_ERR("insert new display lump failed\n");
-   goto free2;
+   goto free1;
}
}
 
+   /* uri update - duplicate the decoded value */
+   p = pkg_malloc( new_uri->len);
+   if (!p) {
+   PKG_MEM_ERROR;
+   goto free1;
+   }
+   memcpy( p, new_uri->s, new_uri->len);
+
+   /* build del/add lumps */
+   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
+   if (l==0) {
+   LM_ERR("del lump failed\n");
+   goto free2;
+   }
+
+   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
+   LM_ERR("insert new lump failed\n");
+   goto free2;
+   }
+
/* register tm callback to change replies,
 * but only if not registered earlier */
if (!(msg->msg_flags & (FL_USE_UAC_FROM|FL_USE_UAC_TO)) &&
@@ -1009,10 +1009,10 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
return;
 
 free2:
-   pkg_free(buf.s);
-
-free:
pkg_free(p);
+
+free1:
+   pkg_free(buf.s);
 }
 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:efa6c6a9: uac: restore first display name then uri with dialog callback

2020-09-07 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: efa6c6a9bf13c430d5be5146168d1ded4c39dba7
URL: 
https://github.com/kamailio/kamailio/commit/efa6c6a9bf13c430d5be5146168d1ded4c39dba7

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-09-07T19:35:04+02:00

uac: restore first display name then uri with dialog callback

- same as for rr callback, otherwise the new header can be malformed:
the case of initial INVITE with From URI having no angle brackets and goes
out with display name and angle brackets, the ACK for 200ok results with
>From broken when forwarded

---

Modified: src/modules/uac/replace.c

---

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

---

diff --git a/src/modules/uac/replace.c b/src/modules/uac/replace.c
index c64af52999..3a476a3d82 100644
--- a/src/modules/uac/replace.c
+++ b/src/modules/uac/replace.c
@@ -942,26 +942,6 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
old_uri.len, old_uri.s, new_display->len, 
new_display->s,
new_uri->len, new_uri->s);
 
-   /* duplicate the decoded value */
-   p = pkg_malloc( new_uri->len);
-   if (!p) {
-   PKG_MEM_ERROR;
-   return;
-   }
-   memcpy( p, new_uri->s, new_uri->len);
-
-   /* build del/add lumps */
-   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
-   if (l==0) {
-   LM_ERR("del lump failed\n");
-   goto free;
-   }
-
-   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
-   LM_ERR("insert new lump failed\n");
-   goto free;
-   }
-
/* deal with display name */
l = 0;
/* first remove the existing display */
@@ -972,8 +952,8 @@ static void replace_callback(struct dlg_cell *dlg, int type,
l = del_lump(msg, body->display.s-msg->buf, body->display.len, 
0);
if (l==0) {
LM_ERR("display del lump failed\n");
-   goto free;
-   }
+   return;
+   }
}
if (new_display->s && new_display->len > 0) {
LM_DBG("inserting display [%.*s]\n",
@@ -982,20 +962,40 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
buf.s = pkg_malloc(new_display->len + 2);
if (buf.s==0) {
PKG_MEM_ERROR;
-   goto free;
+   return;
}
memcpy( buf.s, new_display->s, new_display->len);
buf.len = new_display->len;
if (l==0 && (l=get_display_anchor(msg, hdr, body, )) == 0) {
LM_ERR("failed to insert anchor\n");
-   goto free2;
+   goto free1;
}
if (insert_new_lump_after(l, buf.s, buf.len, 0) == 0) {
LM_ERR("insert new display lump failed\n");
-   goto free2;
+   goto free1;
}
}
 
+   /* uri update - duplicate the decoded value */
+   p = pkg_malloc( new_uri->len);
+   if (!p) {
+   PKG_MEM_ERROR;
+   goto free1;
+   }
+   memcpy( p, new_uri->s, new_uri->len);
+
+   /* build del/add lumps */
+   l = del_lump( msg, old_uri.s-msg->buf, old_uri.len, 0);
+   if (l==0) {
+   LM_ERR("del lump failed\n");
+   goto free2;
+   }
+
+   if (insert_new_lump_after( l, p, new_uri->len, 0)==0) {
+   LM_ERR("insert new lump failed\n");
+   goto free2;
+   }
+
/* register tm callback to change replies,
 * but only if not registered earlier */
if (!(msg->msg_flags & (FL_USE_UAC_FROM|FL_USE_UAC_TO)) &&
@@ -1009,10 +1009,10 @@ static void replace_callback(struct dlg_cell *dlg, int 
type,
return;
 
 free2:
-   pkg_free(buf.s);
-
-free:
pkg_free(p);
+
+free1:
+   pkg_free(buf.s);
 }
 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] SIP Header 'Replaces' Support in Module RTPENGINE for 3GPP SRVCC functionality (#2473)

2020-09-07 Thread Olle E. Johansson
Closed #2473.

-- 
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/2473#event-3737068157___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] SIP Header 'Replaces' Support in Module RTPENGINE for 3GPP SRVCC functionality (#2473)

2020-09-07 Thread Olle E. Johansson
Please use the mailing list for questions. This is where you go to report 
issues in the software.

-- 
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/2473#issuecomment-688309909___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] SIP Header 'Replaces' Support in Module RTPENGINE for 3GPP SRVCC functionality (#2473)

2020-09-07 Thread Hamid R. Hashmi
Do Module  RTPENGINE Supports 'Replaces' header (RFC 3891), if yes then how to 
use this feature, if no then will module RTPEngine will have support for 
'Replaces' in the near future? I have been using Freeswitch for this 
functionality but facing many difficulties in it.

-- 
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/2473___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio-5.4.0 : Crashes from keepalive module (#2448)

2020-09-07 Thread sagarmalam
Hello 
Please ignore above comment.Fix is working.I picked up wrong branch while 
testing it. Sorry for confusion.
Thanks



-- 
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/2448#issuecomment-688273643___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] msrp: fixed IPv6 address parsing (#2472)

2020-09-07 Thread sergey-safarov
I removed brackets striping and make tests - also work.

-- 
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/2472#issuecomment-688208989___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] msrp: fixed IPv6 address parsing (#2472)

2020-09-07 Thread sergey-safarov
@sergey-safarov pushed 1 commit.

86324f26c1a7ee4e7787225761a49052f0b0a0e0  removed not nessary brackets striping


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2472/files/9dfd940b765e2b2412750eb38ef4120b4db3eaa2..86324f26c1a7ee4e7787225761a49052f0b0a0e0
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] msrp: fixed IPv6 address parsing (#2472)

2020-09-07 Thread sergey-safarov
The issue happens when Kamailio receive MSRP message like
```
MSRP e1df91d477cc632a SEND
To-Path: msrp://3.236.25.4:5060/s.57471.1.1260517458;tcp 
msrp://[2600:1f18:63e1:6937:c504:55a1:e141:6810]:2855/e3e5c58412a3479fb007238b3729403a;tcp
From-Path: msrp://192.168.122.2:2855/88fafa933e5144ffa59e;tcp
Message-ID: f7d1b51d7ec9ad2d
Byte-Range: 1-365/365
Success-Report: no
Failure-Report: no
Content-Type: message/cpim

From: +12134445566 
To: 
DateTime: 2020-09-06T11:07:09.980093+03:00

MIME-Version: 1.0
Content-Type: application/im-iscomposing+xml


activetext
```

Kamailio acts as MSRP relay between IPv4 and IPv6 clients.

-- 
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/2472#issuecomment-688198806___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] msrp: fixed IPv6 address parsing (#2472)

2020-09-07 Thread sergey-safarov
@sergey-safarov pushed 1 commit.

9dfd940b765e2b2412750eb38ef4120b4db3eaa2  msrp: fixed $msrp(srcaddr) output 
when used IPv6


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2472/files/7c855632c7eb0d6bad34774992a919b2c1aedd7d..9dfd940b765e2b2412750eb38ef4120b4db3eaa2
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] uac: contact_addr field added into db uacreg table (#2470)

2020-09-07 Thread ovoshlook
yes indeed
copied description from the socket field and forgot to remove "proto:" part

generated db with the dbschema script as  well

-- 
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/2470#issuecomment-688186828___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] uac: contact_addr field added into db uacreg table (#2470)

2020-09-07 Thread ovoshlook
@ovoshlook pushed 2 commits.

ea36cddcb37e88488979c25ce477670f8483168a  dbschema updated
9fbed998e03935193c05186325c188271a9f686e  updated vie make dbschema


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2470/files/a1bde17266e7c75b6bd94c9232ce99b5cde9f22a..9fbed998e03935193c05186325c188271a9f686e
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] uac: contact_addr field added into db uacreg table (#2470)

2020-09-07 Thread ovoshlook
@ovoshlook pushed 1 commit.

a1bde17266e7c75b6bd94c9232ce99b5cde9f22a  fixed description of the contact_addr


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2470/files/16dce04ba2adfc9eeb9e82b7bcbb4962eccb8dcf..a1bde17266e7c75b6bd94c9232ce99b5cde9f22a
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] uac: contact_addr field added into db uacreg table (#2470)

2020-09-07 Thread Daniel-Constantin Mierla
The examples show that the contact addr field in database can be 
`udp:192.168.0.125:5060`, but from the code seems to be concatenated prefixed 
with `sip:UUID@`, meaning that it can result in 
`sip:UUID@udp:192.168.0.125:5060`, which is invalid SIP uri. Maybe I failed to 
notice where conversion is done.

Then, for database updates, you have to update the xml files from 
`src/lib/srdbb1/schema/` and then do `make dbschema` in the root folder of 
Kamailio to update the sql/db creation files.

-- 
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/2470#issuecomment-688089115___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] msrp: fixed IPv6 address parsing (#2472)

2020-09-07 Thread Daniel-Constantin Mierla
Can you explain where the problem actually happens? Because the patch does not 
seem right, being in the URI parser, making host shorter (skipping [ ]), but 
that is not correct, and can have other side effects. If routing is not 
working, then the fix has to be done in the routing part, not in the SIP uri 
host parsing.

-- 
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/2472#issuecomment-688084562___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev