Re: [SR-Users] Reverse Kamailio Dispatcher order

2022-01-12 Thread Adarsh Chauhan
Hi Henning,

I agree that it shouldn't be a problem to a downstream server however I was 
hoping to have a cleaner solution.
we are deploying Kamailio in containers and have total of 4 so far for high 
availability, so don't want to fire pings at the downstream and also would 
generate unwanted logs.

Regards,
Adarsh Chauhan

From: Henning Westerholt 
Sent: Wednesday, January 12, 2022 8:58 PM
To: Kamailio (SER) - Users Mailing List 
Cc: Adarsh Chauhan 
Subject: RE: Reverse Kamailio Dispatcher order


Hello,



what are your concerns regarding the other set with reverse order? This would 
be surely the simplest solution.

The few pings every minute or so should not be an issue to any server.



Cheers,



Henning



--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com



From: sr-users  On Behalf Of Adarsh Chauhan
Sent: Wednesday, January 12, 2022 1:53 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Reverse Kamailio Dispatcher order



Hi All,



I was looking for a way where i could reverse the order of priority set on 
destinations in dispatcher file.



for eg:

if i have the following file:



1 sip:10.252.168.41:5060;transport=tcp 0 5 # (US)

1 sip:10.252.168.42:5060;transport=tcp 0 4 # (US)

1 sip:10.252.168.43:5060;transport=tcp 0 3 # (EU)

1 sip:10.252.168.44:5060;transport=tcp 0 2 # (EU)



I wanted to use top to bottom when in US region and bottom to top when in EU 
region.



One option is to make another set, however that will force Kamailio to send 
ping (OPTIONS) twice when probing.



Regards,

Adarsh Chauhan
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issues running mongodb command from kamailio

2022-01-12 Thread Henning Westerholt
Hello,

which lines are the line 878 and 879, reported in the error message in your cfg?

Try to simplify this line, e.g., by removing or substitute some parameters or 
function calls to find out the cause.

Cheers,

Henning

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

From: sr-users  On Behalf Of Edo
Sent: Thursday, January 13, 2022 6:27 AM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Issues running mongodb command from kamailio

Hi All,

Please help!
I am getting an error when trying to start kamailio after making some changes 
to the configuration file.

Error is :


rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 47-57: 
'('')' expected (function call)



rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 102: bad 
expression



rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 102: bad 
command



atus=255/EXCEPTION



rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 103: bad 
command



rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 105: bad 
command

 used inside params of another function: xlog



rse error in config file /etc/kamailio/kamailio.cfg, line 879, column 28: use 
of function execution inside params not allowed



Server.
Changes made is :


# Routing to foreign domains



route[SIPOUT] {



if (uri==myself) return;



#Start of change



if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " { \'did\': 
\'2X\' } ", "mgr1")) {



   xlog("response from mongodb is 
[[$mongodb(mgr1=>value)]]\n");



   }

#End of change



append_hf("P-hint: outbound\r\n");



route(RELAY);



exit;



}
Please can someone tell me what I am doing wrong. Error says syntax but I have 
tried many permutations of the suggested syntax with no luck.

Please help

Thanks
--
-
Ekunwe
EDO Network Services, Inc.
Tel: 601.497.3932
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RR balance kamailio

2022-01-12 Thread Henning Westerholt
Hello,

the log you've quoted below is not an error log. The first part "INFO" 
indicates that is is an informational message. If it would be an error, it 
would indicate "ERROR". So you can ignore it if you do not need the outbound 
module (probably not).

Err_log:
Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module 
is not loaded Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[rr_mod.c:188]: mod_init(): outbound module not available

Cheers,

Henning

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

-Original Message-
From: sr-users  On Behalf Of Gokan Atmaca
Sent: Wednesday, January 12, 2022 9:52 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] RR balance kamailio

Hello

I installed kamailio on Ubuntu. The version information is as follows.
(0) I added two dispatcher sip servers. (1) When I enter the parameter as below 
in the configuration file , I get an error as follows. (2) I am getting RR 
module not available error. Packages installed are "kamailio-berkeley-modules, 
kamailio-tls-modules, kamailio-presence-modules"

How can I solve the problem?

(0) version:
version: kamailio 5.5.3 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES, 
TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, 
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 with gcc 9.3.0

(1) Dispatcher list:

{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:X.X.X.X
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 0.00
STD: 0.00
EST: 0.00
MAX: 0
TIMEOUT: 0
}
}
DEST: {
URI: sip:Y.Y.Y.Y
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 0.00
STD: 0.00
EST: 0.00
MAX: 0
TIMEOUT: 0
}
}
}
}
}
}


(2)

if ( method=="INVITE" ) {
ds_select_dst("1","4");
sl_send_reply("100","Trying");
forward();
exit();
}

Err_log:
Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module 
is not loaded Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[rr_mod.c:188]: mod_init(): outbound module not available

--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org 
⠈⠳⣄

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Reverse Kamailio Dispatcher order

2022-01-12 Thread Brian :
Dynamic routing might be the better tool for this job.

Brian.

On Wednesday, January 12, 2022, Adarsh Chauhan 
wrote:
> Hi All,
> I was looking for a way where i could reverse the order of priority set
on destinations in dispatcher file.
> for eg:
> if i have the following file:
> 1 sip:10.252.168.41:5060;transport=tcp 0 5 # (US)
> 1 sip:10.252.168.42:5060;transport=tcp 0 4 # (US)
> 1 sip:10.252.168.43:5060;transport=tcp 0 3 # (EU)
> 1 sip:10.252.168.44:5060;transport=tcp 0 2 # (EU)
> I wanted to use top to bottom when in US region and bottom to top when in
EU region.
> One option is to make another set, however that will force Kamailio to
send ping (OPTIONS) twice when probing.
> Regards,
> Adarsh Chauhan
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Issues running mongodb command from kamailio

2022-01-12 Thread Edo
Hi All,

Please help!
I am getting an error when trying to start kamailio after making some
changes to the configuration file.

Error is :

*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
47-57: '('')' expected (function call)*

*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
102: bad expression*

*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
102: bad command*

*atus=255/EXCEPTION*


*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
103: bad command*


*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
105: bad command*

* used inside params of another function: xlog*

*rse error in config file /etc/kamailio/kamailio.cfg, line 879, column
28: use of function execution inside params not allowed*

*Server.*

Changes made is :

# Routing to foreign domains

route[SIPOUT] {

if (uri==myself) return;

#Start of change

if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " {
\'did\': \'2X\' } ", "mgr1")) {

   xlog("response from mongodb is
[[$mongodb(mgr1=>value)]]\n");

   }

#End of change

append_hf("P-hint: outbound\r\n");

route(RELAY);

exit;

}

Please can someone tell me what I am doing wrong. Error says syntax but I
have tried many permutations of the suggested syntax with no luck.

Please help

Thanks
-- 
-
Ekunwe
EDO Network Services, Inc.
Tel: 601.497.3932
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Reverse Kamailio Dispatcher order

2022-01-12 Thread Julien Chavanton
Hi Adarsh,

You could consider, since they support SIP OPTION, you will be able to
always use most responsive/closest one first :
13” - latency optimized dispatching
http://www.kamailio.net/docs/modules/devel/modules/dispatcher.html




On Tue, Jan 11, 2022 at 11:27 PM Adarsh Chauhan 
wrote:

> Hi All,
>
> I was looking for a way where i could reverse the order of priority set on
> destinations in dispatcher file.
>
> for eg:
> if i have the following file:
>
> 1 sip:10.252.168.41:5060;transport=tcp 0 5 # (US)
> 1 sip:10.252.168.42:5060;transport=tcp 0 4 # (US)
> 1 sip:10.252.168.43:5060;transport=tcp 0 3 # (EU)
> 1 sip:10.252.168.44:5060;transport=tcp 0 2 # (EU)
>
> I wanted to use top to bottom when in US region and bottom to top when in
> EU region.
>
> One option is to make another set, however that will force Kamailio to
> send ping (OPTIONS) twice when probing.
>
> Regards,
> Adarsh Chauhan
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] RR balance kamailio

2022-01-12 Thread Gokan Atmaca
Hello

I installed kamailio on Ubuntu. The version information is as follows.
(0) I added two dispatcher sip servers. (1) When I enter the parameter
as below in the configuration file , I get an error as follows. (2) I
am getting RR module not available error. Packages installed are
"kamailio-berkeley-modules, kamailio-tls-modules,
kamailio-presence-modules"

How can I solve the problem?

(0) version:
version: kamailio 5.5.3 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, 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 with gcc 9.3.0

(1) Dispatcher list:

{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:X.X.X.X
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 0.00
STD: 0.00
EST: 0.00
MAX: 0
TIMEOUT: 0
}
}
DEST: {
URI: sip:Y.Y.Y.Y
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 0.00
STD: 0.00
EST: 0.00
MAX: 0
TIMEOUT: 0
}
}
}
}
}
}


(2)

if ( method=="INVITE" ) {
ds_select_dst("1","4");
sl_send_reply("100","Trying");
forward();
exit();
}

Err_log:
Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[../outbound/api.h:52]: ob_load_api(): unable to import bind_ob -
maybe module is not loaded
Jan 12 12:15:11 kamailio /usr/sbin/kamailio[21241]: INFO: rr
[rr_mod.c:188]: mod_init(): outbound module not available

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Reverse Kamailio Dispatcher order

2022-01-12 Thread Henning Westerholt
Hello,

what are your concerns regarding the other set with reverse order? This would 
be surely the simplest solution.
The few pings every minute or so should not be an issue to any server.

Cheers,

Henning

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

From: sr-users  On Behalf Of Adarsh Chauhan
Sent: Wednesday, January 12, 2022 1:53 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Reverse Kamailio Dispatcher order

Hi All,

I was looking for a way where i could reverse the order of priority set on 
destinations in dispatcher file.

for eg:
if i have the following file:

1 sip:10.252.168.41:5060;transport=tcp 0 5 # (US)
1 sip:10.252.168.42:5060;transport=tcp 0 4 # (US)
1 sip:10.252.168.43:5060;transport=tcp 0 3 # (EU)
1 sip:10.252.168.44:5060;transport=tcp 0 2 # (EU)

I wanted to use top to bottom when in US region and bottom to top when in EU 
region.

One option is to make another set, however that will force Kamailio to send 
ping (OPTIONS) twice when probing.

Regards,
Adarsh Chauhan
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users