Re: [OpenSIPS-Users] ANIs check for source number
i tried to using is_uri_user_e164 () but it will allow anything with '+' sign, like if i set +1001 its allowing... I want to match E.164 or ANI string match logic so it should be something like 16463272823 44635364894 like those number.. i don't want send random string to my SIP provide so they can block me.. On Thu, Apr 30, 2015 at 4:38 PM, Newlin, Ben wrote: > There is also a function in the URI module for checking if the user > portion of a URI is an E.164 number. > > http://www.opensips.org/html/docs/modules/1.11.x/uri.html#id294513 > > From: , Aron > Reply-To: OpenSIPS users mailling list > Date: Thursday, April 30, 2015 at 1:20 PM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] ANIs check for source number > > yes of course you can use just a regex. That would need to match any > standard ^\+?[1-9]\d{1,14}$ BTW, 011 (as countrycode plus number) I > think is invalid form, the stranded allows ANI to be up to 15 digit and > does not have a min length. > > ___ > 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] ANIs check for source number
Thanks Ben, didn't know that. On Thu, Apr 30, 2015 at 4:38 PM, Newlin, Ben wrote: > There is also a function in the URI module for checking if the user > portion of a URI is an E.164 number. > > http://www.opensips.org/html/docs/modules/1.11.x/uri.html#id294513 > > From: , Aron > Reply-To: OpenSIPS users mailling list > Date: Thursday, April 30, 2015 at 1:20 PM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] ANIs check for source number > > yes of course you can use just a regex. That would need to match any > standard ^\+?[1-9]\d{1,14}$ BTW, 011 (as countrycode plus number) I > think is invalid form, the stranded allows ANI to be up to 15 digit and > does not have a min length. > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Aron Podrigal - //Be happy :-) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] ANIs check for source number
There is also a function in the URI module for checking if the user portion of a URI is an E.164 number. http://www.opensips.org/html/docs/modules/1.11.x/uri.html#id294513 From: , Aron Reply-To: OpenSIPS users mailling list Date: Thursday, April 30, 2015 at 1:20 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] ANIs check for source number yes of course you can use just a regex. That would need to match any standard ^\+?[1-9]\d{1,14}$ BTW, 011 (as countrycode plus number) I think is invalid form, the stranded allows ANI to be up to 15 digit and does not have a min length. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] ANIs check for source number
yes of course you can use just a regex. That would need to match any standard ^\+?[1-9]\d{1,14}$ BTW, 011 (as countrycode plus number) I think is invalid form, the stranded allows ANI to be up to 15 digit and does not have a min length. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] ANIs check for source number
Do you think instead of using dialplan i can just use Regex like ^(011|\+)[1-9][0-9]{10,14} to match Source string? Dialplan is advance method which use transformation etc.. we we don't need. We just want to make sure Source address is compliant with ANIs or E.164 standard because out SIP provide doesn't allow random 4 or 5 digit string in RPID or FROM. What do you suggest? On Thu, Apr 30, 2015 at 12:56 PM, Podrigal, Aron wrote: > Have a look here > http://www.opensips.org/html/docs/modules/1.11.x/dialplan.html#id294016 > > On Thu, Apr 30, 2015 at 12:49 PM, Satish Patel > wrote: > >> I believe dialplan only check destination number, doesn't it? How it >> will work with Source number which is coming inside RPID/PAI/From: header? >> >> On Thu, Apr 30, 2015 at 12:30 PM, Podrigal, Aron < >> ar...@guaranteedplus.com> wrote: >> >>> You can use the dialplan module to check against valid ANIs and reply >>> with a 403. >>> >>> On Thu, Apr 30, 2015 at 12:09 PM, Satish Patel >>> wrote: >>> Question: what happen if client send call using random string in RPID/PAI/From header (non-standard ANIs) How to verify ANIs for those headers? is there a blacklist or any method which scan ANIs for source and block them? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> -- >>> Aron Podrigal >>> - >>> //Be happy :-) >>> >>> ___ >>> 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 >> >> > > > -- > Aron Podrigal > - > //Be happy :-) > > ___ > 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] ANIs check for source number
Have a look here http://www.opensips.org/html/docs/modules/1.11.x/dialplan.html#id294016 On Thu, Apr 30, 2015 at 12:49 PM, Satish Patel wrote: > I believe dialplan only check destination number, doesn't it? How it will > work with Source number which is coming inside RPID/PAI/From: header? > > On Thu, Apr 30, 2015 at 12:30 PM, Podrigal, Aron > wrote: > >> You can use the dialplan module to check against valid ANIs and reply >> with a 403. >> >> On Thu, Apr 30, 2015 at 12:09 PM, Satish Patel >> wrote: >> >>> Question: what happen if client send call using random string in >>> RPID/PAI/From header (non-standard ANIs) How to verify ANIs for those >>> headers? is there a blacklist or any method which scan ANIs for source and >>> block them? >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> >> >> -- >> Aron Podrigal >> - >> //Be happy :-) >> >> ___ >> 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 > > -- Aron Podrigal - //Be happy :-) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] ANIs check for source number
I believe dialplan only check destination number, doesn't it? How it will work with Source number which is coming inside RPID/PAI/From: header? On Thu, Apr 30, 2015 at 12:30 PM, Podrigal, Aron wrote: > You can use the dialplan module to check against valid ANIs and reply with > a 403. > > On Thu, Apr 30, 2015 at 12:09 PM, Satish Patel > wrote: > >> Question: what happen if client send call using random string in >> RPID/PAI/From header (non-standard ANIs) How to verify ANIs for those >> headers? is there a blacklist or any method which scan ANIs for source and >> block them? >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > > -- > Aron Podrigal > - > //Be happy :-) > > ___ > 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] ANIs check for source number
You can use the dialplan module to check against valid ANIs and reply with a 403. On Thu, Apr 30, 2015 at 12:09 PM, Satish Patel wrote: > Question: what happen if client send call using random string in > RPID/PAI/From header (non-standard ANIs) How to verify ANIs for those > headers? is there a blacklist or any method which scan ANIs for source and > block them? > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Aron Podrigal - //Be happy :-) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users