[SR-Users] Kamailio TLS server hello without any client certificate request

2020-01-29 Thread Patrick Murphy

Hey guys - I'm using the following settings on my Kamailio 5.1.1 (x86_64/linux) 
config:

modparam("tls", "low_mem_threshold2", 1024)
modparam("tls", "tls_force_run", 1)
modparam("tls", "tls_disable_compression", 1)
modparam("tls", "ssl_max_send_fragment", 4096)
modparam("tls", "renegotiation", 0)
modparam("tls", "low_mem_threshold1", 2048)
modparam("tls", "require_certificate", 1)

When a client attempts to connect to Kamailio, the server hello it receives 
does *not* contain the client certificate request. And I've noticed that 
kamailio starts with:

tls [tls_domain.c:694]: set_verification(): TLSs: No client 
certificate required and no checks performed
tls [tls_domain.c:320]: fill_missing(): TLSs: require_certificate=0



Any hints?


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


[SR-Users] Kamailio TLS server hello without any client certificate request

2020-01-28 Thread Patrick Murphy
Hey guys - I'm using the following settings on my Kamailio config:

modparam("tls", "low_mem_threshold2", 1024)
modparam("tls", "tls_force_run", 1)
modparam("tls", "tls_disable_compression", 1)
modparam("tls", "ssl_max_send_fragment", 4096)
modparam("tls", "renegotiation", 0)
modparam("tls", "low_mem_threshold1", 2048)
modparam("tls", "require_certificate", 1)

When a client attempts to connect to Kamailio, the server hello it receives 
does *not* contain the client certificate request. And I've noticed that 
kamailio starts with:

tls [tls_domain.c:694]: set_verification(): TLSs: No client 
certificate required and no checks performed
tls [tls_domain.c:320]: fill_missing(): TLSs: require_certificate=0


Complete version output:
kamailio 5.1.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, 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.

Any hints?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siputils add_uri_param not available in KEMI python3

2019-05-15 Thread Patrick Murphy
This seems to have worked:


diff --git src/modules/siputils/siputils.c src/modules/siputils/siputils.c
index f4376cd67..3b2d772a8 100644
--- src/modules/siputils/siputils.c
+++ src/modules/siputils/siputils.c
@@ -480,6 +480,11 @@ static int ki_is_uri(sip_msg_t* msg, str* suri)
  *
  */
 static sr_kemi_t sr_kemi_siputils_exports[] = {
+   { str_init("siputils"), str_init("add_uri_param"),
+   SR_KEMIP_INT, add_uri_param,
+   { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
{ str_init("siputils"), str_init("has_totag"),
SR_KEMIP_INT, has_totag,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,




________
From: sr-users  on behalf of Patrick 
Murphy 
Sent: Wednesday, May 15, 2019 9:41 PM
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] siputils add_uri_param not available in KEMI python3

Hello,

I am using the following version of Kamailio and using app_python3 with KEMI 
but I cannot find any exported function of add_uri_param from the siputils 
module.
Any idea how I can perform: KSR.siputils.add_uri_param("name=value") ?

version: kamailio 5.2.2 (x86_64/linux) 9260a2


Cheers,
Pat.

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


[SR-Users] siputils add_uri_param not available in KEMI python3

2019-05-15 Thread Patrick Murphy
Hello,

I am using the following version of Kamailio and using app_python3 with KEMI 
but I cannot find any exported function of add_uri_param from the siputils 
module.
Any idea how I can perform: KSR.siputils.add_uri_param("name=value") ?

version: kamailio 5.2.2 (x86_64/linux) 9260a2


Cheers,
Pat.

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


[SR-Users] log timestamp granularity

2019-03-28 Thread Patrick Murphy
​Hello - Is there a way I can print current timestamp in milli or microseconds 
in the log file?
Something like: 2019-03-28 04:50:15.379 would be ideal

The closest thing I could find was $TV(Sn)  but it doesn't suit the purpose 
here since its not human readable.

Thanks
Pat
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dispatcher with a naptr address as destination

2018-12-03 Thread Patrick Murphy
Thanks for the fix Daniel,

Any ETA on when this will be backported to 5.2?

From: Daniel-Constantin Mierla 
Sent: Thursday, November 29, 2018 10:54 AM
To: Patrick Murphy; Henning Westerholt; sr-users@lists.kamailio.org
Cc: José Seabra
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination


Hello,


a solution for the moment would be to add a new flag to mark the destination 
for no-keepalive, so it is considered to be active always.


Right now the issue is created by the fact that keepalive is enabled and the 
implementation needs the IP at start up.


However, for NAPTR/SRV records, there can be a different IP returned for each 
query, so it might not bring much benefits to do keepalives in such cases. This 
can be added if someone wants to develop it.


Then, just to refresh, you can do SRV based load balancing without dispatcher, 
it is done by tm and core automatically.


Cheers,
Daniel


On 29.11.18 11:32, Patrick Murphy wrote:
Here you go: https://github.com/kamailio/kamailio/issues/1743

The reason I posted here first was that I wanted to rule out any obvious thing 
I was missing here since there already was a thread open on it.

Cheers,
Pat

From: Henning Westerholt <mailto:h...@kamailio.org>
Sent: Wednesday, November 28, 2018 9:06 PM
To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Cc: Patrick Murphy; José Seabra; mico...@gmail.com<mailto:mico...@gmail.com>
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination

Am Mittwoch, 28. November 2018, 15:06:03 CET schrieb Patrick Murphy:
> I ran into the exact same issue. DNS resolution is just stuck on A records
> for OPTIONS pings irrespective of DNS options. I can see correct DNS
> resolution with kamcmd dns.lookup but kamcmd dispatcher.list command does
> not even list the gateways which have a NAPTR/SRV DNS name.
>
> Dispatching INVITEs also fails because none of the trunks are actually
> loaded in memory for kamailio to process or for me to be able to set its
> state manually to active.
>
> Any plans on fixing this behavior?

Hi Patrick,

the best would be probably to file a issue about this behavior on our GitHub
tracker. Then it could be analyzed in more details.

Best regards,

Henning


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

--
Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio World Conference -- www.kamailioworld.com<http://www.kamailioworld.com>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
www.asipto.com<http://www.asipto.com>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dispatcher with a naptr address as destination

2018-11-29 Thread Patrick Murphy
Here you go: https://github.com/kamailio/kamailio/issues/1743

The reason I posted here first was that I wanted to rule out any obvious thing 
I was missing here since there already was a thread open on it.

Cheers,
Pat

From: Henning Westerholt 
Sent: Wednesday, November 28, 2018 9:06 PM
To: sr-users@lists.kamailio.org
Cc: Patrick Murphy; José Seabra; mico...@gmail.com
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination

Am Mittwoch, 28. November 2018, 15:06:03 CET schrieb Patrick Murphy:
> I ran into the exact same issue. DNS resolution is just stuck on A records
> for OPTIONS pings irrespective of DNS options. I can see correct DNS
> resolution with kamcmd dns.lookup but kamcmd dispatcher.list command does
> not even list the gateways which have a NAPTR/SRV DNS name.
>
> Dispatching INVITEs also fails because none of the trunks are actually
> loaded in memory for kamailio to process or for me to be able to set its
> state manually to active.
>
> Any plans on fixing this behavior?

Hi Patrick,

the best would be probably to file a issue about this behavior on our GitHub
tracker. Then it could be analyzed in more details.

Best regards,

Henning


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dispatcher with a naptr address as destination

2018-11-28 Thread Patrick Murphy
I tested this behavior with versions 4.4.5 as well as 5.1.1

From: Patrick Murphy
Sent: Wednesday, November 28, 2018 2:06 PM
To: José Seabra; mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination

I ran into the exact same issue. DNS resolution is just stuck on A records for 
OPTIONS pings irrespective of DNS options. I can see correct DNS resolution 
with kamcmd dns.lookup but kamcmd dispatcher.list command does not even list 
the gateways which have a NAPTR/SRV DNS name.

Dispatching INVITEs also fails because none of the trunks are actually loaded 
in memory for kamailio to process or for me to be able to set its state 
manually to active.

Any plans on fixing this behavior?

Cheers,
Pat.


From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Friday, November 16, 2018 8:09 AM
To: Kamailio (SER) - Users Mailing List; José Seabra
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination


Hello,

I think the A query you see is done by the part related to doing OPTIONS 
keepalive -- I haven't developed that part, but if I remember correctly I saw 
something like that in the code. Maybe you can disable keepalive via the mod 
param and see if the query is still done.

For routing, dispatcher is not doing any DNS query, just sets the R-URI or 
D-URI and then tm is in charge of resolving the destination address, and there 
should be from NAPTR down, if no transport or port is specified.

Cheers,
Daniel

On 14.11.18 17:25, José Seabra wrote:
Hello all,
I'm trying to use a naptr address as a dispatcher destination and i'm facing 
some issues here.

When i configure a naptr address in dispatcher table, like:
1:1:sip\:proxy-registrar-ci1.fuze.domain:0:0:'':''

I see kamailio making a dns query of type A, but since that this name doesn't 
have any A record configured in dns, kamailio didn't get any positive reply 
from it.

Should't kamailio make dns query by this order?

  1.  NAPTR
  2.  SRV
  3.  A

I noticed also that if the name configured in dispatcher table is resolved 
successfully with A record from dns, then kamailio tries to make a query to 
NAPTR and then SRV services for the exactly same name used for query previously 
done(type A), but only if it gets a positive answer from dns to the A type 
query.

I'm using kamailio version 5.1.0 with the following dns parameters configured:

### DNS Parameters #
dns = no
rev_dns = no
dns_try_ipv6 = no
dns_retr_time = 1
dns_retr_no = 1
dns_cache_del_nonexp = no
dns_cache_flags = 1
dns_cache_gc_interval = 120
dns_cache_init = 1
dns_cache_mem = 1000
dns_cache_negative_ttl = 60
dns_try_naptr = yes
use_dns_cache = on
use_dns_failover = on
dns_srv_lb = yes

Is there something wrongly configured here that can make kamailio behaves like 
that?

Thank you.
Regards
--
Cumprimentos
José Seabra



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio World Conference -- www.kamailioworld.com<http://www.kamailioworld.com>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
www.asipto.com<http://www.asipto.com>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dispatcher with a naptr address as destination

2018-11-28 Thread Patrick Murphy
I ran into the exact same issue. DNS resolution is just stuck on A records for 
OPTIONS pings irrespective of DNS options. I can see correct DNS resolution 
with kamcmd dns.lookup but kamcmd dispatcher.list command does not even list 
the gateways which have a NAPTR/SRV DNS name.

Dispatching INVITEs also fails because none of the trunks are actually loaded 
in memory for kamailio to process or for me to be able to set its state 
manually to active.

Any plans on fixing this behavior?

Cheers,
Pat.


From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Friday, November 16, 2018 8:09 AM
To: Kamailio (SER) - Users Mailing List; José Seabra
Subject: Re: [SR-Users] Dispatcher with a naptr address as destination


Hello,

I think the A query you see is done by the part related to doing OPTIONS 
keepalive -- I haven't developed that part, but if I remember correctly I saw 
something like that in the code. Maybe you can disable keepalive via the mod 
param and see if the query is still done.

For routing, dispatcher is not doing any DNS query, just sets the R-URI or 
D-URI and then tm is in charge of resolving the destination address, and there 
should be from NAPTR down, if no transport or port is specified.

Cheers,
Daniel

On 14.11.18 17:25, José Seabra wrote:
Hello all,
I'm trying to use a naptr address as a dispatcher destination and i'm facing 
some issues here.

When i configure a naptr address in dispatcher table, like:
1:1:sip\:proxy-registrar-ci1.fuze.domain:0:0:'':''

I see kamailio making a dns query of type A, but since that this name doesn't 
have any A record configured in dns, kamailio didn't get any positive reply 
from it.

Should't kamailio make dns query by this order?

  1.  NAPTR
  2.  SRV
  3.  A

I noticed also that if the name configured in dispatcher table is resolved 
successfully with A record from dns, then kamailio tries to make a query to 
NAPTR and then SRV services for the exactly same name used for query previously 
done(type A), but only if it gets a positive answer from dns to the A type 
query.

I'm using kamailio version 5.1.0 with the following dns parameters configured:

### DNS Parameters #
dns = no
rev_dns = no
dns_try_ipv6 = no
dns_retr_time = 1
dns_retr_no = 1
dns_cache_del_nonexp = no
dns_cache_flags = 1
dns_cache_gc_interval = 120
dns_cache_init = 1
dns_cache_mem = 1000
dns_cache_negative_ttl = 60
dns_try_naptr = yes
use_dns_cache = on
use_dns_failover = on
dns_srv_lb = yes

Is there something wrongly configured here that can make kamailio behaves like 
that?

Thank you.
Regards
--
Cumprimentos
José Seabra



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


--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- 
www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- 
www.asipto.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the source

2018-07-26 Thread Patrick Murphy
Thanks Charles!


This has resolved the issue.


Regards

Pat.


From: sr-users  on behalf of Charles 
Chance 
Sent: Thursday, July 26, 2018 1:01:22 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source

Hello,

I have just pushed a fix to master branch and also backported to 5.1.

https://github.com/kamailio/kamailio/commit/a84a3ea618f0e602a8892c37fce7f4e72ab7371c
https://github.com/kamailio/kamailio/commit/e2eda1376def48ab1c78db7a766c1811d19205be

Please confirm if it fixes your issue.

Cheers,

Charles


On 25 July 2018 at 10:31, Patrick Murphy 
mailto:patmur...@outlook.com>> wrote:

Another bit of data:

KDMQ messages flow in the wrong direction i.e. (Node B to A) only for dialog 
state: 5 updates.

And this happens after the actual KDMQ from A to B has already been ack'd with 
a 200 OK.


From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 on behalf of Patrick Murphy 
mailto:patmur...@outlook.com>>
Sent: Tuesday, July 24, 2018 4:43:28 PM

To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source


Hi Charles,


Yes I exit after the handle_dmq function in the request route.


I couldn't spot the looping this time (as it is intermittent), but here is the 
trace of messages that may indicate something weird or unexpected happening 
with DMQ:

The following message came from Node B to A (which should never have originated 
because only A is receiving calls). I am assuming KDMQ will only flow from A 
--> B followed by their acks from B.

KDMQ sip:dia...@no.de.a.ip:5060 SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0
To: 
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de<mailto:7db853960276b4a4-20...@no.de>.a.ip
Content-Length: 50
User-Agent: kamailio (5.1.1 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":3,"h_entry":3521,"h_id":23807,"state":5}


And Node A correctly responded with a 500 because it was not expecting this

SIP/2.0 500 Server Internal Error
Via: SIP/2.0/UDP 
xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0;received=no.de.b.ip
To: ;tag=7bf3c29789337c2087fcbd4083b8683d.147f
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de<mailto:7db853960276b4a4-20...@no.de>.b.ip
User-Agent: kamailio (5.1.1 (x86_64/linux))
Content-Length: 0




Regards,

Owais



From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 on behalf of Charles Chance 
mailto:charles.cha...@sipcentric.com>>
Sent: Tuesday, July 24, 2018 3:46 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source

Hi Pat,

In your config, do you exit immediately after handle_dmq_message()?

Are you able to share with us one of the looped messages, both as it is 
received by B and then as it is sent back to A?

Cheers,

Charles


On 24 July 2018 at 16:05, Patrick Murphy 
mailto:patmur...@outlook.com>> wrote:
Hi,

I am using Kamailio 5.1.1 with DMQ with the following config (relevant parts) 
on 2 nodes.

Node A:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.a.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)


Node B:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.b.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)

"myvoip.local" is a DNS A record that resolves to both the IPs of A and B.

I have the dmq_handle_message(); called if method is of type "KDMQ" in the 
request_route.

Now, in order to test it, I only sent a few calls only on node A.
KDMQ messages flowed to node B and dialog state replicated. But I noticed, node 
B was randomly sending one of the KDMQ dialog messages back to A and receiving 
a 500 "Server Internal Error" back from node A... (for a subset of those calls, 
not all).

Why would this be the case when the nodes correctly recognize their local 
status by the "local: 1" set as seen from dmq.list_nodes

Anyone else experienced this? What could I be doing wrong?


Thanks,
Pat.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




Sipcentric Ltd. Company registered in Englan

Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the source

2018-07-25 Thread Patrick Murphy
Another bit of data:

KDMQ messages flow in the wrong direction i.e. (Node B to A) only for dialog 
state: 5 updates.

And this happens after the actual KDMQ from A to B has already been ack'd with 
a 200 OK.


From: sr-users  on behalf of Patrick 
Murphy 
Sent: Tuesday, July 24, 2018 4:43:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source


Hi Charles,


Yes I exit after the handle_dmq function in the request route.


I couldn't spot the looping this time (as it is intermittent), but here is the 
trace of messages that may indicate something weird or unexpected happening 
with DMQ:

The following message came from Node B to A (which should never have originated 
because only A is receiving calls). I am assuming KDMQ will only flow from A 
--> B followed by their acks from B.

KDMQ sip:dia...@no.de.a.ip:5060 SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0
To: 
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de.a.ip
Content-Length: 50
User-Agent: kamailio (5.1.1 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":3,"h_entry":3521,"h_id":23807,"state":5}


And Node A correctly responded with a 500 because it was not expecting this

SIP/2.0 500 Server Internal Error
Via: SIP/2.0/UDP 
xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0;received=no.de.b.ip
To: ;tag=7bf3c29789337c2087fcbd4083b8683d.147f
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de.b.ip
User-Agent: kamailio (5.1.1 (x86_64/linux))
Content-Length: 0




Regards,

Owais



From: sr-users  on behalf of Charles 
Chance 
Sent: Tuesday, July 24, 2018 3:46 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source

Hi Pat,

In your config, do you exit immediately after handle_dmq_message()?

Are you able to share with us one of the looped messages, both as it is 
received by B and then as it is sent back to A?

Cheers,

Charles


On 24 July 2018 at 16:05, Patrick Murphy 
mailto:patmur...@outlook.com>> wrote:
Hi,

I am using Kamailio 5.1.1 with DMQ with the following config (relevant parts) 
on 2 nodes.

Node A:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.a.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)


Node B:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.b.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)

"myvoip.local" is a DNS A record that resolves to both the IPs of A and B.

I have the dmq_handle_message(); called if method is of type "KDMQ" in the 
request_route.

Now, in order to test it, I only sent a few calls only on node A.
KDMQ messages flowed to node B and dialog state replicated. But I noticed, node 
B was randomly sending one of the KDMQ dialog messages back to A and receiving 
a 500 "Server Internal Error" back from node A... (for a subset of those calls, 
not all).

Why would this be the case when the nodes correctly recognize their local 
status by the "local: 1" set as seen from dmq.list_nodes

Anyone else experienced this? What could I be doing wrong?


Thanks,
Pat.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham 
Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] sipdump excluding dmq exchanges

2018-07-24 Thread Patrick Murphy
Hi


Can we have sipdump only log SIP messages and not KDMQ?


Thanks,

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


Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the source

2018-07-24 Thread Patrick Murphy
Hi Charles,


Yes I exit after the handle_dmq function in the request route.


I couldn't spot the looping this time (as it is intermittent), but here is the 
trace of messages that may indicate something weird or unexpected happening 
with DMQ:

The following message came from Node B to A (which should never have originated 
because only A is receiving calls). I am assuming KDMQ will only flow from A 
--> B followed by their acks from B.

KDMQ sip:dia...@no.de.a.ip:5060 SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0
To: 
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de.a.ip
Content-Length: 50
User-Agent: kamailio (5.1.1 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":3,"h_entry":3521,"h_id":23807,"state":5}


And Node A correctly responded with a 500 because it was not expecting this

SIP/2.0 500 Server Internal Error
Via: SIP/2.0/UDP 
xx.xx.xx.xx:5060;branch=z9hG4bK22af.6d4559b500.0;received=no.de.b.ip
To: ;tag=7bf3c29789337c2087fcbd4083b8683d.147f
From: ;tag=4d8de1338e3b915c083406d1267d5e7bg-1424
CSeq: 10 KDMQ
Call-ID: 7db853960276b4a4-20...@no.de.b.ip
User-Agent: kamailio (5.1.1 (x86_64/linux))
Content-Length: 0




Regards,

Owais



From: sr-users  on behalf of Charles 
Chance 
Sent: Tuesday, July 24, 2018 3:46 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] DMQ with dialog: KDMQ messages being looped back to the 
source

Hi Pat,

In your config, do you exit immediately after handle_dmq_message()?

Are you able to share with us one of the looped messages, both as it is 
received by B and then as it is sent back to A?

Cheers,

Charles


On 24 July 2018 at 16:05, Patrick Murphy 
mailto:patmur...@outlook.com>> wrote:
Hi,

I am using Kamailio 5.1.1 with DMQ with the following config (relevant parts) 
on 2 nodes.

Node A:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.a.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)


Node B:
modparam("dialog", "enable_dmq", 1)
modparam("dmq", "server_address", "sip:no.de.b.ip:5060")
modparam("dmq", "notification_address", "sip:myvoip.local")
modparam("dmq", "multi_notify", 1)

"myvoip.local" is a DNS A record that resolves to both the IPs of A and B.

I have the dmq_handle_message(); called if method is of type "KDMQ" in the 
request_route.

Now, in order to test it, I only sent a few calls only on node A.
KDMQ messages flowed to node B and dialog state replicated. But I noticed, node 
B was randomly sending one of the KDMQ dialog messages back to A and receiving 
a 500 "Server Internal Error" back from node A... (for a subset of those calls, 
not all).

Why would this be the case when the nodes correctly recognize their local 
status by the "local: 1" set as seen from dmq.list_nodes

Anyone else experienced this? What could I be doing wrong?


Thanks,
Pat.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham 
Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users