Re: [OpenSIPS-Users] Problem with Un-authenticated calls coming from a Asterisk gateway : need to restrict access

2010-04-14 Thread Bogdan-Andrei Iancu
yes, use the xlog() statement and print whatever you want - it is just to see (in logs) that the execution got to the source checking: if (!(method==REGISTER) is_from_local()) { xlog(--- before doing check_source_address\n); if (!check_source_address(0))

Re: [OpenSIPS-Users] Problem with Un-authenticated calls coming from a Asterisk gateway : need to restrict access

2010-04-13 Thread Bogdan-Andrei Iancu
Hello Roberto, I think the problem is with the network mask you used when adding the IP : IP : 192.168.1.19 Mask: 255.255.255.0 This rule will allow 192.168.1.xxx block of IPs - this is why the second asterisk works too ;) Try using the 255.255.255.255 mask (of course remove the

Re: [OpenSIPS-Users] Problem with Un-authenticated calls coming from a Asterisk gateway : need to restrict access

2010-04-13 Thread Roberto Ovani
Sorry, there is a mistake in what I wrote: I did: osipsconsole address add 0 192.168.1.19 255.255.255.*255* UDP 5060 (not 255.255.255.0) and opensips makes the call pass the same, from 192.168.1.20. I had a look into the db entries: there is something like address=192.168.1.19 mask =

Re: [OpenSIPS-Users] Problem with Un-authenticated calls coming from a Asterisk gateway : need to restrict access

2010-04-13 Thread Roberto Ovani
Il martedì 13/04/10 14.12, Bogdan-Andrei Iancu ha scritto: maybe your call does not get to the check_source_address() check - put some xlog to see if the script execution gets in that part. Regards, Bogdan Roberto Ovani wrote: Sorry, there is a mistake in what I wrote: I did:

[OpenSIPS-Users] Problem with Un-authenticated calls coming from a Asterisk gateway : need to restrict access

2010-04-12 Thread Roberto Ovani
I'm using opensips 1.6.1, on Ubuntu 9.10 server (192.168.1.12) I configured an asterisk box (192.168.1.19) to for PSTN. I'm trying to restrict access, to prevent false authentication from unauthorized users except the gateway I set up. from the terminal, i wrote : /osipsconsole address add 0