Re: [OpenSIPS-Users] Userblacklist module with mongodb

2020-07-29 Thread ryan embgrets
Hi,
I can gladly confirm that the above patch works like charm. :) Thank you
very much.
Would this be available in the next releases of 3.0.x or 3.1.x ?

Ryan.

On Wed, 29 Jul 2020 at 03:21, Liviu Chircu  wrote:

> On 27.07.2020 12:14, ryan embgrets wrote:
> > Any pointer?
> >
> > I am using mongo for other modules and don't want to keep separate
> > database(mysql) for this module only
> >
> > Ryan.
>
> Hey, Ryan!
>
> Could you please apply the following patch within an OpenSIPS source
> code tree, then rebuild and see if it makes userblacklist happy?  I
> expect it to apply on any OpenSIPS version, really.
>
> git apply <(base64 -d <
> ZGlmZiAtLWdpdCBhL21vZHVsZXMvdXNlcmJsYWNrbGlzdC9kYi5jIGIvbW9kdWxlcy91c2VyYmxh
>
> Y2tsaXN0L2RiLmMKaW5kZXggYzg0OGMzNDczLi4yNjI0YzM2OWYgMTAwNjQ0Ci0tLSBhL21vZHVs
>
> ZXMvdXNlcmJsYWNrbGlzdC9kYi5jCisrKyBiL21vZHVsZXMvdXNlcmJsYWNrbGlzdC9kYi5jCkBA
>
> IC0xMDcsNyArMTA3LDcgQEAgaW50IGRiX2J1aWxkX3VzZXJibF90cmVlKGNvbnN0IHN0ciAqdXNl
>
> cm5hbWUsIGNvbnN0IHN0ciAqZG9tYWluLCBjb25zdCBzdHIgKnRhYmwKIAlpZiAoUkVTX0NPTF9O
>
> KHJlcykgPiAxKSB7CiAJCWZvcihpID0gMDsgaSA8IFJFU19ST1dfTihyZXMpOyBpKyspIHsKIAkJ
>
> CWlmICgoIVJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBdLm51bCkgJiYgKCFSRVNfUk9XUyhyZXMp
>
> W2ldLnZhbHVlc1sxXS5udWwpKSB7Ci0JCQkJaWYgKChSRVNfUk9XUyhyZXMpW2ldLnZhbHVlc1sw
>
> XS50eXBlID09IERCX1NUUklORykgJiYKKwkJCQlpZiAoKFJFU19ST1dTKHJlcylbaV0udmFsdWVz
>
> WzBdLnR5cGUgPT0gREJfU1RSSU5HIHx8IFJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBdLnR5cGUg
>
> PT0gREJfU1RSKSAmJgogCQkJCQkoUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMV0udHlwZSA9PSBE
>
> Ql9JTlQpKSB7CiAKIAkJCQkJLyogTE1fREJHKCJpbnNlcnQgaW50byB0cmVlIHByZWZpeCAlcywg
>
> d2hpdGVsaXN0ICVkIiwKQEAgLTE1NCw3ICsxNTQsNyBAQCBpbnQgZGJfcmVsb2FkX3NvdXJjZShj
>
> b25zdCBzdHIgKnRhYmxlLCBzdHJ1Y3QgZHRfbm9kZV90ICpyb290KQogCWlmIChSRVNfQ09MX04o
>
> cmVzKSA+IDEpIHsKIAkJZm9yKGkgPSAwOyBpIDwgUkVTX1JPV19OKHJlcyk7IGkrKykgewogCQkJ
>
> aWYgKCghUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMF0ubnVsKSAmJiAoIVJFU19ST1dTKHJlcylb
>
> aV0udmFsdWVzWzFdLm51bCkpIHsKLQkJCQlpZiAoKFJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBd
>
> LnR5cGUgPT0gREJfU1RSSU5HKSAmJgorCQkJCWlmICgoUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNb
>
> MF0udHlwZSA9PSBEQl9TVFJJTkcgfHwgUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMF0udHlwZSA9
>
> PSBEQl9TVFIpICYmCiAJCQkJCShSRVNfUk9XUyhyZXMpW2ldLnZhbHVlc1sxXS50eXBlID09IERC
>
> X0lOVCkpIHsKIAogCQkJCQkvKiBMTV9EQkcoImluc2VydCBpbnRvIHRyZWUgcHJlZml4ICVzLCB3
> aGl0ZWxpc3QgJWQiLAo=
> EOF
> )
>
> Cheers,
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit 2020 Distributed
>www.opensips.org/events/Summit-2020Distributed
>
>
> ___
> 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 Summit 2020 Distributed is set!

2020-07-29 Thread Bogdan-Andrei Iancu

Hello all,

Here is the #UPDATE2 !

WE worked out all the details and we will have an OpenSIPS 3.1 training 
during the Summit 2020. We do not like to break the patterns ;).


The training will be of course online and it will take place on Tuesday 
15th of September (due timing consideration we ruled out the idea of 
having the training in the same days with the conference and also we do 
not like Mondays - this is how we ended up with Tuesday).
The training will be a 4-5 hours session with theoretical and practical 
labs covering the Call API and Media Exchanging with OpenSIPS 3.1. See 
the description of the training here [1].



For the people who already registered for the Free Conference of the 
Summit, no worries, you can retake the registration process [2] using 
the same email address, and your existing registration will get updated.



[1] 
https://www.opensips.org/events/Summit-2020Distributed/index.html#schedules 
(see Tuesday 15th)


[2] 
https://www.opensips.org/events/Summit-2020Distributed/index.html#pricing


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2020 online
  https://www.opensips.org/events/Summit-2020Distributed/

On 7/23/20 2:29 PM, Bogdan-Andrei Iancu wrote:

Hello all,

As a quick update here. The *free registration is now open*, so not 
miss the chance for winning some OpenSIPS prizes! Register and you 
will be part of the raffle.


https://www.opensips.org/events/Summit-2020Distributed/#pricing

Also we are working to provide an OpenSIPS 3.1 specific training, 
around *4 hours online training* in the next day after the summit 
(this is not part of the free registration). The training will cover 
*Call API, Push Notification or Media Exchange labs* - again, this is 
work in progress, but next week will announce it and open 
registrations for it also ;)


Best regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2020 online
   https://www.opensips.org/events/Summit-2020Distributed/
On 7/16/20 7:08 PM, Bogdan-Andrei Iancu wrote:


Bye-Bye Amsterdam, welcome Online – the "OpenSIPS Summit 2020" 
becomes the "OpenSIPS Summit Distributed 2020", a free, live and 
interactive online event.


5th - 11th of September - are you ready to join us?

https://blog.opensips.org/2020/07/16/opensips-summit-2020-distributed/


See you over the Internet,




___
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] re.subst usage

2020-07-29 Thread Barnaby Ritchley
Hi Liviu,

Thats perfect - didn’t even think of that! [0-9] instead of \d works great.

Thanks again!


> On 29 Jul 2020, at 14:14, Liviu Chircu  wrote:
> 
> I would guess that the PCRE library does not support the "\d" literal, which 
> also seems to be confirmed by this site [1].  The 
> "/\+?[0-9]{5}([1-9][0-9]+)/\1/g" regexp should remove your tech prefix as 
> expected.
> 
> BR,
> 
> [1]: https://www.regular-expressions.info/shorthand.html 
> 

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


Re: [OpenSIPS-Users] re.subst usage

2020-07-29 Thread Ben Newlin
Also, if you know the length of the prefix you could just s.substr.

https://www.opensips.org/Documentation/Script-Tran-3-1#s.substr


Ben Newlin

From: Users  on behalf of Liviu Chircu 

Reply-To: OpenSIPS users mailling list 
Date: Wednesday, July 29, 2020 at 9:15 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] re.subst usage

On 29.07.2020 15:44, Barnaby Ritchley wrote:
With $rU of 12345441234567890 we would expect $var(to_user) to be 441234567890 
(stripping off the first 5 digits) however $var(to_user) returns 
12345441234567890

What am I doing wrong?


Hey Barnaby,

I would guess that the PCRE library does not support the "\d" literal, which 
also seems to be confirmed by this site [1].  The 
"/\+?[0-9]{5}([1-9][0-9]+)/\1/g" regexp should remove your tech prefix as 
expected.

BR,

[1]: 
https://www.regular-expressions.info/shorthand.html

--

Liviu Chircu

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



OpenSIPS Summit 2020 Distributed

  
www.opensips.org/events/Summit-2020Distributed
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] re.subst usage

2020-07-29 Thread Liviu Chircu

On 29.07.2020 15:44, Barnaby Ritchley wrote:
With $rU of 12345441234567890 we would expect $var(to_user) to be 
441234567890 (stripping off the first 5 digits) however 
$var(to_user) returns 12345441234567890

What am I doing wrong?


Hey Barnaby,

I would guess that the PCRE library does not support the "\d" literal, 
which also seems to be confirmed by this site [1].  The 
"/\+?[0-9]{5}([1-9][0-9]+)/\1/g" regexp should remove your tech prefix 
as expected.


BR,

[1]: https://www.regular-expressions.info/shorthand.html

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

OpenSIPS Summit 2020 Distributed
  www.opensips.org/events/Summit-2020Distributed

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


[OpenSIPS-Users] re.subst usage

2020-07-29 Thread Barnaby Ritchley
Hi List,
 
Using below in route:
 
$var(reg) = "/\+?\d{5}([1-9]\d+)/\1/g";
$var(to_user) = $(rU{re.subst,$var(reg)});
 
With $rU of 12345441234567890 we would expect $var(to_user) to be 441234567890 
(stripping off the first 5 digits) however $var(to_user) returns 
12345441234567890
 
What am I doing wrong?


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


Re: [OpenSIPS-Users] Dynamic Routing Stats

2020-07-29 Thread Mark Farmer
Thanks Razvan. I will look into using that.

Is it possible to add such stats to drouting? I'm guessing it would be
useful to others too.
Feature request?

Best regards
Mark.



On Mon, 27 Jul 2020 at 08:23, Răzvan Crainea  wrote:

> Hi, Mark!
>
> Unfortunately the drouting module does not export any statistics. You
> can however use the statistics module[1] and define your own statistics,
> that you have to manually update them from the script according to your
> needs.
>
> [1] https://opensips.org/docs/modules/3.1.x/statistics.html
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 7/17/20 4:39 PM, Mark Farmer wrote:
> > Hi everyone
> >
> > I have been asked to look into getting Nagios to monitor active calls on
> > specific Dynamic Routing gateways.
> >
> > Looking at the drouting() docs I don't see any exported statistics.
> > Is there a way to do this please?
> >
> > Many thanks
> > Mark.
> >
> >
> > ___
> > 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
>


-- 
Mark Farmer
farm...@gmail.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Userblacklist module with mongodb

2020-07-29 Thread Liviu Chircu

On 27.07.2020 12:14, ryan embgrets wrote:

Any pointer?

I am using mongo for other modules and don't want to keep separate 
database(mysql) for this module only


Ryan.


Hey, Ryan!

Could you please apply the following patch within an OpenSIPS source 
code tree, then rebuild and see if it makes userblacklist happy?  I 
expect it to apply on any OpenSIPS version, really.


git apply <(base64 -d