Re: [SR-Users] DMQ mem leak issues

2018-08-01 Thread Rogelio Perez
Charles, here you go:

### Routing Logic 

# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }
request_route {

  # per request initial checks
  route(REQINIT);

  #!ifdef ENABLE_KDMQ
  # Handle Kamailio DQM messages
  if (is_method("KDMQ")) {
dmq_handle_message();
  }
  #!endif
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Method Destination Variable

2018-08-01 Thread Daniel-Constantin Mierla
Hello,

the rule behind next hop address: if $dd is set, then it is the address of
the next hop. If $dd is not set, then it is $rd.

But there is a dedicated variable so you do not need to do the IFs for
above, just use $nh(d).

Cheers,
Daniel

On Wed, Aug 1, 2018 at 6:09 PM, Duarte Rocha 
wrote:

> Greetings,
>
> I thought about that but i wasn't sure it would be safe. But, in this
> case, the Request-URI domain will be the only place where Kamailio will
> look to find out the destination right within the dialog right? I'm going
> the statelless way, so that might be the correct answer.
>
> Thanks for your help
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ problems

2018-08-01 Thread Paolo Visintin - evosip.cloud
Hello Charles,
sorry for late reply, we've had some issues rebuilding docker images with
kamailo nightly build!

We are running on our local, private on premise kubernetes cluster so
connections from outside is simply impossible (in dev we are using a
"closed" network system)

I've just tried to :
- open a tcpdump trace in the instance tracing only the DMQ port defined
[5062] - (tcpdump -i eth0 port 5062)
- packet coming from nowhere
- started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)
- seeing this in tcpdump :

root@router-0:/# tcpdump -i eth0 port 5062
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
22:06:44.966991 IP router-0.router.paolo.svc.cluster.local.5062 >
42.100.109.113.5062: UDP, length 497
22:06:45.572084 IP router-0.router.paolo.svc.cluster.local.5062 >
42.100.109.113.5062: UDP, length 497
22:06:46.571875 IP router-0.router.paolo.svc.cluster.local.5062 >
42.100.109.113.5062: UDP, length 497

so seems that kamailio is trying to contact the foreign ip

if i check inside the configuration:
modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)
modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)
modparam("dmq", "multi_notify", 1)
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 15)


...

  if(is_method("KDMQ") && dst_port == DMQ_PORT){
dmq_handle_message();
exit;
  }


and in DMQ_NOTIFICATION_ADDRESS I have :
#!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"

dmq-router-service DNS resolves:
> dmq-router-service.paolo.svc.cluster.local
Server: 10.96.0.10
Address: 10.96.0.10#53

Non-authoritative answer:
Name: dmq-router-service.paolo.svc.cluster.local
Address: 172.28.0.240


so -nowhere- i am able to find 42.100.109.113


and in kamailio log:
13(821) ERROR: dmq [notification_peer.c:599]:
notification_resp_callback_f(): deleting server sip:42.100.109.113:5062
because of failed request



Cheers,

Paolo

2018-07-26 18:14 GMT+02:00 Charles Chance :

> Hi Aleksandar,
>
> The initial depopulation of the nodes (following a period of 'pending'
> state) is due to no response being received from them. Are you able to
> trace the messages to/from one of them to confirm what is happening there?
>
> As for the unrecognised IP, I'm afraid I can't answer that one. It must be
> coming from somewhere - it's just a case of finding out where. Following
> the initial population/depopulation of the node list, DMQ simply repeats
> the process over and over until it eventually connects to one or more other
> nodes. Are you running on a public cloud somewhere or is it your own,
> locally running Kubernetes cluster?
>
> Cheers,
>
> Charles
>
>
> On 26 July 2018 at 15:30, Aleksandar Sosic 
> wrote:
>
>> Hi Charles,
>>
>> We're so glad about the improvements you just committed! Thanks!
>>
>> Now I'm using the latest nightly: 5.2.0~dev6+0~20180726010431.1165+xenial
>> Kamailio starts even if the DNS record does not exist at first, that's
>> great. I'm having this nodes up and running:
>> ```
>> proxy-66f79498cc-8ws6d3/3   Running   0
>> 4m172.28.1.4
>> proxy-66f79498cc-b68dd3/3   Running   0
>> 4m172.28.1.5
>> proxy-66f79498cc-lhbxg3/3   Running   0
>> 4m172.28.1.6
>> proxy-66f79498cc-png6p3/3   Running   0
>> 4m172.28.1.7
>> ```
>>
>> In those 4-5 minutes I've experienced a population and depopulation of
>> the dmq nodes.
>>
>> For example:
>> ```
>> kamcmd> dmq.list_nodes
>> {
>> host: 172.28.1.4
>> port: 5061
>> resolved_ip: 172.28.1.4
>> status: pending
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 172.28.1.6
>> port: 5061
>> resolved_ip: 172.28.1.6
>> status: pending
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 40.100.109.113
>> port: 5061
>> resolved_ip: 40.100.109.113
>> status: pending
>> last_notification: 0
>> local: 0
>> }
>> {
>> host: 172.28.1.5
>> port: 5061
>> resolved_ip: 172.28.1.5
>> status: active
>> last_notification: 0
>> local: 1
>> }
>> ```
>>
>> And after a few seconds only the loca node itself:
>> ```
>> kamcmd> dmq.list_nodes
>> {
>> host: 172.28.1.5
>> port: 5061
>> resolved_ip: 172.28.1.5
>> status: active
>> last_notification: 0
>> local: 1
>> }
>> ```
>> And then again the 3 nodes and the 40.100.109.113 which is a Microsoft
>> IP and I don't know what's doing that IP into my dmq server list.
>>
>> The DNS record is this:
>> ```
>> root@proxy-66f79498cc-b68dd:/# nslookup dmq-proxy-service
>> Server: 10.96.0.10
>> Address: 10.96.0.10#53
>>
>> Non-authoritative answer:
>> Name: dmq-proxy-service.alex.svc.cluster.local
>> Address: 172.28.1.7
>> Name: dmq-proxy-service.alex.svc.cluster.local
>> Address: 172.28.1.6
>> Name: dmq-proxy-service.alex.svc.cluster.local
>> Address: 172.28.1.5
>> Name: dmq-proxy-service.alex.svc.cluster.local
>> Address: 172.28.1.4
>> ```
>> Any clues why that ip is in the 

Re: [SR-Users] DMQ mem leak issues

2018-08-01 Thread Charles Chance
Out of interest, can you show me the beginning of your route block - just
the part where you call dmq_handle_message()?

Cheers,

Charles

On Wed, 1 Aug 2018 at 18:05, Rogelio Perez  wrote:

> Hello,
>
> We had to rollback the changes as dmq_usrloc notifications are not working
> at all with the latest master that includes the DMQ patch.
> On the receiving node we see the following errors:
>
> (394) INFO: 

Re: [SR-Users] DMQ mem leak issues

2018-08-01 Thread Rogelio Perez
Hello,

We had to rollback the changes as dmq_usrloc notifications are not working
at all with the latest master that includes the DMQ patch.
On the receiving node we see the following errors:

(394) INFO: 

Re: [SR-Users] Method Destination Variable

2018-08-01 Thread Duarte Rocha
Greetings,

I thought about that but i wasn't sure it would be safe. But, in this case,
the Request-URI domain will be the only place where Kamailio will look to
find out the destination right within the dialog right? I'm going the
statelless way, so that might be the correct answer.

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


[SR-Users] Final reply code is wrong in case of 302 and 486 busy

2018-08-01 Thread Marco Capetta

Hello,

we have a problem of final reply code in case of 302 and then 486 busy.


This is our scenario:

A, B and C are subscribers.

A --> Kamailio --> B
  Kamailio <---302 B
  Kamailio ---> C
  Kamailio <---486- C
A <---302 Kamailio

Expected behavior: Kamailio should reply to A with 486, as C was busy, 
and not 302.




We have kamailio v5.1.4

In the call to B we set both failure and branch_failure:
    t_on_failure("failure_route");
    t_on_branch_failure("failure_redirect");

in order to handle the 302 redirect per branch with:
    event_route[tm:branch-failure:failure_redirect]
    {
    if($T_reply_code == 301 || $T_reply_code == 302)
    {
    do redirect ...
    }
    }

and the final failure with:
    failure_route[FAILURE_ROUTE_LOCAL]
    {
do something ...
    }

Since we have 'modparam("tm", "failure_reply_mode", 3)' my expectation 
is to get the winning reply from the branch of last step.




Is there any configuration I'm missing?
Since we manage the redirect with a branch-failure, is the winning reply 
calculated in a different way?



Thanks
Marco

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


Re: [SR-Users] Method Destination Variable

2018-08-01 Thread Alex Balashov
Have you tried $rd?

On Wed, Aug 01, 2018 at 04:28:38PM +0100, Duarte Rocha wrote:

> Greetings,
> 
> I have a Kamailio server set up without Registers. I'm using Dispatcher
> module for balancing and selecting the destinations. I need to do some
> changes in the message according to the chosen destination. If it's the
> first INVITE, after Dispatcher operations, i can do it using $dd or $du
> variables. However, in later messages, like a BYE, i can't seem to access
> the method's destination IP.
> 
> Is there any variable that i'm missing? I've tried $route_uri but it only
> returns the kamailio's own IP, since it's the only IP in the "Route" header.
> 
> Thanks in advance,
> 
> Cheers

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

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

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


[SR-Users] Method Destination Variable

2018-08-01 Thread Duarte Rocha
Greetings,

I have a Kamailio server set up without Registers. I'm using Dispatcher
module for balancing and selecting the destinations. I need to do some
changes in the message according to the chosen destination. If it's the
first INVITE, after Dispatcher operations, i can do it using $dd or $du
variables. However, in later messages, like a BYE, i can't seem to access
the method's destination IP.

Is there any variable that i'm missing? I've tried $route_uri but it only
returns the kamailio's own IP, since it's the only IP in the "Route" header.

Thanks in advance,

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


Re: [SR-Users] get_out_socket(): no socket found

2018-08-01 Thread Daniel-Constantin Mierla
Hello,

first just a question to clarify regarding the ip addresses: you edited the
logs to show 2.2.2.2 and 8.8.8.8 instead of real addresses, right? Just to
be sure as 8.8.8.8 is google DNS server and I have seen in the past some
local caching dns systems returning the dns server ip if the domain had now
dns entry (e.g., wrong domain).

Cheers,
Daniel

On Tue, Jul 31, 2018 at 5:54 PM, Ilie Soltanici 
wrote:

> Hi All,
>
> I'm unable to register an extension to the Upstream Provider by using uac
> module.
> Getting the following error:
>
> *Jul 31 15:49:39 k1-core1 k1[13146]: ERROR:  [core/forward.c:181]:
> get_out_socket(): no socket found*
> *Jul 31 15:49:39 k1-core1 k1[13146]: ERROR:  [core/forward.c:183]:
> get_out_socket(): no corresponding socket found for(udp:8.8.8.8:5060
> )*
> *Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: tm [ut.h:317]: uri2dst2(): no
> corresponding socket found for "svr04.nuacom.net "
> af 2 (udp:8.8.8.8:5060 )*
> *Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: tm [uac.c:449]:
> t_uac_prepare(): no socket found*
> *Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: uac [uac_reg.c:1161]:
> uac_reg_update(): failed to send request for [1050]*
>
> Kamailio is listening on 2 interfaces:
> [root@kamailio user]# /usr/local/sbin/kamcmd core.sockets_list
> {
> socket: {
> proto: udp
> address: 10.1.1.11
> ipaddress: 10.1.1.11
> port: 5060
> mcast: no
> mhomed: no
> }
>
> socket: {
> proto: udp
> address: 2.2.2.2
> ipaddress: 2.2.2.2
> port: 5060
> mcast: no
> mhomed: no
> }
>
> mhomed is enabled in the configuration file: *mhomed=1*
>
> I'm not using ' force_send_socket' anywhere in the configuration file.
> This is the uac module configuration:
> modparam("uac", "reg_keep_callid", 1)
> modparam("uac", "reg_contact_addr", "2.2.2.2")
> modparam("uac", "reg_db_url","cluster://kamailio")
>
> If i'm disabling mhomed from configuration file - i don't receive any
> errors - but then kamailio is trying to send the message to the external
> server (8.8.8.8) through internal interface (10.1.1.1).
> Thank You.
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] get_out_socket(): no socket found

2018-08-01 Thread Ilie Soltanici
Hi All,

I'm unable to register an extension to the Upstream Provider by using uac
module.
Getting the following error:

*Jul 31 15:49:39 k1-core1 k1[13146]: ERROR:  [core/forward.c:181]:
get_out_socket(): no socket found*
*Jul 31 15:49:39 k1-core1 k1[13146]: ERROR:  [core/forward.c:183]:
get_out_socket(): no corresponding socket found for(udp:8.8.8.8:5060
)*
*Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: tm [ut.h:317]: uri2dst2(): no
corresponding socket found for "svr04.nuacom.net "
af 2 (udp:8.8.8.8:5060 )*
*Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: tm [uac.c:449]:
t_uac_prepare(): no socket found*
*Jul 31 15:49:39 k1-core1 k1[13146]: ERROR: uac [uac_reg.c:1161]:
uac_reg_update(): failed to send request for [1050]*

Kamailio is listening on 2 interfaces:
[root@kamailio user]# /usr/local/sbin/kamcmd core.sockets_list
{
socket: {
proto: udp
address: 10.1.1.11
ipaddress: 10.1.1.11
port: 5060
mcast: no
mhomed: no
}

socket: {
proto: udp
address: 2.2.2.2
ipaddress: 2.2.2.2
port: 5060
mcast: no
mhomed: no
}

mhomed is enabled in the configuration file: *mhomed=1*

I'm not using ' force_send_socket' anywhere in the configuration file.
This is the uac module configuration:
modparam("uac", "reg_keep_callid", 1)
modparam("uac", "reg_contact_addr", "2.2.2.2")
modparam("uac", "reg_db_url","cluster://kamailio")

If i'm disabling mhomed from configuration file - i don't receive any
errors - but then kamailio is trying to send the message to the external
server (8.8.8.8) through internal interface (10.1.1.1).
Thank You.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamalio in virtual environment

2018-08-01 Thread Fred Posner

On 7/31/18 1:36 PM, AL S wrote:

Hi,


Is recent kamalio release interoperable in virtual environment?




Depends on the environment of course. I've never had a problem with 
VMware systems.


--fred

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