Re: [OpenSIPS-Users] suspend transaction

2023-01-03 Thread Bogdan-Andrei Iancu

Hi,

I don't think there was a t_suspend() ever in OpenSIPS. In which version 
were you using it??


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/29/22 6:27 PM, nutxase via Users wrote:

Hi All

i notice this is no longer working in 3.3

if (!t_suspend()) {
   xlog("Failed to suspend transaction\n");
   exit;

any idea what replaced t_suspend?



Sent with Proton Mail  secure email.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Equivalent to Kamailio's cfg_get

2023-01-03 Thread Bogdan-Andrei Iancu

Hi David,

not sure what this cfg_get is suppose to do :(

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/27/22 1:35 PM, David Villasmil wrote:

Hello folks,

Is there such a thing? cfgutils seems to be an alternative, but looks 
like too much for such a simple thing.


Regards,

David Villasmil
email: david.villasmil.w...@gmail.com 


phone: +34669448337

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] RTPPROXY / OPENSIPS

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Wadii,

I haven;t checked the implementation, but the rtpproxy_engage should 
take care of the 183 with SDP. Have you tested it?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/23/22 9:42 PM, Wadii ELMAJDI | Evenmedia wrote:

hello , i do have a question related to rtpproxy module documentation.

The doc describes that rewriting sdp body should happen during either 
INVITE , 200 OK or ACK.
In the case of SDP presence on invite <=> 200 , one should 
rtpproxy_offer during the invite and rtpproxy_answer during the 200 OK.


"Documentation : RewritesSDPbody to ensure that media is passed 
through anRTPproxy. To be invoked on INVITE for the cases the SDPs are 
in INVITE and 200 OK and on 200 OK when SDPs are in 200 OK and ACK."


But sometimes opensips receives a 183 Session Progress containing SDP 
before the 200 which i think is related to earlymedia .
I think those sdp packets should also be rewritten with the right rtp 
proxy ip/port. In which case the doc should mention "SDPs are in 
INVITE and 200 OK /183 Session Progress".


My second question : since we can handle most cases with 
rtpproxy_offer/answer methods, what is the purpose of rtpproxy_engage 
? is it to ease the management i described above ?


Thank you



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] TLS verify client

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Matt,

I guess the "require_cert" should 0 for both domains, right ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/23/22 9:55 PM, L S wrote:

Hi,
We are upgrading from 1.11.5 tls to 3.2.9. In 1.11 we had issues with 
the client certificate so we had to set the following:


# 1.11 parameters
tls_verify_server = 1
tls_verify_client = 0 tls_require_client_certificate = 0

TLS works fine for us with those settings. Now we are trying to 
migrate them to 3.2.9 and having issues. Just wanted to confirm
if the following is correct way to migrate those parameters to 3.2? 
(Just included those parameters - the domains are set up correctly)


Server domain
modparam("tls_mgm", "verify_cert", "[dom1]0")
modparam("tls_mgm", "require_cert", "[dom1]0")

Client domain
modparam("tls_mgm", "verify_cert", "[dom2]1")
modparam("tls_mgm", "require_cert", "[dom2]1")

Thanks,
Matt

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] b2b_logic modules and transport protocol (TCP/TLS) conversion

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Ross,

before creating the client, try to force the outbound socket to a TCP 
one https://opensips.org/Documentation/Script-CoreVar-3-2#socket_out


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/21/22 1:17 PM, Ross McKillop via Users wrote:

Hi,

I’m hoping I’m missing something obvious here (and explain well enough below 
what the problem is) - I can get logs etc if required of course.

I’m using the OpenSIPS b2bua module(s) in a scenario where one side of the leg 
is TCP and the other is TLS as follows.

Host A —TLS--->  OpenSIPS —TCP—> Host B

The configuration is something like the below (variables replaced with what 
they contain for clarity)

b2b_server_new(“s”);
b2b_client_new(“c”, “sip:u...@hostb.example.com:;transport=tcp”, 
“sip:hostb.example.com:;transport=tcp”)
# have also tried the above without the proxy parameter
b2b_init_request(“b2b_ab”, “”, “b2b_ab_request”, “b2b_ab_reply”);

If the incoming A leg is also TCP this works as expected, however if the 
incoming leg is TLS the connection attempt is made to hostb.example.com on port 
5061 (default TLS port, ignoring the  specified in the b2b_client_new call)

The INVITE RURI is correct (e.g. INVITE 
sip:u...@hostb.example.com:;transport=tcp) but the Contact header contains a 
reference to the TLS listening port (e.g. Contact: 
)

As this is acting as a B2BUA I would have expected the Contact to be the TCP 
interface on the opensips, and the INVITE to be sent to the URI (and transport 
protocol) provided in the b2b_init_request in the config.

I’ve also tried setting  b2bl_from_spec_param as follows;

modparam("b2b_logic", 
"b2bl_from_spec_param”,”sip:opensips.example.com:5060;transport=tcp”)

However, this doesn’t change the observed behaviour.

Why is the port and transport selection being ignored, or am I missing 
something?

(All the above is based on opensips 3.3.2, if the behaviour has been 
changed/corrected in 3.4 then accept my apologies, I’ll be trying that shortly, 
but wanted to ask here first in case I was missing something obvious!)

Any insight anyone can offer would be much appreciated.

Best,
Ross
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Wadii,

By internal design, the sql_cacher cannot work with a cache that may 
change the data by itself (like via replication) - in order to properly 
work, sql_cacher MUST be the only one manipulating the data in the cache.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/19/22 4:43 PM, Wadii ELMAJDI | Evenmedia wrote:


Hello ,

I am trying to cache an entire MySQL table containing CLIDs/Clients 
Mapping.
My use case is to check pre every call , if the $fU used belongs to 
the client (via its ip source).
I am using SQL CACHER (ondemand = 0) mode module, my opensips box is 
clustered.
the cached_url for SQL_CACHER is a local collection 
(cachedb_url=local:///clid)


I am getting an error that I cannot use an opensips replicatedcache db :

Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: 
ERROR:sql_cacher:db_init_test_conn: Cannot use an OpenSIPS replicated 
cached
Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: 
ERROR:sql_cacher:mod_init: Failed to validate db conns for cache entry


Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: 
ERROR:core:init_mod: failed to initialize module sql_cacher


Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:core:main: 
error while initializing modules


I can use cachedb_local module elsewhere, all cached data is 
replicated via the cluster with no problem. I don’t see why it causes 
such problem only when using SQLCACHER.


Is there anyway to exclude one specific collection from the 
replication mode ?  is there any better approach for my use case ?


I know I can use REDIS or MongoDB for such use case, but I’m trying to 
lower the numbers of servers to monitor 



Thank you




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Help to Make Call to A Gateway

2023-01-03 Thread Bogdan-Andrei Iancu

Hi,

Take a look at the drouting module [1]. For a working script, see the 
auto-generated cfg [2] , the residential option.



[1] https://opensips.org/html/docs/modules/3.2.x/drouting.html
[2] https://www.opensips.org/Documentation/Generating-Configs-3-2

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/18/22 9:28 PM, Anubhav Singh wrote:

Hi,

I am new to opensips. Can you please help to create dialplan and 
routing to make call with prefix '0' though gateway.


Regards,
Anuhav Singh


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] wss and tls

2023-01-03 Thread Bogdan-Andrei Iancu

Hi,

Check with tcpdump to see what happens at TCP layer - it may be the 
client closing the conn while opensips is performing the accept.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/15/22 6:35 PM, nutxase via Users wrote:

Hi All

I am trying to get tls working with my letsencrypt cert but i keep 
getting this error


ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from 
:47817 failed to accept
Dec 15 16:32:54 [localhost] /usr/sbin/opensips[4373]: 
ERROR:proto_wss:wss_read_req: cannot fix read connection


my config is as follows
loadmodule "tls_openssl.so"

modparam("tls_mgm", "server_domain", "sip")
modparam("tls_mgm", "ca_list", "[sip]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[sip]/etc/opensips/tls/cert.pem")
modparam("tls_mgm", "private_key", "[sip]/etc/opensips/tls/ckey.pem")
modparam("tls_mgm", "require_cert", "[sip]0")
modparam("tls_mgm", "tls_method", "[sip]TLSv1")
modparam("tls_mgm", "verify_cert", "[sip]0")
modparam("tls_mgm", "match_sip_domain", "[sip]*")
modparam("tls_mgm", "match_ip_address", "[sip]*")

modparam("tls_mgm", "client_domain", "sip1")
modparam("tls_mgm", "ca_list", "[sip1]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[sip1]/etc/opensips/tls/cert.pem")
modparam("tls_mgm", "private_key", "[sip1]/etc/opensips/tls/ckey.pem")
modparam("tls_mgm", "require_cert", "[sip1]0")
modparam("tls_mgm", "tls_method", "[sip1]TLSv1")
modparam("tls_mgm", "verify_cert", "[sip1]0")
modparam("tls_mgm", "match_sip_domain", "[sip]*")
modparam("tls_mgm", "match_ip_address", "[sip]*")

loadmodule "proto_wss.so"
modparam("proto_wss", "require_origin", no)
loadmodule "proto_ws.so"
modparam("proto_ws", "require_origin", no)

i have tried wolfssl aswell
any ideas :(


Sent with Proton Mail  secure email.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] mid_registrar and vpn and nat

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Alberto,

Yes, in the registration record the Contact URI is kept as received and 
the "fixed" src IP is stored into the "received" field. Upon lookup the 
contact URI goes into RURI (as you observed) and the "received" goes 
into dst_uri (destination URI) or $du. When OpenSIPS relays, the $du 
takes precedence to the $ru, the requests goes to the right destination.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/14/22 1:50 AM, Alberto wrote:

Hi,
I have a problem with a vpn setup, not really nat, or maybe it's nat...

The setup I have is:
Phone - openvpn - opensips - public internet - asterisk

openvpn subnet: 10.0.0.0/24 
openvpn server: 172.172.0.2/24 
opensips server: 172.172.0.10/24 

In my configuration I have:

loadmodule "mid_registrar.so"
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "received_avp", "$avp(rcv)")
modparam("mid_registrar", "tcp_persistent_flag", 
"TCP_PERSIST_REGISTRATIONS")


if (nat_uac_test(119)) {
  setbflag("NAT");
  if (is_method("REGISTER")) {
    fix_nated_register();
  } else {
    fix_nated_contact();
  }
}

if (is_method("REGISTER")) {
  mid_registrar_save("location", "p0");
  .
}

if ($(tu{uri.param,ctid}) != NULL && mid_registrar_lookup("location")) {
  if (!t_relay()) {
    send_reply(500, "Internal Error");
  }
}

So, when the phone sends a REGISTER to opensips, the contact header 
contains the private ip of the vpn (10.0.0.X/24).
fix_nated_register is able to detect that the ip in the contact is 
different from the source ip and sets the received avp.
But if I do opensips-cli -x mi ul_dump, I see that the contact still 
contains the openvpn ip, and the received field contains the correct 
openvpn ip.
This is a problem because when I do the mid_registrar_lookup, $ru is 
set to the contact, which contains an ip that the opensips server is 
not aware of.
It should instead contain the openvpn server ip (172.172.0.2), that 
could then route the call to the phone.


I tried to change $rd manually, but that just breaks routing for ACK 
messages.

What am I doing wrong?

Thanks


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] special characters on password field

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Andrei,

it looks like some escaping is needed. Please open a bug report (with 
this issue) here https://github.com/OpenSIPS/opensips-cli


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/13/22 1:08 PM, Andrei G. wrote:

Hello,

I'm trying to add a user with password containing % character:

~# opensips-cli -i opensips-1 -f /etc/opensips-cli.cfg -x user 
password 1...@sip.domain.com  '%1234'


ERROR: cannot execute query: UPDATE subscriber SET ha1 = 
'1460228c41f725017708f4f684b7edb1', password = '%1234', ha1b = 
'580f8f81d95fcec5e7044f9aba97868a' WHERE username = '1234' AND domain 
= ' sip.domain.com '
ERROR: (_mysql_exceptions.ProgrammingError) not enough arguments for 
format string
[SQL: UPDATE subscriber SET ha1 = '1460228c41f725017708f4f684b7edb1', 
 password = '%1234', ha1b = '580f8f81d95fcec5e7044f9aba97868a' WHERE 
username = '1234' AND domain = ' sip.domain.com ']
(Background on this error at: http://sqlalche.me/e/f405 
)


Please advice

Thanks
Andrei

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] disabling / filtering some logs

2023-01-03 Thread Bogdan-Andrei Iancu

Hi Kingsley,

Unfortunately that is not possible, you can control via the log_level 
the verbosity of the opensips code (all of it) and via the xlog_level 
the verbosity of the script logs.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/13/22 12:52 PM, Kingsley Tart wrote:

Hi,

Is it possible to filter what gets logged into syslog, with more fine
grained detail than just setting the log level?

I have essentially this code:

if (!validate_dialog()) {
 if ($rc == -4) {
 send_reply(481, "Call does not exist");
 exit;
 } else if (!fix_route_dialog()) {
 xlog("L_WARN", "$cfg_file/$cfg_line @ $Tsm: failed to fix route dialog; 
rc=$rc\n");
 send_reply(488, "Unable to fix dialog");
 exit;
 }

I'm getting loads of entries in opensips.log where validate_dialog()
fails with rc -2 but the call still works because fix_route_dialog() is
successful, eg:

ERROR:dialog:dlg_validate_dialog: failed to validate remote contact: 
dlg=[sip:65.151.23.22:5060] , req=[sip:65.151.23.22:5060;user=phone]

I would prefer to not have opensips.log littered with these, but still
want to see other errors.

Is this possible?

Cheers,
Kingsley.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Cluster (anycast) adds extra hex 00 in the tail to replicated responses.

2023-01-03 Thread Denys Pozniak
Hello!

I'm trying to build a classic anycast cluster topology with two OpenSIPS
nodes, in which requests are processed by one proxy and responses by
another.
The client and server are emulated via baresip.
But I ran into a problem in that the replicated responses have an extra 00
in the tail of the reply (the original reply from baresip UAS does not have
it).

ngrep -x:
#
U 192.168.100.100:5060 -> 192.168.56.103:37279 #5
  53 49 50 2f 32 2e 30 2031 38 30 20 52 69 6e 67SIP/2.0 180 Ring
  69 6e 67 0d 0a 52 65 636f 72 64 2d 52 6f 75 74ing..Record-Rout
  65 3a 20 3c 73 69 70 3a31 39 32 2e 31 36 38 2ee: ..Via
  3a 20 53 49 50 2f 32 2e30 2f 55 44 50 20 31 39: SIP/2.0/UDP 19
  32 2e 31 36 38 2e 35 362e 31 30 33 3a 33 37 322.168.56.103:372
  37 39 3b 72 65 63 65 6976 65 64 3d 31 39 32 2e79;received=192.
  31 36 38 2e 35 36 2e 3130 33 3b 62 72 61 6e 63168.56.103;branc
  68 3d 7a 39 68 47 34 624b 62 65 63 38 65 38 66h=z9hG4bKbec8e8f
  30 32 36 62 65 39 31 3461 3b 72 70 6f 72 74 3d026be914a;rport=
  33 37 32 37 39 0d 0a 546f 3a 20 3c 73 69 70 3a37279..To: ;tag=27e3c218e
  30 65 61 31 32 30 64 0d0a 46 72 6f 6d 3a 20 3c0ea120d..From: <
  73 69 70 3a 32 30 30 4031 39 32 2e 31 36 38 2esip:200@192.168.
  31 30 30 2e 31 30 30 3a35 30 36 30 3e 3b 74 61100.100:5060>;ta
  67 3d 35 36 38 35 66 3338 39 61 39 37 66 65 31g=5685f389a97fe1
  30 32 0d 0a 43 61 6c 6c2d 49 44 3a 20 31 32 3402..Call-ID: 124
  39 37 61 63 37 36 65 3830 34 66 35 36 0d 0a 4397ac76e804f56..C
  53 65 71 3a 20 36 33 3730 37 20 49 4e 56 49 54Seq: 63707 INVIT
  45 0d 0a 53 65 72 76 6572 3a 20 62 61 72 65 73E..Server: bares
  69 70 20 76 32 2e 31 302e 30 20 28 78 38 36 5fip v2.10.0 (x86_
  36 34 2f 4c 69 6e 75 7829 0d 0a 43 6f 6e 74 6164/Linux)..Conta
  63 74 3a 20 3c 73 69 703a 31 30 30 2d 30 78 63ct: ..Allo
  77 3a 20 49 4e 56 49 5445 2c 41 43 4b 2c 42 59w: INVITE,ACK,BY
  45 2c 43 41 4e 43 45 4c2c 4f 50 54 49 4f 4e 53E,CANCEL,OPTIONS
  2c 4e 4f 54 49 46 59 2c53 55 42 53 43 52 49 42,NOTIFY,SUBSCRIB
  45 2c 49 4e 46 4f 2c 4d45 53 53 41 47 45 2c 55E,INFO,MESSAGE,U
  50 44 41 54 45 2c 52 4546 45 52 0d 0a 43 6f 6ePDATE,REFER..Con
  74 65 6e 74 2d 4c 65 6e67 74 68 3a 20 30 0d 0atent-Length: 0..
  0d 0a 00  ...
#

So it throws a Baresip error:
call: SIP Progress: 100 Trying-2 (/)
call: SIP Progress: 100 Giving it a try (/)
call: SIP Progress: 180 Ringing (/)
call: could not decode SDP answer: Bad message [74]

192.168.56.103 - baresip UAC
192.168.56.106 - baresip UAS
192.168.100.100 - anycast OpenSIPS

opensips.cfg (node2):
...
socket = udp:192.168.100.100 anycast
socket= bin:192.168.56.105:5566
...
modparam ("tm", "tm_replication_cluster", 1)
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "my_node_id", 2)
modparam("clusterer", "my_node_info", "cluster_id=1, url=bin:
192.168.56.105:5566")
modparam("clusterer", "neighbor_node_info", "cluster_id=1,node_id=1,url=bin:
192.168.56.104:5566")
modparam("clusterer", "sharing_tag", "vip1/2=active")
...
### Routing Logic 

route{

if ( !mf_process_maxfwd_header(10) ) {
send_reply(483,"Too Many Hops");
exit;
}

sl_send_reply(100, "Trying-2");

if (has_totag()) {

if ( !loose_route() && !t_check_trans() ) {
if ( is_method("ACK") ) {
t_anycast_replicate();
exit;
}
}

t_relay();
exit;
}

if (is_method("CANCEL")) {
if (t_check_trans()) {
t_relay();

} else {
t_anycast_replicate();
}

exit;
}

t_check_trans();

if (!is_method("REGISTER|MESSAGE")) {
record_route();
}

if ( is_method("INVITE") && $si!="5080" ) {
$du = "sip:192.168.56.106:5080";
}

t_relay();
exit;

}

[root@localhost opensips]# opensips -V
version: opensips 3.3.2 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
main.c compiled on 16:12:02 Oct 19 2022 with gcc 4.8.5


-- 

BR,
Denys Pozniak


extra_00.pcap
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users