[sr-dev] [kamailio/kamailio] Update README (#1999)

2019-07-02 Thread eddiemos
Remove unnecessary quotation marks in the examples.





 Pre-Submission Checklist



- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ ] 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)

 Checklist:

- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description


You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Update README

-- File Changes --

M src/modules/usrloc/README (4)

-- Patch Links --

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


[sr-dev] git:5.2:f9caee58: usrloc: fix memory leak on DB_ONLY mode on RPC commands

2019-07-02 Thread Henning Westerholt
Module: kamailio
Branch: 5.2
Commit: f9caee5851bfafe195ebf009bd6a51051394c7d5
URL: 
https://github.com/kamailio/kamailio/commit/f9caee5851bfafe195ebf009bd6a51051394c7d5

Author: Victor Seva 
Committer: Henning Westerholt 
Date: 2019-07-02T21:42:39+02:00

usrloc: fix memory leak on DB_ONLY mode on RPC commands

(cherry picked from commit b97bb77265e7bfc5562a664e8a510692ed68b2f8)

---

Modified: src/modules/usrloc/ul_rpc.c

---

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

---

diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c
index 53031799ac..0277bd9595 100644
--- a/src/modules/usrloc/ul_rpc.c
+++ b/src/modules/usrloc/ul_rpc.c
@@ -421,6 +421,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
 
if (rpc->add(ctx, "{", ) < 0)
{
+   release_urecord(rec);
unlock_udomain(dom, );
rpc->fault(ctx, 500, "Internal error creating outer rpc");
return;
@@ -429,6 +430,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
"AoR", ,
"Contacts", )<0)
{
+   release_urecord(rec);
unlock_udomain(dom, );
rpc->fault(ctx, 500, "Internal error creating aor struct");
return;
@@ -439,12 +441,13 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
if (VALID_CONTACT( con, act_time)) {
rpl_tree++;
if (rpc_dump_contact(rpc, ctx, ih, con) == -1) {
+   release_urecord(rec);
unlock_udomain(dom, );
return;
}
}
}
-
+   release_urecord(rec);
unlock_udomain( dom, );
 
if (rpl_tree==0) {
@@ -533,17 +536,20 @@ static void ul_rpc_rm_contact(rpc_t* rpc, void* ctx)
 
ret = get_ucontact( rec, , _ul_cid, _ul_path, 
RPC_UL_CSEQ+1, );
if (ret < 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 500, "Internal error (can't get contact)");
return;
}
if (ret > 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 404, "Contact not found");
return;
}
 
if (delete_ucontact(rec, con) < 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 500, "Internal error (can't delete contact)");
return;


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


[sr-dev] git:5.1:61b9f621: usrloc: fix memory leak on DB_ONLY mode on RPC commands

2019-07-02 Thread Henning Westerholt
Module: kamailio
Branch: 5.1
Commit: 61b9f621223c782a0710c7c589ebee9550b398f7
URL: 
https://github.com/kamailio/kamailio/commit/61b9f621223c782a0710c7c589ebee9550b398f7

Author: Victor Seva 
Committer: Henning Westerholt 
Date: 2019-07-02T21:42:49+02:00

usrloc: fix memory leak on DB_ONLY mode on RPC commands

(cherry picked from commit b97bb77265e7bfc5562a664e8a510692ed68b2f8)

---

Modified: src/modules/usrloc/ul_rpc.c

---

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

---

diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c
index b5522994d4..1398d9be2c 100644
--- a/src/modules/usrloc/ul_rpc.c
+++ b/src/modules/usrloc/ul_rpc.c
@@ -421,6 +421,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
 
if (rpc->add(ctx, "{", ) < 0)
{
+   release_urecord(rec);
unlock_udomain(dom, );
rpc->fault(ctx, 500, "Internal error creating outer rpc");
return;
@@ -429,6 +430,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
"AoR", ,
"Contacts", )<0)
{
+   release_urecord(rec);
unlock_udomain(dom, );
rpc->fault(ctx, 500, "Internal error creating aor struct");
return;
@@ -439,12 +441,13 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
if (VALID_CONTACT( con, act_time)) {
rpl_tree++;
if (rpc_dump_contact(rpc, ctx, ih, con) == -1) {
+   release_urecord(rec);
unlock_udomain(dom, );
return;
}
}
}
-
+   release_urecord(rec);
unlock_udomain( dom, );
 
if (rpl_tree==0) {
@@ -533,17 +536,20 @@ static void ul_rpc_rm_contact(rpc_t* rpc, void* ctx)
 
ret = get_ucontact( rec, , _ul_cid, _ul_path, 
RPC_UL_CSEQ+1, );
if (ret < 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 500, "Internal error (can't get contact)");
return;
}
if (ret > 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 404, "Contact not found");
return;
}
 
if (delete_ucontact(rec, con) < 0) {
+   release_urecord(rec);
unlock_udomain( dom, );
rpc->fault(ctx, 500, "Internal error (can't delete contact)");
return;


___
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] usrloc: fix memory leak on DB_ONLY mode on RPC commands (#1996)

2019-07-02 Thread Henning Westerholt
Merged #1996 into master.

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


Re: [sr-dev] new child module for kamailio, is call "lre"

2019-07-02 Thread Henning Westerholt
Hello Mojtaba,

thank you for the update.

Just one question right now, how does your "lre" module is conceptually 
different than the already existing sipwise rtpengine module?

https://github.com/sipwise/rtpengine

This also does in-kernel forwarding for media data, is mature and 
supports many features already. You control this with the rtpengine 
Kamailio module.

(Answering also to your later reply in this thread)

Of course feel free to cancel your existing pull request if it is 
obselete by some new development. It is good to share your progress or 
questions here on the developer list, if by some reasons (e.g. vacation) 
you don't get a direct reply just send a reminder, as you already did. :-)

Cheers,

Henning

Am 24.06.19 um 13:04 schrieb Mojtaba:
> Hello Everyone,
> In the middle of developing hiops module, another child module has
> grown up. I've been developing another module for Kamailio, I called
> this "lre". It means light-rtp-engine. The concept of this module is
> using the capability of linux-Kernel packet forwarding to forward RTP
> packets between both parties in a session call.
> As far as we know, this new way has some advantage in large VoIP
> networks that are using Kamailio as Proxy or SBC. Regardless of
> transcoding, it could be done by other servers,
> By using this module, Kamailio could handle a lot of concurrent calls
> with RTP. For example in my test-bed scenario, with 2 core of CPU,
> Kamailio could handle more than 1000 concurrent calls, with no issue
> like one-way audio or etc. The consumption of resources was
> incredible. Although I countn't finish the test-bed scenario,  because
> the resources of  SIPP servers, that make the calls, were run out.
> When kamailio starts, this module tries to connect to daemon project.
> The daemon project could be running on the same server with kamailio
> or on another server. The connection between two processes is TCP/IP
> Socket. I have to use libnfnetlink library to control Linux-kernel
> forwarding on the server. This library is the low-level library for
> netfilter related kernel/userspace communication.
> Some configuration in kamailio cfg is like below:
> #!ifdef WITH_LRE
> modparam("lre", "lre_sock", "tcp:192.168.122.108:8080")
> modparam("lre", "start_port", 1)
> modparam("lre", "end_port", 3)
> #!endif
> In some parts of my code, I need some guides to optimize performance of my 
> code.
> The module will be published  soon on GitHub, but for some reason I
> need to remove my old pull-request of hiops module.I will publish it
> again.

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

___
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] After commit ce8d36f latency_limit_db requires us instead of ms (#1956)

2019-07-02 Thread Henning Westerholt
fixed in wiki for devel, 5.2 and 5.1.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1956#issuecomment-507810087___
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] After commit ce8d36f latency_limit_db requires us instead of ms (#1956)

2019-07-02 Thread Henning Westerholt
Closed #1956.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1956#event-2455404247___
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] mongoDB module in kamailio/kamailio-cli doker image (#1995)

2019-07-02 Thread sergey-safarov
I looked current `mongo-c-driver` packaging in alpine dist.
Now `mongo-c-driver` not packaged.
I leave issue open until `mongo-c-driver` merged into 
[`alpinelinux/aports`](https://github.com/alpinelinux/aports/) repo.

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


[sr-dev] git:master:bf0bafd1: uac: docs for reg_gc_interval param

2019-07-02 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: bf0bafd1e63de3427ae7b411eb26fe8bb95eec26
URL: 
https://github.com/kamailio/kamailio/commit/bf0bafd1e63de3427ae7b411eb26fe8bb95eec26

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-07-02T18:37:00+02:00

uac: docs for reg_gc_interval param

---

Modified: src/modules/uac/doc/uac_admin.xml

---

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

---

diff --git a/src/modules/uac/doc/uac_admin.xml 
b/src/modules/uac/doc/uac_admin.xml
index e4971191a8..097609f13f 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -537,6 +537,31 @@ modparam("uac", "reg_active", 0)


 
+   
+   reg_gc_interval (int)
+   
+   Timer interval (in seconds) at which remote 
registrations are cleaned
+   up in case of failure or removed. When setting it take 
in consideration
+   the maximum value for retransmission timeout, this 
param should be greater
+   than it. This value also impacts how ofter the reload 
for remote
+   registrations table can be executed -- the RPC command 
will fail if
+   executed in less than reg_gc_interval value since the 
last reload.
+   
+   
+   
+   The default value is 150 seconds.
+   
+   
+
+   
+   Set reg_gc_interval 
parameter
+   
+...
+modparam("uac", "reg_gc_interval", 60)
+...
+   
+   
+   
 

 


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


[sr-dev] git:master:77b1b52f: uac: new modparam reg_gc_interval

2019-07-02 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 77b1b52fee7939ec1fcd04952d34649569c7233d
URL: 
https://github.com/kamailio/kamailio/commit/77b1b52fee7939ec1fcd04952d34649569c7233d

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-07-02T18:30:48+02:00

uac: new modparam reg_gc_interval

- defined value for garbage collection interval made configurable
- default value 150 (secs) - what was so far

---

Modified: src/modules/uac/uac.c
Modified: src/modules/uac/uac_reg.c

---

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

---

diff --git a/src/modules/uac/uac.c b/src/modules/uac/uac.c
index 53a1b13cdf..217d1628ab 100644
--- a/src/modules/uac/uac.c
+++ b/src/modules/uac/uac.c
@@ -107,6 +107,7 @@ static void mod_destroy(void);
 static int child_init(int rank);
 
 extern int reg_timer_interval;
+extern int _uac_reg_gc_interval;
 
 static pv_export_t mod_pvs[] = {
{ {"uac_req", sizeof("uac_req")-1}, PVT_OTHER, pv_get_uac_req, 
pv_set_uac_req,
@@ -170,6 +171,7 @@ static param_export_t params[] = {
{"reg_keep_callid", INT_PARAM,  
_keep_callid   },
{"reg_random_delay",INT_PARAM,  
_random_delay  },
{"reg_active",  INT_PARAM,  _active_param  
},
+   {"reg_gc_interval", INT_PARAM,  &_uac_reg_gc_interval   
},
{0, 0, 0}
 };
 
diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c
index f75c7cf38a..dfc595f020 100644
--- a/src/modules/uac/uac_reg.c
+++ b/src/modules/uac/uac_reg.c
@@ -58,9 +58,10 @@
 #define UAC_REG_INIT   (1<<4) /* registration initialized */
 
 #define MAX_UACH_SIZE 2048
-#define UAC_REG_GC_INTERVAL150
 #define UAC_REG_TM_CALLID_SIZE 90
 
+int _uac_reg_gc_interval = 150;
+
 typedef struct _reg_uac
 {
unsigned int h_uuid;
@@ -423,9 +424,10 @@ int uac_reg_ht_shift(void)
tn = time(NULL);
 
lock_get(_reg_htable_gc_lock);
-   if(_reg_htable_gc->stime > tn-UAC_REG_GC_INTERVAL) {
+   if(_reg_htable_gc->stime > tn - _uac_reg_gc_interval) {
lock_release(_reg_htable_gc_lock);
-   LM_ERR("shifting the memory table is not possible in less than 
%d secs\n", UAC_REG_GC_INTERVAL);
+   LM_ERR("shifting in-memory table is not possible in less than 
%d secs\n",
+   _uac_reg_gc_interval);
return -1;
}
uac_reg_reset_ht_gc();
@@ -1224,7 +1226,7 @@ void uac_reg_timer(unsigned int ticks)
{
lock_get(_reg_htable_gc_lock);
if(_reg_htable_gc->stime!=0
-   && _reg_htable_gc->stime < tn - 
UAC_REG_GC_INTERVAL)
+   && _reg_htable_gc->stime < tn - 
_uac_reg_gc_interval)
uac_reg_reset_ht_gc();
lock_release(_reg_htable_gc_lock);
}


___
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] TCP ACK is going to different IP then original invite sent (#1998)

2019-07-02 Thread Federico Cabiddu
that's already the case if you use IP addresses in 200 OK => ACK. 
The parameter you are speaking can not be implemented in core modules like tm, 
because that would mean implementing a tracking between transactions which is 
totally out of scope for those modules. Again, mechanisms external external to 
transactions need to be used.

-- 
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/1998#issuecomment-507596287___
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] TCP ACK is going to different IP then original invite sent (#1998)

2019-07-02 Thread Surendra Tiwari
yeah right now we are using dialog module for tracking those things but there 
should be an option to use same tcp connection across the call if connection is 
alive.

-- 
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/1998#issuecomment-507593419___
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] TCP ACK is going to different IP then original invite sent (#1998)

2019-07-02 Thread Federico Cabiddu
I'm afraid that this is perfectly legitimate proxy behavior as per RFC.
If your 200 OK contact contains a FQDN as domain part, the ACK will have it
in the R-URI and Kamailio will forcefully have to resolve it before
relaying and there is no guarantee that the result will be the same.
Also don't forget that ACK is a transaction on its own, if you want to
track down things between INVITE transaction and ACL transaction you have
to use an "external" mechanism, like can using dialog module or htable
module.


On Tue, Jul 2, 2019 at 10:55 AM Surendra Tiwari 
wrote:

> Description
>
> We are converting udp call to tcp call in kamailio. kamailio sending out
> an invite to a destination. Before sending, kamailio resolving that
> destination domain to IP. After receiving invite request, Destination send
> 180 and 200 OK . 200 Ok contact contains the domain name of destination.
> After this kamailio forward those request to next route. kamailio recieved
> the ack from upstream. After reciving the ack from upstream it resolves
> again the domain name to different IP, as domain name have 2 IP's behind.
> Troubleshooting Reproduction Debugging Data
>
> (paste your debugging data here)
>
> Log Messages
>
> (paste your log messages here)
>
> SIP Traffic
>
> (paste your sip traffic here)
>
> Possible Solutions Additional Information
>
>- *Kamailio Version* - output of kamailio -v
>
> (paste your output here)
>
>
>- *Operating System*:
>
> (paste your output here)
>
> —
> You are receiving this because you are subscribed to this 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/issues/1998#issuecomment-507588517___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] TCP ACK is going to different IP then original invite sent (#1998)

2019-07-02 Thread Surendra Tiwari


### Description
We are converting udp call to tcp call in kamailio. kamailio sending out an 
invite to a destination. Before sending, kamailio resolving that destination 
domain to IP. After receiving invite request, Destination send 180 and 200 OK . 
200 Ok contact contains the domain name of destination. After this kamailio 
forward those request to next route. kamailio recieved the ack from upstream. 
After reciving the ack from upstream it resolves again the domain name to 
different IP, as domain name have 2 IP's behind.



### Troubleshooting

 Reproduction



 Debugging Data



```
(paste your debugging data here)
```

 Log Messages



```
(paste your log messages here)
```

 SIP Traffic



```
(paste your sip traffic here)
```

### Possible Solutions



### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
(paste your output here)
```

* **Operating System**:



```
(paste your output here)
```


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