[OpenSIPS-Users] Sending ACK from different port

2013-04-12 Thread Andrei Grav
Hi,

I am facing some strange situation.
Opensips is listening on multiple ports on a single public IP 193.xx.xx.20
on ports: 5060, 26999, 36999
Asterisk is on 193.xx.xx.24:5060

Sometimes Opensips respond from 5060 to a 200OK instead received port.


U 188.xx.xx.173:53929 -> 193.xx.xx.20:26999
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
193.xx.xx.20:26999;received=193.xx.xx.20;branch=z9hG4bK46cd.df220482.1.
Via: SIP/2.0/UDP
193.xx.xx.24:5060;rport=5060;received=193.xx.xx.24;branch=z9hG4bK218bf88e.
Record-Route:
.
Record-Route: .
Call-ID: 5ebb1c01580da34c694b320e0627d...@sip.mydomain.com.
From: "User" ;tag=as61ef6194.
To: ;tag=Yab-MAmXkF5lAQq2E6QpifQ8xa9xDoU7.
CSeq: 102 INVITE.
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER,
MESSAGE, OPTIONS.
Contact: .
Supported: replaces, 100rel, timer, norefersub.
Content-Type: application/sdp.
Content-Length: 294.
.
v=0.
o=- 3574781465 3574781466 IN IP4 188.xx.xx.173.
s=pjmedia.
c=IN IP4 188.xx.xx.173.
t=0 0.
m=audio 4006 RTP/AVP 18 101.
c=IN IP4 188.xx.xx.173.
a=rtcp:4007 IN IP4 188.xx.xx.173.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.


U 193.xx.xx.20:5060 -> 188.xx.xx.173:53929
ACK sip:850...@188.xx.xx.173:53929;ob SIP/2.0.
Via: SIP/2.0/UDP 193.xx.xx.20:26999;branch=z9hG4bK46cd.df220482.3.
Via: SIP/2.0/UDP
193.xx.xx.24:5060;rport=5060;received=193.xx.xx.24;branch=z9hG4bK63fbcba6.
Max-Forwards: 69.
From: "User" ;tag=as61ef6194.
To: ;tag=Yab-MAmXkF5lAQq2E6QpifQ8xa9xDoU7.
Contact: .
Call-ID: 5ebb1c01580da34c694b320e0627d...@sip.mydomain.com.
CSeq: 102 ACK.
User-Agent: PBX.
Content-Length: 0.
.


the last response should send the response from port 26999 to be ok ... or
the call is hanged up after 32 seconds
U 193.xx.xx.20:26999 -> 188.xx.xx.173:53929

any advice ?

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


[OpenSIPS-Users] Opensips users authentication

2013-04-12 Thread leo
Hello:

I would like to use as user credential his email address, example:
user1 would have username: x...@google.com
user2 would have username: y...@yahoo.it
user3 would have username:z...@anydomain.any

Would this possible? If yes, how?

Thanks a lot.

Leo.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-users-authentication-tp7585816.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] check_source_address not working in 1.9

2013-04-12 Thread Bogdan-Andrei Iancu

Hello,

I'm a bit confused, as what you are claiming is a bit of a nonces - you 
say that is with NOT or without, for the same src IP, you end up in the 
if() block all the time ?!?!


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 04/12/2013 03:41 PM, spady wrote:

Hi Bogdan, here snippet of used code:

*if(!check_source_address("0")){
xlog("LOG: Controllo dell'IP sorgente!\n" );
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
}   
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

consume_credentials();
*

Using this i get *403 Forbidden auth ID*


Using this:

*if(check_source_address("0"))*{
xlog("LOG: Controllo dell'IP sorgente!\n" );
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
}   
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

consume_credentials();

i get:

407 Unauthorized!!






--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/check-source-address-not-working-in-1-9-tp7585808p7585810.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.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] [TRAINING] Schedule for next OpenSIPS eBootcamp sessions

2013-04-12 Thread Andrew Israel
Hello Bogdan:

Hope you are doing well.

Is there a way I could take the bootcamp a second time at some kind of
reduced cost.
The last time I took the class I was dealing with gravely ill parent
and was not able to
have the time to work through the exercises.  There were also some
issues with the documentation and I would about getting lost pretty
quickly.

I would be willing to help do some kind of volunteer work with
documentation/blog writing or anything else you can thing of in
exchange for this. I have over 14 years of experience with technical
writing and I think I could really help  a lot of users who are
struggling with building out  I am also fluent in spanish.

My plan is to use Open Sips to build out labs for American
corporations who need to have a prescence over seas. I have experience
with 3 banks here in the states.

Love what you are doing with the Open Sips architecture.

Andrew




On 4/10/13, Bogdan-Andrei Iancu  wrote:
> Hello,
>
> The future sessions of OpenSIPS eBootcamp are scheduled for the next 12
> months :
>
>   May 26th 2013
>
>   September 2nd 2013
>
>   November 4th 2013
>
>   March 3rd 2014
>
> As usual, all information can be found on
> http://www.opensips.org/Training/EBootcamp
>
> Best regards,
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.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] check_source_address not working in 1.9

2013-04-12 Thread spady
Hi Bogdan, here snippet of used code:

*if(!check_source_address("0")){
xlog("LOG: Controllo dell'IP sorgente!\n" );
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
}   
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

consume_credentials();
*

Using this i get *403 Forbidden auth ID*


Using this:

*if(check_source_address("0"))*{
xlog("LOG: Controllo dell'IP sorgente!\n" );
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
}   
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

consume_credentials();

i get:

407 Unauthorized!!






--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/check-source-address-not-working-in-1-9-tp7585808p7585810.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] check_source_address not working in 1.9

2013-04-12 Thread Bogdan-Andrei Iancu

Hello,

I see the logs saying :
DBG:permissions:match_subnet_table: match found in the subnet table

Have you checked the return code of the function, at script level ? it 
is true or false ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 04/12/2013 12:36 PM, spady wrote:

Hi all, i am facing issue on using "check_source_address"

Opensips v. : OpenSIPS (1.9.0-notls (i386/linux))

Database entries:

mysql>  select * from address;
++-+---+--+--+---+-+--+
| id | grp | ip| mask | port | proto | pattern | context_info |
++-+---+--+--+---+-+--+
|  6 |   0 | 10.9.6.3  |   24 |0 | ANY   | |  |
|  5 |   0 | 172.16.55.201 |   24 |0 | ANY   | |  |
++-+---+--+--+---+-+--+


Subnet Dump:

root@opensips:./opensipsctl fifo subnet_dump
0<0, 10.9.6.0, 255.255.255.0, 0>
1<0, 172.16.55.0, 255.255.255.0, 0>

Address Relod log;

Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: number of rows in address table: 2
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: Tuple<10.9.6.3, 0, 24, 0>  inserted
into subnet table
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: Tuple<172.16.55.201, 0, 24, 0>
inserted into subnet table
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: address table reloaded successfully.



Call logs:


Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:check_src_addr_3: Looking for :<0, 172.16.55.201, 53109, 2>
in tables
Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:hash_match: no match in the hash table
Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:match_subnet_table: match found in the subnet table



Snippet of code:

if(!check_source_address("0")){
 if (!proxy_authorize("", "subscriber")) {
 proxy_challenge("", "0");
 exit;


Any idea?

Regards



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/check-source-address-not-working-in-1-9-tp7585808.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.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] check_source_address not working in 1.9

2013-04-12 Thread spady
Hi all, i am facing issue on using "check_source_address" 

Opensips v. : OpenSIPS (1.9.0-notls (i386/linux)) 

Database entries: 

mysql> select * from address; 
++-+---+--+--+---+-+--+ 
| id | grp | ip| mask | port | proto | pattern | context_info | 
++-+---+--+--+---+-+--+ 
|  6 |   0 | 10.9.6.3  |   24 |0 | ANY   | |  | 
|  5 |   0 | 172.16.55.201 |   24 |0 | ANY   | |  | 
++-+---+--+--+---+-+--+ 


Subnet Dump: 

root@opensips:./opensipsctl fifo subnet_dump 
   0 <0, 10.9.6.0, 255.255.255.0, 0> 
   1 <0, 172.16.55.0, 255.255.255.0, 0>   

Address Relod log; 

Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: number of rows in address table: 2 
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: Tuple <10.9.6.3, 0, 24, 0> inserted
into subnet table 
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: Tuple <172.16.55.201, 0, 24, 0>
inserted into subnet table 
Apr 10 10:50:44 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2812]:
DBG:permissions:reload_address_table: address table reloaded successfully.



Call logs: 


Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:check_src_addr_3: Looking for : <0, 172.16.55.201, 53109, 2>
in tables 
Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:hash_match: no match in the hash table 
Apr 10 10:52:00 opensips
/usr/local/opensips_proxy_1.9.0/sbin/opensips[2819]:
DBG:permissions:match_subnet_table: match found in the subnet table 



Snippet of code: 

if(!check_source_address("0")){ 
if (!proxy_authorize("", "subscriber")) { 
proxy_challenge("", "0"); 
exit; 


Any idea? 

Regards 



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/check-source-address-not-working-in-1-9-tp7585808.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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