[sr-dev] use key dynamic for xavp

2017-09-27 Thread Luis Azedo
Hi List,


shouldn't this be possible ?


$xavp(ulattrs=>first) = 33;

$var(ccv) = "whatever";
$xavp(ulattrs[0]=>$var(ccv)) = "some value";

when using in the particular case of usrloc attrs, i see the value of the attr 
created as "first" (correct) and "$var(ccv)" which i believe is incorrect, it 
should be "whatever".

thoughts ?



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


[sr-dev] [kamailio/kamailio] v5.0.3: "kamctl domain show" not showing all domains (#1251)

2017-09-27 Thread 00Asgaroth00
### Description

Using the DBTEXT database engine I add a couple domains to the table, issue a 
reload and the attempt to list the domains loaded. The output of the listing 
only shows the 1st entry in the domain table, however, testing with a sip 
client, I can confirm that all domains are actually loaded, it appears that the 
listing of the domains is what is at fault here.

domain data:
```
# cat domain
id(int,auto) domain(string) did(string,null) last_modified(int)
1:testing.one.two:1:1506437399
2:testing.one.three:2:1506437399
3:testing.two.one:3:1506437399
4:testing.two.two:3:1506437399
```

domain showdb
```
# kamctl domain showdb
[1, 'testing.one.two', '1', 1506437399]
[2, 'testing.one.three', '2', 1506437399]
[3, 'testing.two.one', '3', 1506437399]
[4, 'testing.two.two', '3', 1506437399]
```

domain show
```
# kamctl domain show  
{
  "jsonrpc":  "2.0",
  "result": {
"domain": "testing.one.two",
"did":  "1"
  },
  "id": 32341
}
```

If I add some domain attribues the output is different again, data is the same 
above with the addition of some domain attrs.

domain_attrs:
```
# cat domain_attrs
id(int,auto) did(string) name(string) type(int) value(string) last_modified(int)
1:1:test_name:2:test_value:1506535015
```

domain show:
```
# kamctl domain show
{
  "jsonrpc":  "2.0",
  "result": {
"did":  "1",
"attr": "test_name"
  },
  "id": 32468
}
```

I'm using the following version of kamailio, compiled from the kamailio v5.0.3 
src code.

kamailio version:
```
# kamailio -V
version: kamailio 5.0.3 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 17:43:41 Sep 15 2017 with gcc 4.8.5
```

Running onCentOS 7:
```
# uname -a
Linux klb01.home.ie 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 
2017 x86_64 x86_64 x86_64 GNU/Linux
```

Any thoughts?


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


[sr-dev] [kamailio/kamailio] IPOPS is_in_subnet function doesn't match host address in cidr notation (#1250)

2017-09-27 Thread kbdfck
### Description

is_in_subnet function requires subnet param to be network address and fails for 
host address in cidr notation despite it is contained in corresponding subnet.

For example, is_in_subnet("1.2.3.2", "1.2.3.0/30") returns true
but
is_in_subnet("1.2.3.2", "1.2.3.2/30") returns false, although 1.2.3.2 is 
present in 1.2.3.2/30 and 1.2.3.2 is allowed IP of 1.2.3.0/30

Of course, "1.2.3.2/30" this is not actually a subnet specification and rather 
is IP in CIDR notation, but sometimes it is required to check if some IP 
matches specified IP with CIDR.

### Possible Solutions

It would be cool if is_in_subnet take such cases as matches. I think this 
should not break anything, because host IP and CIDR always define network 
containing specified host.
Another solution would be separate function with more relaxed behavior...

This happens on Kamailio 5.1 devel.

-- 
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/1250___
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] ERROR: cnxcc terminate_call(): Error executing dlg_end_dlg command. Return code was [404] (#1051)

2017-09-27 Thread Pepelux
I have the same problem with Kamailio 4.4.6

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


Re: [sr-dev] Next IRC devel meeting

2017-09-27 Thread Daniel-Constantin Mierla
5min to go, just to give everyone a heads up and sync on time zones ...

Cheers,
Daniel


On 27.09.17 10:56, Daniel-Constantin Mierla wrote:
> Hello,
>
> the usual reminder sent few hours before the start of IRC devel meeting
> -- about 5 hours to go till 14:00UTC:
>
>   - https://www.kamailio.org/wiki/devel/irc-meetings/2017b
>
> Cheers,
> Daniel
>
> On 26.09.17 11:15, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> just a reminder for the IRC devel meeting planned for tomorrow. The
>> agenda has quite some content by now, feel free to add other topics
>> relevant for you:
>>
>>   - https://www.kamailio.org/wiki/devel/irc-meetings/2017b
>>
>> It looks like a very interesting session, try to join!
>>
>> Cheers,
>> Daniel
>>
>> On 18.09.17 10:46, Daniel-Constantin Mierla wrote:
>>> Hello,
>>>
>>> to sync properly for the next major release (v5.1.0) and ongoing
>>> development, I propose an IRC devel meeting for next week, on Wednesday,
>>> Sep 27, 2017. An alternative would be the following day, Sep 28, or if
>>> there are many devs that want to attend and cannot do it these days, we
>>> can look at another date. Just propose new day and time.
>>>
>>> I created a wiki page to collect the topics that are wanted to be discussed:
>>>
>>>   - https://www.kamailio.org/wiki/devel/irc-meetings/2017b
>>>
>>> Fell free to add there or reply to the mailing list with what you think
>>> it is relevant to discuss.
>>>
>>> Cheers,
>>> Daniel
>>>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
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] How to enhance the "ASYNC Module" to support for SIP replies (#1247)

2017-09-27 Thread Daniel-Constantin Mierla
Closed #1247.

-- 
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/1247#event-1267819422___
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] How to enhance the "ASYNC Module" to support for SIP replies (#1247)

2017-09-27 Thread Daniel-Constantin Mierla
Use the mailing lists for how to use kamailio (sr-us...@lists.kamailio.org) or 
getting help on understanding kamailio code (sr-dev@lists.kamailio.org). The 
tracker here is for bug reports and proposals for new features.

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


[sr-dev] [kamailio/kamailio] app_python warning about strict-aliasing (#1249)

2017-09-27 Thread Daniel-Constantin Mierla
Tracking here the issue exposed by @linuxmaniac via PR #924, as it was merged 
and then reverted (by #1248), so anyone can be aware of as well as 
comment/propose solutions for it.

>Add "-fno-strict-aliasing" to compilation flags
>
>Fixes a slew of:
>  "dereferencing type-punned pointer will break strict-aliasing rules"
>warnings from GCC for lines of the form:
>  Py_INCREF(Py_True);
>and
>  Py_INCREF(Py_False);
>
>due to the cast from PyIntObject* to PyObject*
>
>GCC is technically correct here; see:
>  http://www.python.org/dev/peps/pep-3123/
>though this is unlikely to lead to non-working machine code.

The initial proposed patch for `src/modules/app_python/Makefile` is:

```

 @@ -22,6 +22,8 @@ ifeq ($(OS), freebsd)
  LIBS+=-pthread
  endif
  
 +# python2 https://www.python.org/dev/peps/pep-3123/
 +DEFS+=-fno-strict-aliasing
  DEFS+=-I${PYTHON_INCDIR}
  DEFS+=-DKAMAILIO_MOD_INTERFACE
```


-- 
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/1249___
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] Revert "app_python: fix compiler warning" (#1248)

2017-09-27 Thread Konstantin M.
Merged #1248.

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


[sr-dev] git:master:1c0dd4cf: Merge pull request #1248 from kamailio/revert-924-vseva/fix_app_python

2017-09-27 Thread GitHub
Module: kamailio
Branch: master
Commit: 1c0dd4cf9cd131ce1844dbbe7dc20f30f5e8a010
URL: 
https://github.com/kamailio/kamailio/commit/1c0dd4cf9cd131ce1844dbbe7dc20f30f5e8a010

Author: Konstantin M 
Committer: GitHub 
Date: 2017-09-27T16:19:09+03:00

Merge pull request #1248 from kamailio/revert-924-vseva/fix_app_python

Revert "app_python: fix compiler warning"

---

Modified: src/modules/app_python/Makefile

---

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

---

diff --git a/src/modules/app_python/Makefile b/src/modules/app_python/Makefile
index 02f5fff664..d1854c12e4 100644
--- a/src/modules/app_python/Makefile
+++ b/src/modules/app_python/Makefile
@@ -22,8 +22,6 @@ ifeq ($(OS), freebsd)
 LIBS+=-pthread
 endif
 
-# python2 https://www.python.org/dev/peps/pep-3123/
-DEFS+=-fno-strict-aliasing
 DEFS+=-I${PYTHON_INCDIR}
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 


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


[sr-dev] git:master:31b9af0c: Revert "app_python: fix compiler warning"

2017-09-27 Thread GitHub
Module: kamailio
Branch: master
Commit: 31b9af0c2c524afc84b2b03d5c2d2bdac8f12daf
URL: 
https://github.com/kamailio/kamailio/commit/31b9af0c2c524afc84b2b03d5c2d2bdac8f12daf

Author: Konstantin M 
Committer: GitHub 
Date: 2017-09-27T16:15:41+03:00

Revert "app_python: fix compiler warning"

---

Modified: src/modules/app_python/Makefile

---

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

---

diff --git a/src/modules/app_python/Makefile b/src/modules/app_python/Makefile
index 02f5fff664..d1854c12e4 100644
--- a/src/modules/app_python/Makefile
+++ b/src/modules/app_python/Makefile
@@ -22,8 +22,6 @@ ifeq ($(OS), freebsd)
 LIBS+=-pthread
 endif
 
-# python2 https://www.python.org/dev/peps/pep-3123/
-DEFS+=-fno-strict-aliasing
 DEFS+=-I${PYTHON_INCDIR}
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 


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


[sr-dev] [kamailio/kamailio] Revert "app_python: fix compiler warning" (#1248)

2017-09-27 Thread Konstantin M.
Reverts kamailio/kamailio#924. Opinion conflict
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Revert "app_python: fix compiler warning"

-- File Changes --

M src/modules/app_python/Makefile (2)

-- Patch Links --

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


[sr-dev] git:master:68876da3: textops: replace body functions exported to kemi framework

2017-09-27 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 68876da3de9211ac493094f012b44f06f327dd1b
URL: 
https://github.com/kamailio/kamailio/commit/68876da3de9211ac493094f012b44f06f327dd1b

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-09-27T14:25:20+02:00

textops: replace body functions exported to kemi framework

---

Modified: src/modules/textops/textops.c

---

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


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


[sr-dev] git:master:43b1f9de: pv: remove unused variable

2017-09-27 Thread Victor Seva
Module: kamailio
Branch: master
Commit: 43b1f9de4538c0739a133c0181a4df97c23c5769
URL: 
https://github.com/kamailio/kamailio/commit/43b1f9de4538c0739a133c0181a4df97c23c5769

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-09-27T14:02:47+02:00

pv: remove unused variable

> pv_core.c: In function 'pv_get_protoid':
> pv_core.c:1259:6: warning: unused variable 's' [-Wunused-variable]
>   str s;
>   ^

---

Modified: src/modules/pv/pv_core.c

---

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

---

diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 2ef7f5f6c8..b087f5ad1b 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -1256,7 +1256,6 @@ int pv_get_proto(struct sip_msg *msg, pv_param_t *param,
 int pv_get_protoid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
 {
-   str s;
if(msg==NULL)
return -1;
 


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


[sr-dev] git:master:91bec00a: kex: fix compiler warning

2017-09-27 Thread Victor Seva
Module: kamailio
Branch: master
Commit: 91bec00a1451f026ccfa5c42d1b945d15ced664e
URL: 
https://github.com/kamailio/kamailio/commit/91bec00a1451f026ccfa5c42d1b945d15ced664e

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-09-27T13:57:54+02:00

kex: fix compiler warning

> core_stats.c: In function 'stats_fetch_all':
> core_stats.c:521:7: warning: 'm' may be used uninitialized in this function 
> [-Wmaybe-uninitialized]
>  if(m==NULL) {
>^
> CC (gcc) [M kex.so]   mod_stats.o

---

Modified: src/modules/kex/core_stats.c

---

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

---

diff --git a/src/modules/kex/core_stats.c b/src/modules/kex/core_stats.c
index fb311f0be4..ad8f42964d 100644
--- a/src/modules/kex/core_stats.c
+++ b/src/modules/kex/core_stats.c
@@ -518,10 +518,10 @@ static void stats_fetch_all(rpc_t* rpc, void* ctx, char* 
stat)
s_statistic.len = strlen(n);
s_stat = get_stat(_statistic);
if (s_stat) {
+   m = get_stat_module(s_stat);
if(m==NULL) {
return;
}
-   m = get_stat_module(s_stat);
for(i=0;  m[i]!=0 && stat[i]!=0; i++) {
if(stat[i]!=m[i]) {
/* module name mismatch */


___
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] app_python: fix compiler warning (#924)

2017-09-27 Thread Daniel-Constantin Mierla
@ezdev128 - the concern is that by doing this hack just to **not see** some 
known warnings due to external code, you hide eventual strict aliasing issues 
in the kamailio module code, so if one adds new code and mixes pointer types, 
it won't be any earning. This can cause unpredictable troubles at runtime.

Anyhow, as I said in my previous comment, I am not using the module and if 
people other devs want it with this one, it's ok for me. But simply merging a 
PR with expressed concerns in comments without any details is not that good 
approach.

-- 
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/924#issuecomment-332494443___
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] app_python: fix compiler warning (#924)

2017-09-27 Thread Konstantin M.
@miconda because I think it's a better way for now, py2 has the int types for 
boolean, py3 is not, this is a cause of. I have the same fix for some months in 
production. 
I did many changes in current code but it's dirty and under NDA (for one 
customer). As soon I will have free time - I will clean the code and push big 
commit to resolve current problems, python3-compability and other bugfixes.


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


[sr-dev] git:master:fcbaac36: textops: replace() and replace_all() exported to kemi framework

2017-09-27 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: fcbaac36dfc755ed52bd3ec8abba4dc52934a348
URL: 
https://github.com/kamailio/kamailio/commit/fcbaac36dfc755ed52bd3ec8abba4dc52934a348

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-09-27T12:15:40+02:00

textops: replace() and replace_all() exported to kemi framework

---

Modified: src/modules/textops/textops.c

---

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


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


[sr-dev] [kamailio/kamailio] How to enhance the "ASYNC Module" to support for SIP replies (#1247)

2017-09-27 Thread rgmaddi
Hi,

I am a newbie to kamailio, trying to understand how async module works.
It is working for request_route. 
I added ANY_ROUTE so as to allow for reply_route block as shown in the snippet 
below.
But the async_route function is not working for reply_route block. How can I 
achieve this.

static cmd_export_t cmds[]={
{"async_route", (cmd_function)w_async_route, 2, fixup_async_route,
0, REQUEST_ROUTE|FAILURE_ROUTE|ANY_ROUTE},
{"async_sleep", (cmd_function)w_async_sleep, 1, fixup_async_sleep,
0, REQUEST_ROUTE|FAILURE_ROUTE|ANY_ROUTE},
{"async_task_route", (cmd_function)w_async_task_route, 1, 
fixup_async_task_route,
0, REQUEST_ROUTE|FAILURE_ROUTE|ANY_ROUTE},
{0, 0, 0, 0, 0, 0}
};




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


[sr-dev] Fwd: Re: [SR-Users] topos and record-route headers

2017-09-27 Thread Giuseppe Pandolfi

Hello Development List,

I forward my problem to you hoping a tip.

thanks in advance for your reply



 Messaggio Inoltrato 
Oggetto:Re: [SR-Users] topos and record-route headers
Data:   Wed, 27 Sep 2017 08:14:57 +
Mittente:   Sergey Safarov 
Rispondi-a: 	Kamailio (SER) - Users Mailing List 


A:  Kamailio (SER) - Users Mailing List 



Sorry my prevision comment is wrong.
I do not knows whats is prevents forward message to Cisco phone.

ср, 27 сент. 2017 г. в 11:05, Sergey Safarov >:


   Please look packets #3010 and #4867
   Then look ticket #1215
    and Daniel comments
   By RFC, the R-URI in ACK (and the other requests within dialog) has
   to be the URI from the Contact of 200ok. But there is the address of
   kamailio, making everything look like a strict routing and actually
   breaking the sip routing.

   According PCAP file kamailio froward reINVITE as strict router.
   Think need to revert back R-URI header.

   Sergey

   ср, 27 сент. 2017 г. в 9:28, Giuseppe Pandolfi
   >:

   Hi,
   the rr header for loopback is added by sipwise... and I don't
   think that it's a problem.
   I tested the same scenario without topos and with same sip flow
   it's all ok.
   Anyway, I created a simple scenario without sipwise and I have
   the same problem with topos.
   I think (but ask you) topos have a bug when receive a request
   (in my case re-invite) into dialog with rr.
   It seems that wen topos receive a request into dialog with rr it
   generate a new aLeg tag different about aLeg tag of initial dialog.
   When topos receive the response it can't match the leg tags and
   then send corrupt response, in my case a 200 Ok without via header.

   New simple call flow:

    UAC Kamailio1       Kamailio2 (topos
   ON)              UAS
   192.168.110.195 192.168.110.124:5062
    192.168.110.124:5060
    192.168.110.124:5080
   
 | | | |
 | --- Invite > | ---
   Invite -> | -- Invite --> |
 | |  record-route:...       |
   a/btpsh-59ca2ba0-3e9e-71  |
 | | | |
 | <- 100/180/200 - | < 100/180/200
   -- | < 100/180/200 --- |
 | | | |
 |  Ack --> | --- Ack
   ---> | --- Ack >|
 | | record-route: ...          |
   a/btpsh-59ca2ba0-3e9e-81    |
 | | | |
 | - Re-Invite --> |  Re-Invite
   ---> |  Re-Invite > |
 | |  record-route: ...     |
   a/btpsh-59ca2ba0-3e9e-91   |
 | | | |
 | <--- 200 --- | <- 200
   - | <- 200 - |
   corrupt      corrupt

From trace I see:

   *handing outgoing request topos receive rr and generate
   as_contact/bs_contact a uuid (tpsh-59ca2ba0-3e9e-71) and add the
   headers to Invite:*
   Sep 26 13:07:15 Pandolfinbk ./kamailio[16030]: DEBUG: topos
   [tps_msg.c:182]: tps_add_headers(): adding to headers(1) - [Via:
   SIP/2.0/UDP
   
192.168.110.124;branch=z9hG4bK1666.2c45551ca5e8d1f3bd8663aed5e6a186.0#015#012]
   Sep 26 13:07:15 Pandolfinbk ./kamailio[16030]: DEBUG: topos
   [tps_msg.c:182]: tps_add_headers(): adding to headers(0) -
   [Contact: 
   #015#012]

   *and it has an error (?):*
   Sep 26 13:07:15 Pandolfinbk ./kamailio[16030]: ERROR: topos
   [tps_storage.c:1254]: tps_db_update_dialog(): no valid dlg uuid

   *handing inbound response without rr and load dialog from db by
   aLeg tag: *
   Sep 26 13:07:15 Pandolfinbk ./kamailio[16030]: DEBUG: topos
   [tps_msg.c:889]: tps_response_received(): loaded dialog a_uuid
   [atpsh-59ca2ba0-3e9e-71]

   *handling outgoing responses (180 and 200ok) and add headers
   with aLeg:*
   Sep 26 13:07:15 Pandolfinbk ./kamailio[16030]: DEBUG: topos
   [tps_msg.c:182]: tps_add_headers(): adding to headers(0) -
   [Contact: 
   #015#012]
   Sep 26 13:07:15 

Re: [sr-dev] Next IRC devel meeting

2017-09-27 Thread Daniel-Constantin Mierla
Hello,

the usual reminder sent few hours before the start of IRC devel meeting
-- about 5 hours to go till 14:00UTC:

  - https://www.kamailio.org/wiki/devel/irc-meetings/2017b

Cheers,
Daniel

On 26.09.17 11:15, Daniel-Constantin Mierla wrote:
> Hello,
>
> just a reminder for the IRC devel meeting planned for tomorrow. The
> agenda has quite some content by now, feel free to add other topics
> relevant for you:
>
>   - https://www.kamailio.org/wiki/devel/irc-meetings/2017b
>
> It looks like a very interesting session, try to join!
>
> Cheers,
> Daniel
>
> On 18.09.17 10:46, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> to sync properly for the next major release (v5.1.0) and ongoing
>> development, I propose an IRC devel meeting for next week, on Wednesday,
>> Sep 27, 2017. An alternative would be the following day, Sep 28, or if
>> there are many devs that want to attend and cannot do it these days, we
>> can look at another date. Just propose new day and time.
>>
>> I created a wiki page to collect the topics that are wanted to be discussed:
>>
>>   - https://www.kamailio.org/wiki/devel/irc-meetings/2017b
>>
>> Fell free to add there or reply to the mailing list with what you think
>> it is relevant to discuss.
>>
>> Cheers,
>> Daniel
>>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


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


[sr-dev] git:master:4bdbf013: pv: new var $csb - shortcut to get the CSeq header body

2017-09-27 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 4bdbf01319f8bc86f1feb9ee0fb995f776cea652
URL: 
https://github.com/kamailio/kamailio/commit/4bdbf01319f8bc86f1feb9ee0fb995f776cea652

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-09-27T09:39:31+02:00

pv: new var $csb - shortcut to get the CSeq header body

---

Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_core.c
Modified: src/modules/pv/pv_core.h

---

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

---

diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index 45531c52d9..5743dd6d4d 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -176,6 +176,9 @@ static pv_export_t mod_pvs[] = {
{{"cs", (sizeof("cs")-1)}, /* */
PVT_OTHER, pv_get_cseq, 0,
0, 0, 0, 0},
+   {{"csb", (sizeof("csb")-1)}, /* */
+   PVT_OTHER, pv_get_cseq_body, 0,
+   0, 0, 0, 0},
{{"ct", (sizeof("ct")-1)}, /* */
PVT_OTHER, pv_get_contact, 0,
0, 0, 0, 0},
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 45d189d74f..2ef7f5f6c8 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -491,6 +491,21 @@ int pv_get_cseq(struct sip_msg *msg, pv_param_t *param,
return pv_get_strval(msg, param, res, &(get_cseq(msg)->number));
 }
 
+int pv_get_cseq_body(struct sip_msg *msg, pv_param_t *param,
+   pv_value_t *res)
+{
+   if(msg==NULL)
+   return -1;
+
+   if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1)
+   || (msg->cseq==NULL)) )
+   {
+   LM_ERR("cannot parse CSEQ header\n");
+   return pv_get_null(msg, param, res);
+   }
+   return pv_get_strval(msg, param, res, >cseq->body);
+}
+
 int pv_get_msg_buf(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
 {
diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h
index 0fd79b7346..898b3a8513 100644
--- a/src/modules/pv/pv_core.h
+++ b/src/modules/pv/pv_core.h
@@ -88,6 +88,9 @@ int pv_get_from_attr(struct sip_msg *msg, pv_param_t *param,
 int pv_get_cseq(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
 
+int pv_get_cseq_body(struct sip_msg *msg, pv_param_t *param,
+   pv_value_t *res);
+
 int pv_get_msg_buf(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
 


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


[sr-dev] git:master:c8e2c77c: pv: new var $prid - get protocol id (int value)

2017-09-27 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: c8e2c77c28a6aed6996c05060fa3d24c3e0a933a
URL: 
https://github.com/kamailio/kamailio/commit/c8e2c77c28a6aed6996c05060fa3d24c3e0a933a

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-09-27T09:33:29+02:00

pv: new var $prid - get protocol id (int value)

---

Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_core.c
Modified: src/modules/pv/pv_core.h

---

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

---

diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index e7afac57b9..45531c52d9 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -304,6 +304,9 @@ static pv_export_t mod_pvs[] = {
{{"pr", (sizeof("pr")-1)}, /* */
PVT_OTHER, pv_get_proto, 0,
0, 0, 0, 0},
+   {{"prid", (sizeof("prid")-1)}, /* */
+   PVT_OTHER, pv_get_protoid, 0,
+   0, 0, 0, 0},
{{"proto", (sizeof("proto")-1)}, /* */
PVT_OTHER, pv_get_proto, 0,
0, 0, 0, 0},
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 34b03a411f..45d189d74f 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -1237,6 +1237,17 @@ int pv_get_proto(struct sip_msg *msg, pv_param_t *param,
return pv_get_strintval(msg, param, res, , (int)msg->rcv.proto);
 }
 
+/* proto id of received message */
+int pv_get_protoid(struct sip_msg *msg, pv_param_t *param,
+   pv_value_t *res)
+{
+   str s;
+   if(msg==NULL)
+   return -1;
+
+   return pv_get_sintval(msg, param, res, (int)msg->rcv.proto);
+}
+
 int pv_get_dset(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
 {
diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h
index ac36ef315a..0fd79b7346 100644
--- a/src/modules/pv/pv_core.h
+++ b/src/modules/pv/pv_core.h
@@ -187,6 +187,9 @@ int pv_get_pai(struct sip_msg *msg, pv_param_t *param,
 int pv_get_proto(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
 
+int pv_get_protoid(struct sip_msg *msg, pv_param_t *param,
+   pv_value_t *res);
+
 int pv_get_dset(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
 


___
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] app_python: fix compiler warning (#924)

2017-09-27 Thread Daniel-Constantin Mierla
@ezdev128 - any specific reason for this merge without clarifying the 
`-fno-strict-aliasing` concerns?

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