Re: [OpenSIPS-Users] route_to_carrier using a random gateway
yes thats what I did. On Thu, Sep 12, 2019, 6:53 AM Alexey Kazantsev via Users, < users@lists.opensips.org> wrote: > Dominic, > > so, you use the same weight of gateways for random selection, right? > > > >i tried it it out and looks to be working (random). > >thanks for the help Ben > > > --- > BR, Alexey > http://alexeyka.zantsev.com/ > ___ > 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] route_to_carrier using a random gateway
i tried it it out and looks to be working (random). thanks for the help Ben On Thu, Sep 12, 2019, 5:24 AM Alexey Kazantsev via Users, < users@lists.opensips.org> wrote: > Hi Ben, > > does it mean that the gateways will be selected in random order if they > have the same weight? > > > >You just need to set the carrier flag to use weights for routing and > define the list of gateways with their weights. It’s described in the > Overview section of the dr_routing module documentation here: > https://opensips.org/html/docs/modules/2.4.x/drouting.html#idp165856 .. > > > >Ben Newlin > > > > --- > BR, Alexey > http://alexeyka.zantsev.com/ > ___ > 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] route_to_carrier using a random gateway
Hi, I'm using OpenSIPS 2.4 and I want to use the route_to_carrier from the drouting module to send a call to a random gateway of that carrier instead of using the first one that is defined. for example: carrier1 has gw1 and gw2, I would like to send calls to gw1 and gw2 randomly instead of always sending calls to gw1. >From the documentation of the drouting module it looks as though this is possible, but I could not find an example. thanks in advance for any help ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] mid_registrar not updating exipres when receiving 200 ok
Thanks for the reply Liviu, let me know if I can do anything to help, this is a dev environment so I can try anything on it if it can be usefull. Dominic On Thu, Sep 20, 2018 at 10:11 AM Liviu Chircu wrote: > Hi Dominic, > > The 200 OK returned by OpenSIPS should definitely contain a 120s expiry > time. Thanks for the detailed explanation - I will look into this asap. > > Best regards, > > Liviu Chircu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 20.09.2018 16:29, Dominic wrote: > > Hi all, I have the following setup: > -sip device is registering to OpenSIPS setup as a mid_registrar who then > fowards registers to asterisk once they are authenticated > -OpenSIPS is setup in contact throttling mode with outgoing expires set to > 3600 sec. > > The scenario I came accross is the following: > > "Registration - OpenSips mid_registrar" > >┌─┐ >║"│ >└┬┘ >┌┼┐ > │ ┌┐ ┌┐ >┌┴┐ │OpenSips│ │Asterisk│ > Alice └┘ └┘ > │REGISTER (expires 3600 sec)││ > │───>│ > │ ││ > │ 401 Unauthorized ││ > │<───│ > │ ││ > │REGISTER (expires 3600 sec)││ > │───>│ > │ ││ > │ │ REGISTER (expires 3600 sec)│ > │ │ ───> > │ ││ > │ │ 200 OK (expires 120 sec) │ > │ │ <─── > │ ││ > │ 200 OK (expires 3600 sec) ││ > │<───│ > │ ││ > │ ││ > │ ││ > │ ││ > Alice ┌┐ ┌┐ >┌─┐ │OpenSips│ │Asterisk│ >║"│ └┘ └┘ >└┬┘ >┌┼┐ > │ >┌┴┐ > > > 1-the sip device sends a REGISTER to OpenSIPS (expires 3600) > 2-OpenSIPS authentifies the REGISTER and sends back challenge to the sip > device > 3-sip devices sends authenticated REGISTER to OpenSIPS, here the expires > would normally be changed to 3600 but in this case it was already set at > 3600. > 4-Asterisk receives the REGISTER, alters the expires to 120secs and > replies 200 ok to OpenSIPS > 5-OpenSIPS forwards the 200 ok but with 3600 sec expires. > > My Questions is: > I was expecting OpenSIPS to automatically update the expires in it's > usrloc to 120 seconds and send 120 sec in its 200 ok. Should I be doing > something in a return route for the REGISTERs in order to update that and > send the correct value or should opensips be doing that automatically? > Currently I am calling mid_registrar_save("location") when I receive the > REGISTER but doing nothing when I receive the 200 ok. > > Thanks in advance > Dominic > > > > ___ > Users mailing > listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > ___ > 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] mid_registrar not updating exipres when receiving 200 ok
Hi all, I have the following setup: -sip device is registering to OpenSIPS setup as a mid_registrar who then fowards registers to asterisk once they are authenticated -OpenSIPS is setup in contact throttling mode with outgoing expires set to 3600 sec. The scenario I came accross is the following: "Registration - OpenSips mid_registrar" ┌─┐ ║"│ └┬┘ ┌┼┐ │ ┌┐ ┌┐ ┌┴┐ │OpenSips│ │Asterisk│ Alice └┘ └┘ │REGISTER (expires 3600 sec)││ │───>│ │ ││ │ 401 Unauthorized ││ │<───│ │ ││ │REGISTER (expires 3600 sec)││ │───>│ │ ││ │ │ REGISTER (expires 3600 sec)│ │ │ ───> │ ││ │ │ 200 OK (expires 120 sec) │ │ │ <─── │ ││ │ 200 OK (expires 3600 sec) ││ │<───│ │ ││ │ ││ │ ││ │ ││ Alice ┌┐ ┌┐ ┌─┐ │OpenSips│ │Asterisk│ ║"│ └┘ └┘ └┬┘ ┌┼┐ │ ┌┴┐ 1-the sip device sends a REGISTER to OpenSIPS (expires 3600) 2-OpenSIPS authentifies the REGISTER and sends back challenge to the sip device 3-sip devices sends authenticated REGISTER to OpenSIPS, here the expires would normally be changed to 3600 but in this case it was already set at 3600. 4-Asterisk receives the REGISTER, alters the expires to 120secs and replies 200 ok to OpenSIPS 5-OpenSIPS forwards the 200 ok but with 3600 sec expires. My Questions is: I was expecting OpenSIPS to automatically update the expires in it's usrloc to 120 seconds and send 120 sec in its 200 ok. Should I be doing something in a return route for the REGISTERs in order to update that and send the correct value or should opensips be doing that automatically? Currently I am calling mid_registrar_save("location") when I receive the REGISTER but doing nothing when I receive the 200 ok. Thanks in advance Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] mid_registrar unregister on expire
i think I may have figured it out, OpenSIPS is behaving properly (it sends the unregister after expiery) I haden't seen it initially in the asterisk CLI. However the issue is that it looks like asterisk continues to send it's SIP OPTIONS to that peer and OpenSIPS replies 404 not found and then asterisk thinks that peer is still "alive" because he received a response, therefore I still si that peer in the list show peers list. Here is what I see in the asterisk CLI: [Sep 12 11:16:05] -- Unregistered SIP 'jit000106258'<=== OpenSips > sends unregister after exiery > [Sep 12 11:16:07] NOTICE[16484]: chan_sip.c:23898 > handle_response_peerpoke: Peer 'jit000106258' is now Reachable. (2ms / > 5000ms) <== asterisk sends 404 in reply to SIP OPTION > sipdev1-mtl*CLI> sip show peers > Name/username HostDyn > Forcerport ComediaACL Port Status > Description Realtime > jit000106258/jit000106258 64.254.249.190 D > YesYes A 5060 OK (2 > ms)Cached RT > ... > Sorry for the initial email, I had not looked properly on my end before submitting. On Wed, Sep 12, 2018 at 9:58 AM Liviu Chircu wrote: > Hi Dominic, > > This should be working -- are you able to reproduce this problem? Also, > any setup details (binary version, mid-registrar modparams, SIP traces) > would be of great help. > > Best regards, > > Liviu Chircu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 12.09.2018 16:52, Dominic wrote: > > Hi, I setup OpenSIPs as a mid_registrar in contact throttling mode, in > front of an asterisk server. Everything is working fine so far exept that I > would like for when an entry in usrloc expires on the OpenSIPS, that an > unregister is sent to the Asterisk. Right now, I see the sip device > registered on the asterisk (sip show peers) but it is expired on OpenSIPS > (opensipsctl ul show). Could anyone point me in the right direction? > > Thanks > Dominic > > > ___ > Users mailing > listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > ___ > 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] mid_registrar unregister on expire
Hi, I setup OpenSIPs as a mid_registrar in contact throttling mode, in front of an asterisk server. Everything is working fine so far exept that I would like for when an entry in usrloc expires on the OpenSIPS, that an unregister is sent to the Asterisk. Right now, I see the sip device registered on the asterisk (sip show peers) but it is expired on OpenSIPS (opensipsctl ul show). Could anyone point me in the right direction? Thanks Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] help setting up TLS
I got opensips to start by removing the "server_domain" part, following that I had an issue where opensips was unable use the private key and had this in the log: Sep 5 09:25:14 opensips-test-mtl opensips[74857]: ERROR:tls_mgm:load_private_key: unable to load private key file '/usr/src/opensips-2.4.1/tls_cnf/tls/rootCA/private/cakey.pem'. #012Retry (2 left) (check password case) Sep 5 09:25:14 opensips-test-mtl opensips[74857]: ERROR:tls_mgm:load_private_key: unable to load private key file '/usr/src/opensips-2.4.1/tls_cnf/tls/rootCA/private/cakey.pem'. #012Retry (1 left) (check password case) Sep 5 09:25:14 opensips-test-mtl opensips[74857]: ERROR:tls_mgm:load_private_key: unable to load private key file '/usr/src/opensips-2.4.1/tls_cnf/tls/rootCA/private/cakey.pem'. #012Retry (0 left) (check password case) I then found this post: https://github.com/OpenSIPS/opensips/issues/987 and tried the solution given (removing the passphrase from the key) which worked. Thanks for your help, now I will need to play around with this a bit more to get something more secure. On Wed, Sep 5, 2018 at 5:59 AM Callum Guy wrote: > Can you confirm the contents of 'something.com:/usr/src/ > opensips-2.4.1/tls_cnf/tls/rootCA/cacert.pem' and that opensips daemon > user has access to the path? > > You don't need to setup client and server domains if you are just testing, > *but > you do need to be using tls_mgm* ( > http://www.opensips.org/html/docs/modules/devel/tls_mgm.html): > > Here is an example strong configuration which might get you started - put > the certs where you have them, ensure they are accessible and perhaps > comment out the strong ciphers etc while testing, as per the example: > > listen=tls:your_serv_IP:5061 > loadmodule "proto_tls.so" > loadmodule "proto_udp.so" > loadmodule "tls_mgm.so" > > # TLS: Default configuration > modparam("tls_mgm", "certificate", > "/etc/pki/tls/certs/this-domain.sip.crt") > modparam("tls_mgm", "private_key", > "/etc/pki/tls/private/this-domain.sip.key") > modparam("tls_mgm", "ca_list", "/etc/pki/tls/certs/ca-bundle.crt") > modparam("tls_mgm", "ca_dir", "/etc/pki/tls/certs/") > # Define standards: > #modparam("tls_mgm", "ciphers_list", > "EECDH+AESGCM,EDH+AESGCM,AES256+EECDH,AES256+EDH") > #modparam("tls_mgm", "verify_cert", "1") > #modparam("tls_mgm", "require_cert", "1") > #modparam("tls_mgm", "tls_method", "TLSv1_2") > #modparam("tls_mgm", "dh_params", "/etc/pki/tls/certs/dhparam.pem") > #modparam("tls_mgm", "ec_curve", "secp384r1") > > > > On Tue, Sep 4, 2018 at 6:57 PM Dominic wrote: > >> Hi all, I'm currently trying to setup OpenSIPS to use tls. For this I am >> following the steps described here: >> http://www.opensips.org/Documentation/Tutorials-TLS-2-2 >> >> This is a dev box, so for now I just want to get things working, my setup >> is as follows: >> UACs are registering to Opensips, which is setup as a mid-registrar in >> front of asterisk. Rtpproxy is used on a different box to relay the rtp >> between the UACs and Asterisk. >> >> I followed the steps described in the tutorial mentioned above but I >> cannot get opensips to startup. So I have a few questions regarding the >> tutorial: >> >> question 1: >> If my opensips is only accepting connections (phones registering to it >> from the internet), then I presume I only need the server domain part in >> the following part of the tutorial?: >> >> #server domain >> modparam("proto_tls", "server_domain", "sv_dom=:") >> modparam("proto_tls", "certificate", "sv_dom:$CERT_DIR/rootCA/cacert.pem") >> modparam("proto_tls", "private_key", >> "sv_dom:$CERT_DIR/rootCA/private/cakey.pem") >> modparam("proto_tls", "ca_list", "sv_dom:$CERT_DR/rootCA/cacert.pem") >> >> #client domain >> modparam("proto_tls", "client_domain", "cl_dom=:") >> modparam("proto_tls", "certificate", "cl_dom:$CERT_DIR/user/user-cert.pem") >> modparam("proto_tls", "private_key", >> "cl_dom:$CERT_DIR/user/user-privkey.pem") >> modparam("proto_tls", "ca_list", "cl_dom:$CERT_DR/user/user-calist.pem") >> >> >
[OpenSIPS-Users] help setting up TLS
Hi all, I'm currently trying to setup OpenSIPS to use tls. For this I am following the steps described here: http://www.opensips.org/Documentation/Tutorials-TLS-2-2 This is a dev box, so for now I just want to get things working, my setup is as follows: UACs are registering to Opensips, which is setup as a mid-registrar in front of asterisk. Rtpproxy is used on a different box to relay the rtp between the UACs and Asterisk. I followed the steps described in the tutorial mentioned above but I cannot get opensips to startup. So I have a few questions regarding the tutorial: question 1: If my opensips is only accepting connections (phones registering to it from the internet), then I presume I only need the server domain part in the following part of the tutorial?: #server domain modparam("proto_tls", "server_domain", "sv_dom=:") modparam("proto_tls", "certificate", "sv_dom:$CERT_DIR/rootCA/cacert.pem") modparam("proto_tls", "private_key", "sv_dom:$CERT_DIR/rootCA/private/cakey.pem") modparam("proto_tls", "ca_list", "sv_dom:$CERT_DR/rootCA/cacert.pem") #client domain modparam("proto_tls", "client_domain", "cl_dom=:") modparam("proto_tls", "certificate", "cl_dom:$CERT_DIR/user/user-cert.pem") modparam("proto_tls", "private_key", "cl_dom:$CERT_DIR/user/user-privkey.pem") modparam("proto_tls", "ca_list", "cl_dom:$CERT_DR/user/user-calist.pem") question 2: in the above code, I need to replace sv_dom with what exactly something like blablabla.com? question 3: Do I need to edit the certificates conf files (ca.conf, request.conf, user.conf), because I just copied the existing files as is, which may be why I'm having issues. So far I tried using the ones generated by the opensipctl tls command and I am always getting the errors below upon startup. I also tried the builtin certificaties and I get the same result: Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: INFO:tls_mgm:mod_init: initializing TLS management Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: INFO:tls_mgm:mod_init: openssl version: OpenSSL 1.0.2g 1 Mar 2016 Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: INFO:tls_mgm:mod_init: disabling compression due ZLIB problems Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: INFO:tls_mgm:init_tls_dom: Processing TLS domain 'default' Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: DBG:tls_mgm:init_ssl_ctx_behavior: no DH params file for tls domain 'default' defined, using default '(null)' Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: NOTICE:tls_mgm:init_ssl_ctx_behavior: No EC curve defined Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: NOTICE:tls_mgm:init_ssl_ctx_behavior: cipher list set to NULL Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: INFO:tls_mgm:init_ssl_ctx_behavior: client verification NOT activated. Weaker security. Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: ERROR:tls_mgm:load_certificate: unable to load certificate file 'something.com:/usr/src/opensips-2.4.1/tls_cnf/tls/rootCA/cacert.pem' Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: ERROR:tls_mgm:init_tls_domains: Failed to init TLS domain 'default' Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: ERROR:core:init_mod: failed to initialize module tls_mgm Sep 04 13:51:32 opensips-test-mtl /usr/local/sbin/opensips[66656]: ERROR:core:main: error while initializing modules If anyone sees something I don't feel free to let me know Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] routing calls to several asterisks
thank you I'll give that a try On Thu, Aug 30, 2018, 3:18 AM vasilevalex, wrote: > In the same situation I used dialplan and dynamic routing modules like > this: > > # Get ID of destination Asterisk server according to CustomerID > dp_translate("1", "$var(cust_id)/$var(dst_srv)"); > if ($var(dst_srv)==NULL) { > exit; > } > # Set route for SIP according ID of Asterisk server from Dynamic routing > gateways table > route_to_gw("$var(dst_srv)"); > route(relay); > > Both modules load information from DB only during start time or via MI > command. So all these requests are made from memory. I think this is more > effective. > > > > -- > Sent from: > http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html > > ___ > 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] routing calls to several asterisks
Hi, I was wondering if someone could point me in the right direction (which module to look at) for what I want to do. I basically have OpenSIPs acting as a mid-registrar in front of several asterisks. All sip traffic coming from a specific customer needs to go to the asterisk server that is assigned to this customer. I currently use a simple lookup table (account_code/asterisk_server), in which I lookup the server assigned to that customer and put the server in $ru before calling t_relay. This is working at the moment, but I was wondering if there is a smarter way of doing that. Any advice is as always, very appreciated. Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Help with my OpenSips architecture
Thanks a lot once again, that was the issue (flags=seed), here is the output of the command now: # opensipsctl fifo clusterer_list_cap Cluster:: 1 Capability:: usrloc-contact-repl State=Ok Dominic On Thu, Aug 9, 2018 at 5:13 AM, John Quick wrote: > Hi Dominic, > > I have a similar setup in a test rig. For comparison, here is the output I > get for the same fifo commands: > opensipsctl fifo clusterer_list > Cluster:: 1 > Node:: 1 DB_ID=1 URL=bin:192.168.0.118:5678 Enabled=1 > Link_state=Up > Next_hop=1 Description=vSvr2 > > opensipsctl fifo clusterer_list_topology > Cluster:: 1 > Node:: 2 Neighbours=1 > Node:: 1 Neighbours=2 > > opensipsctl fifo clusterer_list_cap > Cluster:: 1 > Capability:: dialog-dlg-repl State=Ok > Capability:: usrloc-contact-repl State=Ok > > Your DB_ID value is very different, but perhaps you're using db_mode 0 - > i.e. node data comes only from the script. > > I have a separate local database running on each node and use the following > settings in my script: > All node data are read from the clusterer DB table (db_mode 1, default) > The flags field for node 1 in the clusterer table is set to "seed" > modparam("usrloc", "working_mode_preset", "full-sharing-cluster") > modparam("usrloc", "location_cluster", 1) > modparam("dialog", "db_mode", 0) // the db_mode for the dialog module > modparam("dialog", "dialog_replication_cluster", 1) > modparam("dialog", "dlg_sharing_tag", "vip1=active") // on node 2, it is > "vip1=backup" > > Also, try restarting the opensips service, always starting node 1 first > (assuming that node has flags="seed"). > > Hope this helps. > > John Quick > Smartvox Limited > Web: www.smartvox.co.uk > > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Help with my OpenSips architecture
There's something I'm not getting though, I defined my cluster with 2 opensips instances: # opensipsctl fifo clusterer_list Cluster:: 1 Node:: 2 DB_ID=-1 URL=bin:10.0.20.163:5566 Enabled=1 Link_state=Up Next_hop=2 Description=none # opensipsctl fifo clusterer_list_topology Cluster:: 1 Node:: 1 Neighbours=2 Node:: 2 Neighbours=1 However it seems usrloc is not synced as seen in the state below: # opensipsctl fifo clusterer_list_cap Cluster:: 1 Capability:: usrloc-contact-repl State=not synced However if I register 1 sip device on instance 1, I can see the device on both instances if I run "opensipsctl ul show". So it looks as though the usrloc is replicated properly so I wonder why "opensipsctl fifo clusterer_list_cap" has the "not synced" state. Dominic On Wed, Aug 8, 2018 at 8:00 AM, Dominic wrote: > > > On Wed, Aug 8, 2018 at 4:52 AM, Bogdan-Andrei Iancu > wrote: > >> Hi Dominic, >> >> Please see inline. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> http://www.opensips-solutions.com >> OpenSIPS Bootcamp 2018 >> http://opensips.org/training/OpenSIPS_Bootcamp_2018/ >> >> On 08/07/2018 10:36 PM, Dominic wrote: >> >> Hi all, just to make sure I'm one the right track here I'd like to share >> a few thoughts of where I'm currently going with my architecture, any >> feedback is really appreciated specially if it can help me avoid any >> pitfalls in the future. Here is what I'm trying to do: >> >> I currently have a a few asterisk servers directly facing the public >> internet, with sip devices registering directly with a specific asterisk. >> >> So my first goal was to have the sip devices register directly with >> OpenSips so I used the mid_registrar module for that, and forward the >> registers to the right asterisk. This seems to work very well so far. >> >> Secondly, I setup rtp proxy, on the same box as opensips, this also seems >> to work great so far. At this point I should be able to not have the >> asterisk facing public internet. >> >> Do you intend to move the * boxes to a private network ? or to keep them >> with public IP, but behind a firewall ? >> > > Yes I indend to move them to a private network behind a firewall with no > public IP. > >> >> The third thing I now want to do, and this is where I am currently stuck >> is to figure out what my options are in terms of high availability of the >> opensips. I figured I would go with a VIP setup with 2 identical opensips >> box. So in this type of setup i would have to replicate usrloc and dialogs >> between the 2 opensips instances right? Am I forgetting anything? >> >> yes, you are on the right tracks - use the dialog replication (with a >> sharing tag) and usrloc full sharing mode - this will give you the HA you >> are looking for (in combination with a VIP) >> > > Perfect, I'll give that a shot > >> >> Am I on the right track with this type of setup or am I missing something >> big here? It's also worth mentioning that I am using OpenSIPS 2.4 >> >> Any advice/links with info on similar setup/code examples are very welcome >> >> For the HA, see >> https://blog.opensips.org/2018/03/15/scaling-distributing- >> and-partitioning-registrations-with-opensips-2-4/ >> https://blog.opensips.org/2018/03/23/clustering-ongoing-call >> s-with-opensips-2-4/ >> >> Thanks >> Dominic >> >> >> ___ >> Users mailing >> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> Thanks a lot for the replies, the help is really appreciated > > Dominic > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Help with my OpenSips architecture
On Wed, Aug 8, 2018 at 4:52 AM, Bogdan-Andrei Iancu wrote: > Hi Dominic, > > Please see inline. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > http://www.opensips-solutions.com > OpenSIPS Bootcamp 2018 > http://opensips.org/training/OpenSIPS_Bootcamp_2018/ > > On 08/07/2018 10:36 PM, Dominic wrote: > > Hi all, just to make sure I'm one the right track here I'd like to share a > few thoughts of where I'm currently going with my architecture, any > feedback is really appreciated specially if it can help me avoid any > pitfalls in the future. Here is what I'm trying to do: > > I currently have a a few asterisk servers directly facing the public > internet, with sip devices registering directly with a specific asterisk. > > So my first goal was to have the sip devices register directly with > OpenSips so I used the mid_registrar module for that, and forward the > registers to the right asterisk. This seems to work very well so far. > > Secondly, I setup rtp proxy, on the same box as opensips, this also seems > to work great so far. At this point I should be able to not have the > asterisk facing public internet. > > Do you intend to move the * boxes to a private network ? or to keep them > with public IP, but behind a firewall ? > Yes I indend to move them to a private network behind a firewall with no public IP. > > The third thing I now want to do, and this is where I am currently stuck > is to figure out what my options are in terms of high availability of the > opensips. I figured I would go with a VIP setup with 2 identical opensips > box. So in this type of setup i would have to replicate usrloc and dialogs > between the 2 opensips instances right? Am I forgetting anything? > > yes, you are on the right tracks - use the dialog replication (with a > sharing tag) and usrloc full sharing mode - this will give you the HA you > are looking for (in combination with a VIP) > Perfect, I'll give that a shot > > Am I on the right track with this type of setup or am I missing something > big here? It's also worth mentioning that I am using OpenSIPS 2.4 > > Any advice/links with info on similar setup/code examples are very welcome > > For the HA, see > https://blog.opensips.org/2018/03/15/scaling- > distributing-and-partitioning-registrations-with-opensips-2-4/ > https://blog.opensips.org/2018/03/23/clustering-ongoing- > calls-with-opensips-2-4/ > > Thanks > Dominic > > > ___ > Users mailing > listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > Thanks a lot for the replies, the help is really appreciated Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Help with my OpenSips architecture
Hi all, just to make sure I'm one the right track here I'd like to share a few thoughts of where I'm currently going with my architecture, any feedback is really appreciated specially if it can help me avoid any pitfalls in the future. Here is what I'm trying to do: I currently have a a few asterisk servers directly facing the public internet, with sip devices registering directly with a specific asterisk. So my first goal was to have the sip devices register directly with OpenSips so I used the mid_registrar module for that, and forward the registers to the right asterisk. This seems to work very well so far. Secondly, I setup rtp proxy, on the same box as opensips, this also seems to work great so far. At this point I should be able to not have the asterisk facing public internet. The third thing I now want to do, and this is where I am currently stuck is to figure out what my options are in terms of high availability of the opensips. I figured I would go with a VIP setup with 2 identical opensips box. So in this type of setup i would have to replicate usrloc and dialogs between the 2 opensips instances right? Am I forgetting anything? Am I on the right track with this type of setup or am I missing something big here? It's also worth mentioning that I am using OpenSIPS 2.4 Any advice/links with info on similar setup/code examples are very welcome Thanks Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] mid-registrar question
Alexey I basically started over from scratch using your script as a guide and everything is working fine so far, I wish I could tell what I initially did wrong, but I had a LOT of strange things in there, being a dev box and all. Thanks a LOT for the help On Wed, Jul 25, 2018 at 8:13 AM, Dominic wrote: > Thanks Alexey, I will give it another shot first thing this morning. > > On Wed, Jul 25, 2018 at 1:05 AM, Alexey Kazantsev via Users < > users@lists.opensips.org> wrote: > >> ... and yes, route[RELAY] is like this: >> >> >> route[RELAY] { >> if ( !t_relay() ) { >> send_reply("500","Internal Error"); >> } >> exit; >> } >> >> >> or you may simply do: >> >> # REGISTER processing >> if ( is_method("REGISTER") ) { >> mid_registrar_save("location"); >> switch ($retcode) { >> case 1: >> $ru = "sip:10.223.15.21:5070"; >> t_relay(); >> break; >> case 2: >> break; >> default: >> xlog("L_ERROR", "failed to save >> registration! ($$ci=$ci)\n"); >> } >> exit; >> } >> >> >> Here's the tutorial http://www.opensips.org/Docume >> ntation/Tutorials-MidRegistrar >> But keep in mind that it is for OpenSIPS 2.3, as 2.4 does not have >> 'insertion_mode' >> option described there. >> >> >> --- >> BR, Alexey >> http://alexeyka.zantsev.com/ >> ___ >> 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 question
Thanks Alexey, I will give it another shot first thing this morning. On Wed, Jul 25, 2018 at 1:05 AM, Alexey Kazantsev via Users < users@lists.opensips.org> wrote: > ... and yes, route[RELAY] is like this: > > > route[RELAY] { > if ( !t_relay() ) { > send_reply("500","Internal Error"); > } > exit; > } > > > or you may simply do: > > # REGISTER processing > if ( is_method("REGISTER") ) { > mid_registrar_save("location"); > switch ($retcode) { > case 1: > $ru = "sip:10.223.15.21:5070"; > t_relay(); > break; > case 2: > break; > default: > xlog("L_ERROR", "failed to save > registration! ($$ci=$ci)\n"); > } > exit; > } > > > Here's the tutorial http://www.opensips.org/Documentation/Tutorials- > MidRegistrar > But keep in mind that it is for OpenSIPS 2.3, as 2.4 does not have > 'insertion_mode' > option described there. > > > --- > BR, Alexey > http://alexeyka.zantsev.com/ > ___ > 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] mid-registrar question
Hi all, I'm currently a bit stuck trying to implement a mid-registrar in my dev environment. My setup is that I have a hardphone that is registering to opensips, opensips challenges the register, and once authenticated, the register is sent to an Asterisk server that is setup with no authentication. The diagram below illustrates this: ┌─┐ ║"│ └┬┘ ┌┼┐ │ ┌┐ ┌┐ ┌┴┐│OpenSips│ │Asterisk│ Alice └┘ └┘ │REGISTER (expires 60 sec)││ │─>│ │ ││ │401 Unauthorized ││ │<─│ │ ││ │REGISTER (expires 60 sec)││ │─>│ │ ││ │ │ REGISTER (expires 3600 sec)│ │ │ ───> │ ││ │ │ 200 OK (expires 3600 sec) │ │ │ <─── │ ││ │200 OK (expires 3600 sec)││ │<─│ Alice ┌┐ ┌┐ ┌─┐│OpenSips│ │Asterisk│ ║"│└┘ └┘ └┬┘ ┌┼┐ │ ┌┴┐ I have set the mid_registrar.outgoing_expires to 3600 secs, so Opensips alters the expires in the REGISTER that is sent to asterisk (which is what I want), however, my issue is that the 3600 seconds gets propagated back to Alice, through the 200 OK that is replied from Asterisk to OpenSips which in turn sends it back to Alice. I was wondering if anyone would know of a way to send back 60 seconds in the 200 OK that is sent back to Alice so that Alice keeps sending me REGISTERs every 60 seconds. Thanks Dominic ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users