[OpenSIPS-Users] OpenSIPs & CP - Documentation (Dynamic Routing, DialPlans, CP)

2021-03-11 Thread Rick McGill - ₪
Dear OpenSIPs Community,

I'm very new to OpenSIPS and have a new fresh install and have started to
customize it.
So if my question seems so very basic this is why.

I have the following:
Debian 1.7 (Buster)
OpenSIPs 3.1
OpenSIPs Control Panel
RTPproxy

I have a couple of uses setup and can call with softphone from User to user
on OpenSIPS.
I have an FreePBX/Asterisk SIP Trunk setup to OpenSIPS.   With outbound
routes and all configured and working properly.  
I also have on OpenSIPS a Route/Gateway or Trunk from OpenSIPs to CommPeak
For Outbound calls.

The issue I'm having is learning or finding documentation on how exactly to
setup Dialplan, Dynamic Routes, Permissions and such so that I can get a
call from Ext on Asterisk routed to OpenSIPS then out to CommPeak for an
outbound International call.

Currently when I try to make this type of call OpenSIPS says for example
662...@sip.netrovoip.comuserloc does not exists and hangs up.
Sip.netrovoip.com is my OpenSIPs server
So apparently with all my efforts my Dialplan, Permissions, and Dynamic
Routes is not working no matter what changes I keep trying in them.

FYI I have not yet edited or customized the file
/var/www/opensips-cp/config/tools/system/dialplan/local.inc.php

I cannot find out what code and customization I should do for attrib and
what I can use standard in OpenSIPS-CP

$config->attrs_cb=array(
<-->// name , description
<-->"a" => "Descr a",
<-->"b" => "Descr b",
<-->"c" => "Descr c",

So My question is:
Where can I find some comprehensive detailed documentation (if it exists) so
I can learn more about the following?:
Dialplans
Dynamic Routes
And whatever else I need to learn to get this kind of basic Dynamic Routing
working?
I have gone thru the OpenSIPS-CP documentation and the OpenSIPs.org too but
there it seems a bit basic or outdated.

Also I do have my Regular Expressions Quick Reference v1.2 but no matter
what I program in CP it does not seem to work.
I think I'm missing some very basic but major bit of information on how to
get this simple Asterisk -> OpenSIPS -> CommPeak outbound call basic setup
configured / working.

Again sorry if all this sound like such a basic knowledge set of questions.

--------
---
Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

---   



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


Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

2021-02-27 Thread Rick McGill - ₪
Dear Donat,

Finally got OpenSIPS failed auth or logins logging into the dedicated 
opensips.log file.
Also now Fail2Ban is catching the failed auth login attempts and working well.

As you mentioned a couple of time "do not just copy and paste".
I went thru the directions for OpenSIPs 2.4 Fail2Ban and corrected and cleaned 
up the code a bit so it would work with 3.1.
My biggest error was a very small character that I copied and pasted from the 
OpenSIPs 2.4 Fail2Ban documentation page.   It was such a small character I 
almost did not even see it.   But it was causing error in my opensips.cfg file 
which cause opensips not to start.

All is well now.   Thanks for you helped and pointed replies.

/var/log/opensips.log
Feb 27 15:17:14 sip /usr/sbin/opensips[13974]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2
Feb 27 15:17:14 sip /usr/sbin/opensips[13973]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2
Feb 27 15:17:18 sip /usr/sbin/opensips[13972]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2
Feb 27 15:17:18 sip /usr/sbin/opensips[13971]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2
Feb 27 15:17:26 sip /usr/sbin/opensips[13974]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2
Feb 27 15:17:26 sip /usr/sbin/opensips[13974]: Auth error for 
1...@sip.netrovoip.com from 10.1.10.201 cause -2


Regards,  Rick

-
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  http://www.netrovoip.com/  Telecommunications / Video Consulting & 
Solutions Provider
--

-Original Message-
From: Rick McGill - ₪  
Sent: Monday, February 22, 2021 4:11 PM
To: 'OpenSIPS users mailling list' 
Subject: RE: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

Dear Donat,

Sorry for the delay replying to your response.

I know we kind of jumped into this OpenSIPs world feet first and are going thru 
a big learning curve.
Sorry if I have ask a bit too much or my questions are very newby style.

Just FYI.
Before sending out this email I had pretty much already had all the logging 
working and changed to /var/log/opensips.log already and configured/programmed  
Fail2Ban to monitor the opensips.log.
Failed login attempts are currently not being logged I believe in that 
opensips.logs though.

Thanks for the links for OpenSIPs 2.5 return codes.   I think that will help a 
lot and I will try a few edits to the code and see if I can get it to log 
failed OpenSIPs registration failures.
If I get it working correctly I will make some documentation so we can put it 
in the online Wiki to update it for OpenSIPs 2.5

I really do appreciate your detailed replies and information and hopefully we 
will get to a point where we can start to help others here also.

Regards,  Rick


-----
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  http://www.netrovoip.com/  Telecommunications / Video Consulting & 
Solutions Provider
--

From: Users  On Behalf Of Donat Zenichev
Sent: Monday, February 15, 2021 6:48 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

Good day Rick.
I'm not totally sure I understand what you mean correctly, but, I think that 
you might misunderstand the concept of producing logs in your scenario a bit.

First of all, the function 'www_challenge()' doesn't produce logs on its own, 
nor 'www_authorize()' does it.
Functions only can return the code (return code in terms of programming).

For e.g. 'www_challenge()' function returns -1 when it tries to challenge a 
user (to let it send credentials using WWW-Authorize header) and eventually 
fails to do that due to certain reasons (for e.g. failed to generate nonce, or 
failed to send out a 401 response etc.).
Otherwise if everything is good, it returns 0 - which means everything is due 
to a plan,
401 challenge is sent out and we wait for a re-sending of REGISTER with 
credentials encrypted (using nonce, and a list of other parameters and md5 
algorithm).

'www_authorize()' function in its

Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

2021-02-22 Thread Rick McGill - ₪
Dear Donat,

Sorry for the delay replying to your response.

I know we kind of jumped into this OpenSIPs world feet first and are going thru 
a big learning curve.
Sorry if I have ask a bit too much or my questions are very newby style.

Just FYI.
Before sending out this email I had pretty much already had all the logging 
working and changed to /var/log/opensips.log already and configured/programmed  
Fail2Ban to monitor the opensips.log.
Failed login attempts are currently not being logged I believe in that 
opensips.logs though.

Thanks for the links for OpenSIPs 2.5 return codes.   I think that will help a 
lot and I will try a few edits to the code and see if I can get it to log 
failed OpenSIPs registration failures.
If I get it working correctly I will make some documentation so we can put it 
in the online Wiki to update it for OpenSIPs 2.5

I really do appreciate your detailed replies and information and hopefully we 
will get to a point where we can start to help others here also.

Regards,  Rick


-
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com 
  ₪  http://www.netrovoip.com/  Telecommunications / Video Consulting & 
Solutions Provider
--

From: Users  On Behalf Of Donat Zenichev
Sent: Monday, February 15, 2021 6:48 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

Good day Rick.
I'm not totally sure I understand what you mean correctly, but,
I think that you might misunderstand the concept of producing logs in your 
scenario a bit.

First of all, the function 'www_challenge()' doesn't produce logs on its own, 
nor 'www_authorize()' does it.
Functions only can return the code (return code in terms of programming).

For e.g. 'www_challenge()' function returns -1 when it tries to challenge a 
user (to let it send credentials using WWW-Authorize header) and 
eventually fails to do that due to certain reasons (for e.g. failed to generate 
nonce, or failed to send out a 401 response etc.).
Otherwise if everything is good, it returns 0 - which means everything is due 
to a plan,
401 challenge is sent out and we wait for a re-sending of REGISTER with 
credentials encrypted (using nonce, and a list of other parameters and md5 
algorithm).

'www_authorize()' function in its turn has a list of return codes, which you 
can find here:
https://opensips.org/html/docs/modules/3.1.x/auth_db.html#func_www_authorize
Basically you are interested in the fact, that a return code is not negative, 
otherwise something is wrong with an authentication and you should not let this 
user pass through.

You use the '$rc' (in 2.4 branch was '$retcode') pseudo variable (which is 
pre-defined) in order to get the last returned code, of the last invoked 
function.
Here is an example of how dramatically simplified functionality could look like:
if (!www_authorize("", "subscriber")) {
switch ($rc) {
case -1:
xlog("L_NOTICE", "Authentication error for $si port:$sp, not found 
\n");
break;
case -2:
xlog("L_NOTICE", "Authentication error for $si port:$sp, wrong 
password given \n");
break;
}
www_challenge("", "0");
exit;
}

Note please, this is just an example, which shows the basic concept how it 
works and shouldn't be copy-pasted into any production environment.
I underline this - just an example which was not even tested, because I have 
written this on the go while answering you.

So as you can see, the log rows are being produced with a help of xlog() 
function and not www_authorize()/www_challenge().
xlog() does it based on the previously returned code.
Further logic is only restricted with a creativity you can apply to it.

Please note also, that your logs will be produced to the log-file which is 
correlated with the log facility, which you set by 'log_facility=' parameter.
For e.g. if you have previously configured (with rsyslog) that log facility 7 
produces logs to opensips.log,
then you are ought to use it then in the opensips's preprocessor directive like 
that:
'log_facility=LOG_LOCAL7'
Thus opensips will send logs to log facility 7, which in its turn directs logs 
to opensips.log. I hope it's clear for understanding.

What relates to Fail2Ban and how it uses these logs then in order to ban 
someone.
You need to firstly define a jail object for it (in jail.conf), which can look 
something like that (only an example):
[opensips]
ena

[OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Change Log File (HOW TO)

2021-02-13 Thread Rick McGill - ₪
Dear OpenSIPs Community,

My goal for this topic is to get OpenSIPS 3.1 logging to a new file
OpenSIPs.log and then have Fail2Ban monitoring that log file for failed
login attempts by IP addresses.
I’m running OpenSIPS 3.1 on Debain 10.7

The Directions in the URL below are valid for OpenSIPS up to version 2.4
But with OpenSIPS 3.1 it is different as they do not use   www_challenge("",
"0");   but   www_challenge("", "auth");   Instead.
The difference is the '0' in OpenSIPS 2.4 and the  'auth' in OpenSIPS 3.1

Same like the instructions in URL link below.

It is obvious that the code in the needs to be tweaked to work with but all
my attempts to make the edits to the /etc/opensips/opensips.cfg only makes
OpenSIPs unable to load because of bad config file.

My question is... Where can I go for the source to find out what
www_challenge codes I should use for different login results to log?
Or more end result question... How should I change the directions in 2.4
document to work with a OpenSIPS 3.1 opensips.cfg file?


---
Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

--   

https://www.opensips.org/Documentation/Tutorials  

Document 28.  OpenSIPS and fail2ban (Direction for OpenSIPS ver 2.4)
This is a small tutorial so you can use fail2ban together with opensips to
block via firewall the attackers that are using wrong authentication
credentials

https://www.opensips.org/Documentation/Tutorials-Fail2Ban 

The is what is in the link above:

---
from:

--

 if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
}




To:

-

$var(auth_code) = www_authorize("", "subscriber");
if ( $var(auth_code) == -1 || $var(auth_code) == -2 ) {
xlog("L_NOTICE","Auth error for $fU@$fd from $si cause
$var(auth_code)");
}
if ( $var(auth_code) < 0 ) {
www_challenge("", "0");
exit;
}



The issue is that my new install of OpenSIP has code a bit different.
Instead of "0" it has "AUTH".
And when I change the Code like the TO: section above OpenSIPS will not
start because it says Error in Config File it cannot load opensips.


This is what the default code looks like in the opensips.cfg for OpenSIPS
3.1 after a new fresh install like I have:   Notice that www_challenger is
"auth" and not "0"   I have tried to enter it as '0" as per the instructions
in URL link above but that is when it then causes OpenSIPS to not be able to
restart.


if (is_method("REGISTER")) {
# authenticate the REGISTER requests
if (!www_authorize("", "subscriber")) {
www_challenge("", "auth");
exit;
}







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


Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

2021-02-13 Thread Rick McGill - ₪
Dear Donat,

Yeah I see what you mean about suggestions or examples.

After looking closer I see syntax error in their documentation and have 
corrected them on my system.
Now RTPproxy can start with command line option related to user  "-u 
rtpproxy:rtpproxy"   It needed a ":" there instead of a space.  I should have 
caught that before.
A fresh look after stepping away helped a lot.

The logs are fine too.  

Thanks again for all your input and help!

----
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
mailto:supp...@netrovoip.com
  ₪  http://www.NetroVOIP.com  Telecommunications / Video Consulting & 
Solutions Provider
--

From: Donat Zenichev  
Sent: Saturday, February 13, 2021 4:38 AM
To: Rick McGill - ₪ 
Cc: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Good day Rick,

please try to carefully read the manual in order to understand the meaning of 
options, which are given to the binary at the start time.
It's pretty clear, furthermore an example of the systemd service file is given 
as an example, I underline this - an example.

This means you use that as a template, but you adjust it to your setup using 
the provided user manual. I hope I'm clear enough.

Log level option has the following syntax: -d log_level[:log_facility]
So you need to pick out one of the following log levels: DBUG, INFO, WARN, ERR 
and CRIT
and an existing log facility at your system, so in other words this should be 
pre-defined, for e.g. (file /etc/rsyslog.d/50-default.conf):
...
local5.*/var/log/rtpproxy.log

What relates to the "-u rtpproxy rtpproxy" option, this means that you should 
have created a user and an appropriate group with a given name.
The option which is pointed out in the template, is only as an example, one can 
freely pick out any other user/group he or she wants to run.
One might as well skip this and run using default user/group which will be 
picked out in its turn by a supervisor of the OS.

Best regards.

On Fri, Feb 12, 2021 at 9:27 PM Rick McGill - ₪ <mailto:r...@netrovoip.com> 
wrote:
Dear Donat,

I went through your links and setup RTPproxy to autostart at boot time.
Also changed the log from LOG-LOCAL5  =  rtpproxy.log

Note that it was hell getting it to work.  It kept failing to load a boot time. 
 
Seems like it would not work with this option on the command line  "-u rtpproxy 
rtproxy"   I had to remove it then all would autostart at boot time ok.

FROIM:
ExecStart=/usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s 
unix:/var/run/rtpproxy/rtpproxy.sock \
 -u rtpproxy rtpproxy -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock $OPTIONS

TO:
ExecStart=/usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s 
unix:/var/run/rtpproxy/rtpproxy.sock \
 -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock $OPTIONS

Just FYI.

--------
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
mailto:supp...@netrovoip.com
  ₪  http://www.NetroVOIP.com  Telecommunications / Video Consulting & 
Solutions Provider
--

From: Donat Zenichev <mailto:donat.zenic...@gmail.com> 
Sent: Friday, February 12, 2021 8:03 PM
To: Rick McGill - ₪ <mailto:r...@netrovoip.com>
Cc: OpenSIPS users mailling list <mailto:users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Good day Rick,
you are right, RTPproxy does not start after a reboot of a machine, because 
there is essentially no entity responsible for that (to start RTPproxy).
As I have already mentioned, you need to configure systemd (if that is a 
supervisor on your Debian system, which should actually be).

Please read two following sections of the user manual:
- getting started with RTPproxy - 
https://www.rtpproxy.org/doc/master/user_manual.html#idm221
- configuration of systemd service for RTPproxy - 
https://www.rtpproxy.org/doc/master/user_manual.html#idm650

After you are done with steps mentioned in those sections, your RTPproxy will 
start independently after the following reboot.

What relates to listening sockets please r

Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

2021-02-12 Thread Rick McGill - ₪
Dear Donat,

I went through your links and setup RTPproxy to autostart at boot time.
Also changed the log from LOG-LOCAL5  =  rtpproxy.log

Note that it was hell getting it to work.  It kept failing to load a boot time. 
 
Seems like it would not work with this option on the command line  "-u rtpproxy 
rtproxy"   I had to remove it then all would autostart at boot time ok.

FROIM:
ExecStart=/usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s 
unix:/var/run/rtpproxy/rtpproxy.sock \
 -u rtpproxy rtpproxy -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock $OPTIONS

TO:
ExecStart=/usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s 
unix:/var/run/rtpproxy/rtpproxy.sock \
 -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock $OPTIONS

Just FYI.

----
Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider
--

From: Donat Zenichev  
Sent: Friday, February 12, 2021 8:03 PM
To: Rick McGill - ₪ 
Cc: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Good day Rick,
you are right, RTPproxy does not start after a reboot of a machine, because 
there is essentially no entity responsible for that (to start RTPproxy).
As I have already mentioned, you need to configure systemd (if that is a 
supervisor on your Debian system, which should actually be).

Please read two following sections of the user manual:
- getting started with RTPproxy - 
https://www.rtpproxy.org/doc/master/user_manual.html#idm221
- configuration of systemd service for RTPproxy - 
https://www.rtpproxy.org/doc/master/user_manual.html#idm650

After you are done with steps mentioned in those sections, your RTPproxy will 
start independently after the following reboot.

What relates to listening sockets please read the mentioned chapters to find an 
answer.
Just a brief overview of the most commonly used options:
"-L" - sets the maximum number of open file descriptors per process
"-l" - binding a socket to a particular IP interface of the machine. You can 
essentially set just "0.0.0.0" if you desire to listen to all available IP 
interfaces
"-m" - the lowest port to be used for RTP/RTCP sessions allocation
"-M" - an opposite to the above
"-d" - debug level (which will be used to log events to either syslog or a 
separate log file, if you choose so)
"-p" - a link to the PID file, which will be created as soon as binary starts 
its work
"-u" - user and group to be used for handling the process(es)
"-n" - specifies permitted notification socket, this socket must be created by 
another application, preferably before starting rtpproxy itself
(for e.g. OpenSIPS crates a timeout socket by usage of this modparam: 
https://opensips.org/html/docs/modules/3.1.x/rtpproxy.html#param_rtpp_notify_socket)

Other than that, please read the user manual to find a ready template for 
running with the systemd supervisor.

I hope this answers your questions.



On Fri, Feb 12, 2021 at 12:40 PM Rick McGill - ₪ <mailto:r...@netrovoip.com> 
wrote:
Dear Donat,
 
I REALLY REALLY appreciate your comments and help!!   It got the ball rolling 
for me.  
I was stuck a bit because I’m so unfamiliar with OpenSIPs and RTPproxy and the 
info out there is sparce or a little openended.  Not sure what to focus on or 
ignore.
 
I finally got it working!
Only a little bit left I need to do so that it all works automatically when I 
reboot.   Right now after a reboot it does not listen still on port 12221
For now I just did the startup command via the command line to see if it would 
work.
 
root@sip:/usr/src/rtpproxy# rtpproxy -l 10.1.1.57 -s udp:localhost:12221 -F
 
I probably need to add the Public IP and 127.0.0.1 or localhost also for -l  
command line option.
 
root@sip:/usr/src/rtpproxy# rtpproxy -V
2.2.alpha.3a82dd9d
 
 
 
Feb 12 17:22:27 sip /usr/sbin/opensips[16714]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled 
Feb 12 17:22:27 sip /usr/sbin/opensips[16715]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled   
Feb 12 17:22:27 sip /usr/sbin/opensips[16720]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled  
Feb 12 17:22:27 sip /usr/sbin/opensips[16718]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled  
Feb 12 17:22:27 sip /usr/sbin/opensips[16719]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, sup

Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

2021-02-12 Thread Rick McGill - ₪
Dear Donat,

 

I REALLY REALLY appreciate your comments and help!!   It got the ball rolling 
for me.  
I was stuck a bit because I’m so unfamiliar with OpenSIPs and RTPproxy and the 
info out there is sparce or a little openended.  Not sure what to focus on or 
ignore.

 

I finally got it working!

Only a little bit left I need to do so that it all works automatically when I 
reboot.   Right now after a reboot it does not listen still on port 12221

For now I just did the startup command via the command line to see if it would 
work.

 

root@sip:/usr/src/rtpproxy# rtpproxy -l 10.1.1.57 -s udp:localhost:12221 -F

 

I probably need to add the Public IP and 127.0.0.1 or localhost also for -l  
command line option.

 

root@sip:/usr/src/rtpproxy# rtpproxy -V

2.2.alpha.3a82dd9d

 

 

 

Feb 12 17:22:27 sip /usr/sbin/opensips[16714]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled 

Feb 12 17:22:27 sip /usr/sbin/opensips[16715]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled   

Feb 12 17:22:27 sip /usr/sbin/opensips[16720]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled  

Feb 12 17:22:27 sip /usr/sbin/opensips[16718]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled  

Feb 12 17:22:27 sip /usr/sbin/opensips[16719]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled 

Feb 12 17:22:27 sip /usr/sbin/opensips[16721]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled   

Feb 12 17:22:27 sip /usr/sbin/opensips[16722]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled

Feb 12 17:22:27 sip /usr/sbin/opensips[16724]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled

Feb 12 17:22:27 sip /usr/sbin/opensips[16723]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled   

Feb 12 17:22:27 sip /usr/sbin/opensips[16726]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled

Feb 12 17:22:27 sip /usr/sbin/opensips[16725]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled

Feb 12 17:22:27 sip /usr/sbin/opensips[16728]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled 

Feb 12 17:22:27 sip systemd[1]: Started OpenSIPS is a very fast and flexible 
SIP (RFC3261) server. 

Feb 12 17:22:27 sip /usr/sbin/opensips[16730]: INFO:rtpproxy:rtpp_test: rtp 
proxy  found, support for it enabled   

 

 



Rick McGill – CEO

r...@netrovoip.com | r...@netropolitanworks.com 

Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000

Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com

  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider

--
   

 

From: Donat Zenichev  
Sent: Friday, February 12, 2021 3:22 PM
To: Rick McGill - ₪ 
Cc: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

 

Good day Rick,

sure I'm always glad to help.

 

OpenSIPS is first of all a SIP proxy.

That's why you get OpenSIPS binary, accompanying shared libraries (.so 
libraries) and configuration files for it (opensips script, it's C-like).

And as another side of OpenSIPS, which is perfect and powerful, you can always 
add needed modules to it for any desires you have, e.g.:

media proxying (RTPproxy in your case), B2B logic, fraud detection/protection, 
load-balancing etc. etc. (this list is dramatically huge).

 

Here you can find a list of useful guidelines provided by OpenSIPS dev team:

https://www.opensips.org/Documentation/Manual-3-1

 

If you wonder how to start with RTPproxy, I would advise to compile 2.0 firstly.

It's here: https://github.com/sippy/rtpproxy/tree/rtpp_2_0

Looking in the experience back, this version showed itself as the best one.

Still, I want to underline that I might be mistaken about what relates to the 
most stable version, as things could have changed during the course of time.

 

As a guideline to RTPproxy, please try to look into that: 
https://www.rtpproxy.org/doc/master/user_manual.html

 

Then depending on which supervisor you use (if you have debian 10.7, that 
should be systemd),
you can form a configuration file for RTPproxy service and you can pick out 
which parameters to hand to the rtpproxy binary at the start time.

Options and syntax of their usage can be obtained at the user manual I 
mentioned above.

 

Best regards.

 

 

 

 

On Fri, Feb 12, 2021 at 9:22 AM Rick McGill - ₪ mailto:r...@netrovoip.com> > wrote:

Dear Donat,

No I did not install or compile RTPproxy yet.
I'm very n

Re: [OpenSIPS-Users] RTPproxy for OpenSIPS 3.1 on Debian 10.7 (How To)

2021-02-11 Thread Rick McGill - ₪
Dear Eugene,

Thank you very much for the links and pointing me in the right direction.
None of the online installation guides I had found for OpenSIPs even mentioned 
anything about RTPproxy.
The only reason I know about it was because of the ERROR's I found in the 
OpenSIPS log and Syslog.

Anyway I'm pointed in the right direction now by your email and will attempt 
this RTPproxy install today.


Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider
--
   

-Original Message-
From: Eugene Christensen  
Sent: Thursday, February 11, 2021 11:21 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] RTPproxy for OpenSIPS 3.1 on Debian 10.7 (How To)

Hi Rick.

I'm also new to OpenSIPS so take my suggestion with a grain of salt.

I used the information found here to install rtpproxy on my Debian system.
https://computingforgeeks.com/how-to-install-rtpproxy-from-source-on-ubuntu-linux/

Once installed, I have been running it manually for the time being instead of 
creating it as a service.  At some point, if I stick with RTPProxy, I'm sure 
I'll go the route of using the service.

Don't forget to configure the opensips.cfg to have the listen port setup for 
rtpproxy to match the port that you set rtpproxy to use.

Here are a couple of other links that I looked at in case you want to review 
some alternative options.
https://www.rtpproxy.org/doc/master/user_manual.html#MAKESRC

https://subscription.packtpub.com/book/networking_and_servers/9781849510745/9/ch09lvl1sec90/rtp-proxy-installation-and-configuration

Good luck.

Eugene Christensen.

CONFIDENTIALITY NOTICE. This e-mail transmission, and any documents, files or 
previous e-mail messages attached to it, may contain confidential and 
proprietary information. If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you are hereby 
notified that any disclosure, copying, distribution or use of any of the 
information contained in or attached to this message is STRICTLY PROHIBITED. If 
you have received this transmission in error, please immediately notify me by 
reply e-mail at echristen...@sorenson.com or by telephone at +1 (801) 287-9419, 
and destroy the original transmission and its attachments without reading them 
or saving them to disk.

-Original Message-
From: Users  On Behalf Of Rick McGill - ? 
Sent: Thursday, February 11, 2021 8:56 AM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] RTPproxy for OpenSIPS 3.1 on Debian 10.7 (How To)

[EXTERNAL] 

Dear OpenSIPS Community,

Yeah I'm a newby to OpenSIPs app specifically and I just realized that I need a 
separate install for RTPproxy for my OpenSIPS.

My question is there a repo for that or do I need to download and install it 
manually?
Also I cannot find and good material for how to install so if anyone knows of a 
site for that it would be helpful.

I'm have a fresh install of OpenSIPs 3.1 on Debian 10.7   and planning to
install the RTPproxy on the same machine.   


----
Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider

--   

-Original Message-
From: Rick McGill - ₪ 
Sent: Thursday, February 11, 2021 2:27 PM
To: 'users@lists.opensips.org' 
Subject: OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Dear OpenSIPs Community,

I have a fresh install of OpenSIPs 3.1 on Debian 10.7 I have done the basic 
install but it is yet to be configured with any gateways and only has a few 
test users setup on it.
I'm new to OpenSIPs.

The ERROR issue I'm seeing in the log files seems related to rtpproxy.
I’m not familiar yet with OpenSIPs so if someone could at least point in the 
right direction to start to solve this error it might save me a lot of time 
Googling.

-
Feb 11 13:32:03 sip /usr/sbin/opensips[1704]: WARNING:rtpproxy:rtpp_test:
support for RTP proxy  has been disabled temporarily Feb 
11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtp

Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Config ERROR cannot restart OpenSIPS after changes to OpenSIPs.cfg

2021-02-11 Thread Rick McGill - ₪
Dear Liviu,

Ah I see now.  I was following a link from Google to that URL for directions to 
change the code so that OpenSIP could log and use Fail2Ban.
If I dug deeper to find the page on the site that linked to that page I would 
have saw it mentioned 2.4.  I found it now.

Not sure how to proceed as the code from 0 to Auth and all combinations I try 
to change only causes my OpenSIPS to not load because of bad cfg file.
If I find some solution I will take your suggestion and document it for the 
Wifi.

Regards, Rick

Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider
--
   

-Original Message-
From: Liviu Chircu  
Sent: Thursday, February 11, 2021 2:25 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Config ERROR cannot 
restart OpenSIPS after changes to OpenSIPs.cfg

On 11.02.2021 09:16, Rick McGill - ₪ wrote:
> I have tried to enter it as '0" as per the instructions in URL link 
> above but that is when it then causes OpenSIPS to not be able to 
> restart.

Hi, Rick!

It seems that the Fail2ban tutorial is compatible with OpenSIPS 2.4 at best, 
rather than "any ver", as it said.  I've changed the wiki to reflect this, 
thanks!

In 3.1, the equivalent of www_challenge("", "0") is www_challenge("",
"auth") indeed, as you suggested.

PS: once you get this working, you are free to create a wiki account and 
create/edit the
https://www.opensips.org/Documentation/Tutorials-Fail2Ban-3-1 updated tutorial 
page and link it in the tutorials list, for others to use in the future!  If 
you need help with linking it alongside "ver 2.4", let me know!

Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com





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


Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

2021-02-11 Thread Rick McGill - ₪
Dear Donat,

No I did not install or compile RTPproxy yet.
I'm very new to OpenSIPs but have knowledge in other areas of Telco.

I'm using the OpenSIPS quick start guides.   Surprised that RTPproxy is not 
even mentioned in them considering the need for it to get OpenSIPs to work.

Anyway thanks for your reply.  Just your questions got me pointed in the right 
direction.



Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile: 
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  | 
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions 
Provider
--
   

From: Donat Zenichev  
Sent: Thursday, February 11, 2021 2:37 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Good day Rick.

It looks like your OpenSIPS instance is complaining due to the absence of 
RTPproxy daemon.
Or at least a socket, which OpenSIPS tries to use, is not reachable for some 
reason (udp:localhost:12221).

Have you compiled the RTPproxy already?
And also could you share your configuration of rtpproxy.so ?

Best regards

On Thu, Feb 11, 2021 at 9:28 AM Rick McGill - ₪ <mailto:r...@netrovoip.com> 
wrote:
Dear OpenSIPs Community,

I have a fresh install of OpenSIPs 3.1 on Debian 10.7
I have done the basic install but it is yet to be configured with any
gateways and only has a few test users setup on it.
I'm new to OpenSIPs.

The ERROR issue I'm seeing in the log files seems related to rtpproxy.
I’m not familiar yet with OpenSIPs so if someone could at least point in the
right direction to start to solve this error it might save me a lot of time
Googling.

-
Feb 11 13:32:03 sip /usr/sbin/opensips[1704]: WARNING:rtpproxy:rtpp_test:
support for RTP proxy  has been disabled temporarily
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtpp_command: can't send (#2 iovec buffers) command to a
RTP proxy (111:Connection refused)
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtpp_command: proxy  does not
respond, disable it
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]: WARNING:rtpproxy:rtpp_test:
can't get version of the RTP proxy
-



--------
Rick McGill – CEO
mailto:r...@netrovoip.com | mailto:r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
mailto:supp...@netrovoip.com 
  ₪  http://www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

--   




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


-- 

Best regards,
Donat Zenichev


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


[OpenSIPS-Users] RTPproxy for OpenSIPS 3.1 on Debian 10.7 (How To)

2021-02-11 Thread Rick McGill - ₪
Dear OpenSIPS Community,

Yeah I'm a newby to OpenSIPs app specifically and I just realized that I
need a separate install for RTPproxy for my OpenSIPS.

My question is there a repo for that or do I need to download and install it
manually?
Also I cannot find and good material for how to install so if anyone knows
of a site for that it would be helpful.

I'm have a fresh install of OpenSIPs 3.1 on Debian 10.7   and planning to
install the RTPproxy on the same machine.   



Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

--   

-Original Message-
From: Rick McGill - ₪  
Sent: Thursday, February 11, 2021 2:27 PM
To: 'users@lists.opensips.org' 
Subject: OpenSIPs 3.1 New install ERROR in Logs rtpproxy

Dear OpenSIPs Community,

I have a fresh install of OpenSIPs 3.1 on Debian 10.7 I have done the basic
install but it is yet to be configured with any gateways and only has a few
test users setup on it.
I'm new to OpenSIPs.

The ERROR issue I'm seeing in the log files seems related to rtpproxy.
I’m not familiar yet with OpenSIPs so if someone could at least point in the
right direction to start to solve this error it might save me a lot of time
Googling.

-
Feb 11 13:32:03 sip /usr/sbin/opensips[1704]: WARNING:rtpproxy:rtpp_test:
support for RTP proxy  has been disabled temporarily
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtpp_command: can't send (#2 iovec buffers) command to a
RTP proxy (111:Connection refused) Feb 11 13:32:03 sip
/usr/sbin/opensips[1703]: ERROR:rtpproxy:send_rtpp_command: proxy
 does not respond, disable it Feb 11 13:32:03 sip
/usr/sbin/opensips[1703]: WARNING:rtpproxy:rtpp_test: can't get version of
the RTP proxy
-



----
Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

--   




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


[OpenSIPS-Users] OpenSIPs 3.1 New install ERROR in Logs rtpproxy

2021-02-10 Thread Rick McGill - ₪
Dear OpenSIPs Community,

I have a fresh install of OpenSIPs 3.1 on Debian 10.7
I have done the basic install but it is yet to be configured with any
gateways and only has a few test users setup on it.
I'm new to OpenSIPs.

The ERROR issue I'm seeing in the log files seems related to rtpproxy.
I’m not familiar yet with OpenSIPs so if someone could at least point in the
right direction to start to solve this error it might save me a lot of time
Googling.

-
Feb 11 13:32:03 sip /usr/sbin/opensips[1704]: WARNING:rtpproxy:rtpp_test:
support for RTP proxy  has been disabled temporarily
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtpp_command: can't send (#2 iovec buffers) command to a
RTP proxy (111:Connection refused)
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]:
ERROR:rtpproxy:send_rtpp_command: proxy  does not
respond, disable it
Feb 11 13:32:03 sip /usr/sbin/opensips[1703]: WARNING:rtpproxy:rtpp_test:
can't get version of the RTP proxy
-




Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com 
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

--   




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


[OpenSIPS-Users] OpenSIPs w/ Fail2Ban - Config ERROR cannot restart OpenSIPS after changes to OpenSIPs.cfg

2021-02-10 Thread Rick McGill - ₪
Dear OpenSIPs Community,

My goal for this topic is to get Fail2Ban working with OpenSIPs log files.
Same like the instructions in URL link below.

I have tried to follow the directions in this link but the code to edit the
logging of OpenSIPs looks at bit different on my new fresh install of
OpenSIPs 3.1 on Debian 10.7.
https://www.opensips.org/Documentation/Tutorials-Fail2Ban

The is what is in the link above:

---
from:

--

 if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
}




To:

-

$var(auth_code) = www_authorize("", "subscriber");
if ( $var(auth_code) == -1 || $var(auth_code) == -2 ) {
xlog("L_NOTICE","Auth error for $fU@$fd from $si cause
$var(auth_code)");
}
if ( $var(auth_code) < 0 ) {
www_challenge("", "0");
exit;
}



The issue is that my new install of OpenSIP has code a bit different.
Instead of "0" it has "AUTH".
And when I change the Code like the TO: section above OpenSIPS will not
start because it says Error in Config File it cannot load opensips.


This is what the default code looks like in the opensips.cfg for OpenSIPS
3.1 after a new fresh install like I have:   Notice that www_challenger is
"auth" and not "0"   I have tried to enter it as '0" as per the instructions
in URL link above but that is when it then causes OpenSIPS to not be able to
restart.


if (is_method("REGISTER")) {
# authenticate the REGISTER requests
if (!www_authorize("", "subscriber")) {
    www_challenge("", "auth");
exit;
}



Rick McGill – CEO
r...@netrovoip.com | r...@netropolitanworks.com 
Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
+66-85557-3000
Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
supp...@netrovoip.com 
  ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
Provider

LetSi.NetroVOIP.com

Video Conference Solution that works with Windows, MAC, Android, and iPhone.
Secure alternative to Zoom for NetroVOIP Cloud PBX customers.   




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