Re: [OpenSIPS-Users] Adding subscribers?

2009-05-14 Thread Romanov Vladimir
I can post sources on C#.

-
Vladimir Romanov
Yota Lab | http://www.yota.ru<http://www.yota.ru/>
CTO
+7 (960) 239-0853

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Matti Zemack
Sent: Thursday, May 14, 2009 6:55 PM
To: Romanov Vladimir; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Adding subscribers?

Hi,

Thanks for your response.
May I ask if that's done by direct MySQL INSERTs?

Regards,
Matti Zemack, Stockholm, Sweden

From: Romanov Vladimir [mailto:vroma...@yota.ru]
Sent: den 14 maj 2009 16:54
To: Matti Zemack; users@lists.opensips.org
Subject: RE: Adding subscribers?

I wrote small windows application to bulk add subscribers for performance test. 
 Using this application I add 1 000 000 users in minute

-
Vladimir Romanov
Yota Lab | http://www.yota.ru<http://www.yota.ru/>
CTO
+7 (960) 239-0853

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Matti Zemack
Sent: Thursday, May 14, 2009 6:23 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Adding subscribers?

Hi all,

How do you all add new subscribers to your systems?
Today we do it by  calling "opensipsctl add sdh...@asdjkhsd djhjhd" from our 
admin-php.
Looking through the code of opensipsctl it seems to make an SQL query inserting 
the new user straight into the Databse without passing FIFO or such.

Does there exist a more "modern" way of doing this or is this the procedure 
used nowadays?

BTW, Anyone interested in the final PHP code of triggering a reboot of Linksys 
and Grandstream using XML-RPC, just let me know. Actually also some code of 
reboot of Siemens devices, although not through opensips.

Best Regards,
Matti Zemack, Stockholm, Sweden



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


Re: [OpenSIPS-Users] Adding subscribers?

2009-05-14 Thread Romanov Vladimir
Yes. I use direct inserts. To speedup processing I use batches. Every insert 
create 100 users.

-
Vladimir Romanov
Yota Lab | http://www.yota.ru<http://www.yota.ru/>
CTO
+7 (960) 239-0853

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Matti Zemack
Sent: Thursday, May 14, 2009 6:55 PM
To: Romanov Vladimir; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Adding subscribers?

Hi,

Thanks for your response.
May I ask if that's done by direct MySQL INSERTs?

Regards,
Matti Zemack, Stockholm, Sweden

From: Romanov Vladimir [mailto:vroma...@yota.ru]
Sent: den 14 maj 2009 16:54
To: Matti Zemack; users@lists.opensips.org
Subject: RE: Adding subscribers?

I wrote small windows application to bulk add subscribers for performance test. 
 Using this application I add 1 000 000 users in minute

-
Vladimir Romanov
Yota Lab | http://www.yota.ru<http://www.yota.ru/>
CTO
+7 (960) 239-0853

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Matti Zemack
Sent: Thursday, May 14, 2009 6:23 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Adding subscribers?

Hi all,

How do you all add new subscribers to your systems?
Today we do it by  calling "opensipsctl add sdh...@asdjkhsd djhjhd" from our 
admin-php.
Looking through the code of opensipsctl it seems to make an SQL query inserting 
the new user straight into the Databse without passing FIFO or such.

Does there exist a more "modern" way of doing this or is this the procedure 
used nowadays?

BTW, Anyone interested in the final PHP code of triggering a reboot of Linksys 
and Grandstream using XML-RPC, just let me know. Actually also some code of 
reboot of Siemens devices, although not through opensips.

Best Regards,
Matti Zemack, Stockholm, Sweden



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


Re: [OpenSIPS-Users] Adding subscribers?

2009-05-14 Thread Romanov Vladimir
I wrote small windows application to bulk add subscribers for performance test. 
 Using this application I add 1 000 000 users in minute

-
Vladimir Romanov
Yota Lab | http://www.yota.ru
CTO
+7 (960) 239-0853

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Matti Zemack
Sent: Thursday, May 14, 2009 6:23 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Adding subscribers?

Hi all,

How do you all add new subscribers to your systems?
Today we do it by  calling "opensipsctl add sdh...@asdjkhsd djhjhd" from our 
admin-php.
Looking through the code of opensipsctl it seems to make an SQL query inserting 
the new user straight into the Databse without passing FIFO or such.

Does there exist a more "modern" way of doing this or is this the procedure 
used nowadays?

BTW, Anyone interested in the final PHP code of triggering a reboot of Linksys 
and Grandstream using XML-RPC, just let me know. Actually also some code of 
reboot of Siemens devices, although not through opensips.

Best Regards,
Matti Zemack, Stockholm, Sweden




RTC Factory AB
Jungfrugatan 6
114 44 Stockholm
SWEDEN

Tel: +46-8 410 420 03
SMS: +46-709 625 173
Fax: +46-8 410 420 49
Email: matti.zem...@rtcfactory.com


RTC Factory is a global communications provider, targeting virtual operators 
and ISPs. RTC Factory provides "Communication as a Service": basically the 
equivalent of Google's GrandCentral combined with Skype and Rebtel 
functionality. These IP-based services are hosted and provided within a 
white-label framework, and sold through the provider's regular sales channels.

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


Re: [OpenSIPS-Users] 488 Not acceptable here

2009-04-11 Thread Romanov Vladimir
This is bug. I solve this problem by upgrading to 1.5.0

-
Vladimir Romanov
Yota Lab | http://www.yota.ru
CTO
+7 (960) 239-0853


-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of troxlinux
Sent: Saturday, April 11, 2009 9:17 AM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] 488 Not acceptable here

Hi list , I am making some tests with a server opensips and  adds him
the rtpproxy for the nat, the problem is that when adding the nat and
to call to an extension that  don't answer it doesn't jump me to the
asterisk voicemail and it shows me an error 488

I explain that in the same server opensips I have installed asterisk
, in the asterisk cli when the call is not answered he throws me this
error:


WARNING[3178]: chan_sip.c:5201 process_sdp: Unable to lookup host in
c= line, 'IN IP4 192.168.10.3192.168.10.3'

the sdp writes it twice , as I can avoid this?

## log sip##


#
U +0.019539 192.168.10.30:5064 -> 192.168.10.3:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.3:5060;branch=0
From: sip:pin...@192.168.10.3;tag=cd0baa81
To: sip:192.168.10.30:5064;tag=a8c59398c8984470
Call-ID: 9528c331-0c6e364...@192.168.10.3
CSeq: 1 OPTIONS
User-Agent: Grandstream GXP2020 1.1.6.16
Contact: 
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Supported: replaces, timer
Content-Length: 0


#
U +2.000872 192.168.10.3:5060 -> 192.168.10.3:5070
INVITE sip:u...@192.168.10.3:5070 SIP/2.0
Record-Route: 
Via: SIP/2.0/UDP 192.168.10.3;branch=z9hG4bKb977.26ab18f7.1
Via: SIP/2.0/UDP
192.168.10.19:5060;rport=5060;received=192.168.10.19;branch=z9hG4bK-a8ea22ed
From: ;tag=42d5a8fbdbb60640o0
To: "Opensips-14x" 
Call-ID: f6dccfd7-7f5fa...@192.168.10.19
CSeq: 102 INVITE
Max-Forwards: 69
Contact: 
Expires: 240
User-Agent: Linksys/SPA942-6.1.3(a)
Content-Length: 263
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
P-hint: inbound->inbound
P-hint: Route[20]: Rtpproxy
P-hint: Route[20]: Rtpproxy

v=0
o=- 811136 811136 IN IP4 192.168.10.19
s=-
c=IN IP4 192.168.10.3192.168.10.3
t=0 0
m=audio 3500435006 RTP/AVP 18 101
a=rtpmap:18 G729a/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
a=nortpproxy:yes
a=nortpproxy:yes

#
U +0.000123 192.168.10.3:5060 -> 192.168.10.30:5064
CANCEL sip:2...@192.168.10.30:5064;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.10.3;branch=z9hG4bKb977.26ab18f7.0
From: ;tag=42d5a8fbdbb60640o0
Call-ID: f6dccfd7-7f5fa...@192.168.10.19
To: "Opensips-14x" 
CSeq: 102 CANCEL
Max-Forwards: 70
User-Agent: OpenSIPS (1.4.5-notls (i386/linux))
Content-Length: 0


#
U +0.001572 192.168.10.3:5070 -> 192.168.10.3:5060
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP
192.168.10.3;branch=z9hG4bKb977.26ab18f7.1;received=192.168.10.3
Via: SIP/2.0/UDP
192.168.10.19:5060;rport=5060;received=192.168.10.19;branch=z9hG4bK-a8ea22ed
From: ;tag=42d5a8fbdbb60640o0
To: "Opensips-14x" ;tag=as50300fb2
Call-ID: f6dccfd7-7f5fa...@192.168.10.19
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


#
U +0.000244 192.168.10.3:5060 -> 192.168.10.3:5070
ACK sip:u...@192.168.10.3:5070 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.3;branch=z9hG4bKb977.26ab18f7.1
From: ;tag=42d5a8fbdbb60640o0
Call-ID: f6dccfd7-7f5fa...@192.168.10.19
To: "Opensips-14x" ;tag=as50300fb2
CSeq: 102 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.4.5-notls (i386/linux))
Content-Length: 0


regardss

-- 
rickygm

http://gnuforever.homelinux.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] RtpRroxy sturtup (init.d) script for redhat

2009-04-07 Thread Romanov Vladimir
Hi!
Could you please add command line option to change syslog FACILITY? Now I 
simply modify this in source and recompile.

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: Maxim Sobolev [mailto:sobo...@sippysoft.com] 
Sent: Tuesday, April 07, 2009 5:39 AM
To: Bogdan-Andrei Iancu
Cc: Romanov Vladimir; Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] RtpRroxy sturtup (init.d) script for redhat

Bogdan-Andrei Iancu wrote:
> Hi Vladimir,
> 
> really nice, indeed - I did this manually all the time :)
> 
> Maybe Maxim can integrate this directly in the RTPproxy project

Yes, I will do it.

In fact we plan moving towards multi-threading design in the next 
release, which should make utilizing multi-core chips much easier.

Regards,
-- 
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
T/F: +1-646-651-1110
Web: http://www.sippysoft.com
MSN: sa...@sippysoft.com
Skype: SippySoft

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


[OpenSIPS-Users] RtpRroxy sturtup (init.d) script for redhat

2009-04-06 Thread Romanov Vladimir
Hi!
Mybe this is usefull for someone.
This script detect CPU core count and start multiple copies of RtpProxy (one 
instance per core). Also this script divide port range between rtpproxy 
instances. I also have idea to automatically modify table in MySQL with list of 
running proxies
-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853



ncores
Description: ncores


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


[OpenSIPS-Users] Presence problem

2009-03-31 Thread Romanov Vladimir
Hi all!
>From time to time we have strange problem with presence.  Some user publish 
>status and another user or same user get NOTIFY with empty body. Here you can 
>see log.

1)  User 300311 subscribed to 300300. (not in log)

2)  User 300300 publish "closed" status (not in log)

3)  User 300300 unregister/register (not in log)

4)  User 300300 publish status

5)  User 300311 get valid NOTIFY

6)  User 300300 subscribe to 300300

7)  User 300300 get EMPTY NOTIFY.
We see this problem in 1.3.2, 1.4.4 and now in 1.5. After service restart 
problem gone.

U 2009/03/31 20:17:53.670677 10.2.41.227:5060 -> 10.2.170.218:5060
PUBLISH sip:300...@newsip.testik.com SIP/2.0.
Via: SIP/2.0/UDP 
10.2.41.227:5060;rport;branch=z9hG4bKPjLaJO1Wh79YgI70M6DTitndmV63rkQSVd.
Max-Forwards: 70.
From: ;tag=nLcp2myfWOJGOxaeaJYPAupvQymWJVSF.
To: .
Call-ID: 8MO4ZrusKdRT1Y1QsoFzXb0Htk9jBWfk.
CSeq: 26315 PUBLISH.
Event: presence.
SIP-If-Match: a.1238498784.12060.238.4.
Expires: 300.
User-Agent: Scartel SIP Framework.
Content-Type: application/pidf+xml.
Content-Length:   243.
.


 
  
   open
  
 


#
U 2009/03/31 20:17:53.672017 10.2.170.218:5060 -> 10.2.41.227:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
10.2.41.227:5060;rport=5060;branch=z9hG4bKPjLaJO1Wh79YgI70M6DTitndmV63rkQSVd.
From: ;tag=nLcp2myfWOJGOxaeaJYPAupvQymWJVSF.
To: 
;tag=396d496be660f92cee9282162d986068-73b4.
Call-ID: 8MO4ZrusKdRT1Y1QsoFzXb0Htk9jBWfk.
CSeq: 26315 PUBLISH.
Expires: 300.
SIP-ETag: a.1238498784.12064.246.5.
Server: OpenSIPS (1.5.0-notls (x86_64/linux)).
Content-Length: 0.
.

#
U 2009/03/31 20:17:53.672185 10.2.170.218:5060 -> 10.2.42.139:5060
NOTIFY sip:300...@10.2.42.139:5060 SIP/2.0.
Via: SIP/2.0/UDP 10.2.170.218;branch=z9hG4bKba2d.af11f987.0.
To: ;tag=nGKFnGW2tPQmtpG8pL32KU5kkzVsyu49.
From: 
;tag=396d496be660f92cee9282162d986068-36d8.
CSeq: 4 NOTIFY.
Call-ID: TejtOZr.-cCCTnp9ZWS5.kXY0fpI9YMX.
Content-Length: 243.
User-Agent: OpenSIPS (1.5.0-notls (x86_64/linux)).
Max-Forwards: 70.
Event: presence.
Contact: .
Subscription-State: active;expires=263.
Content-Type: application/pidf+xml.
.


 
  
   open
  
 


#
U 2009/03/31 20:17:53.745153 10.2.42.139:5060 -> 10.2.170.218:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
10.2.170.218;received=10.2.170.218;branch=z9hG4bKba2d.af11f987.0.
Call-ID: TejtOZr.-cCCTnp9ZWS5.kXY0fpI9YMX.
From: 
;tag=396d496be660f92cee9282162d986068-36d8.
To: ;tag=nGKFnGW2tPQmtpG8pL32KU5kkzVsyu49.
CSeq: 4 NOTIFY.
Contact: .
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, 
OPTIONS.
Supported: replaces, 100rel, norefersub, P-SSO-Token.
Content-Length:  0.
.

#
U 2009/03/31 20:17:53.880098 10.2.41.227:5060 -> 10.2.170.218:5060
SUBSCRIBE sip:300...@newsip.testik.com SIP/2.0.
Via: SIP/2.0/UDP 
10.2.41.227:5060;rport;branch=z9hG4bKPjVF8rIAAPCMhIVUoVtpmLFFGuHahioPHJ.
Max-Forwards: 70.
From: sip:300...@newsip.testik.com;tag=KRiTvvVB-nTFGqHzxw5A4Q5T7Idi6uf2.
To: sip:300...@newsip.testik.com.
Contact: .
Call-ID: vbjkFc0yWtQvdVJjeh1ikIYlcjPJBPLv.
CSeq: 10353 SUBSCRIBE.
Event: presence.
Expires: 600.
Accept: application/pidf+xml, application/xpidf+xml.
Allow-Events: presence, refer.
User-Agent: Scartel SIP Framework.
Content-Length:  0.
.

#
U 2009/03/31 20:17:53.881794 10.2.170.218:5060 -> 10.2.41.227:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
10.2.41.227:5060;rport=5060;branch=z9hG4bKPjVF8rIAAPCMhIVUoVtpmLFFGuHahioPHJ.
From: sip:300...@newsip.testik.com;tag=KRiTvvVB-nTFGqHzxw5A4Q5T7Idi6uf2.
To: sip:300...@newsip.testik.com;tag=396d496be660f92cee9282162d986068-1cbc.
Call-ID: vbjkFc0yWtQvdVJjeh1ikIYlcjPJBPLv.
CSeq: 10353 SUBSCRIBE.
Expires: 600.
Contact: .
Server: OpenSIPS (1.5.0-notls (x86_64/linux)).
Content-Length: 0.
.

#
U 2009/03/31 20:17:53.882053 10.2.170.218:5060 -> 10.2.41.227:5060
NOTIFY sip:300...@10.2.41.227:5060 SIP/2.0.
Via: SIP/2.0/UDP 10.2.170.218;branch=z9hG4bKa987.ede53722.0.
To: ;tag=KRiTvvVB-nTFGqHzxw5A4Q5T7Idi6uf2.
From: 
;tag=396d496be660f92cee9282162d986068-1cbc.
CSeq: 1 NOTIFY.
Call-ID: vbjkFc0yWtQvdVJjeh1ikIYlcjPJBPLv.
Content-Length: 0.
User-Agent: OpenSIPS (1.5.0-notls (x86_64/linux)).
Max-Forwards: 70.
Event: presence.
Contact: .
Subscription-State: active;expires=600.
.

#
U 2009/03/31 20:17:54.285596 10.2.41.227:5060 -> 10.2.170.218:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
10.2.170.218;received=10.2.170.218;branch=z9hG4bKa987.ede53722.0.
Call-ID: vbjkFc0yWtQvdVJjeh1ikIYlcjPJBPLv.
From: 
;tag=396d496be660f92cee9282162d986068-1cbc.
To: ;tag=KRiTvvVB-nTFGqHzxw5A4Q5T7Idi6uf2.
CSeq: 1 NOTIFY.
Contact: .
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, 
OPTIONS.
Supported: replaces, 100rel, norefersub, P-SSO-Token.
Content-Length:  0.
.

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


Re: [OpenSIPS-Users] OpenSIPS 1.5 gives error installing building db_mysql.so

2009-03-29 Thread Romanov Vladimir
I mean you use wrong symbols in command line - " instead of "

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Khan
Sent: Sunday, March 29, 2009 12:48 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] OpenSIPS 1.5 gives error installing building 
db_mysql.so

Hello every one,

I been having problems with 1.4.4, thus i decided to remove 1.4 before
installing newer version 1.5 to avoid any conflicts but I can't get
any further because the error in building db_mysql module "ERROR:
module modules/"db_mysql"/"db_mysql".so not compiled
"

Following is what I have done...

# rm -R /usr/local/sbin/opensips
# rm -R /usr/local/share/opensips
/*
# rm -R /usr/local/share/opensips


# rm -R /usr/local/lib64/opensips
# rm -R /usr/src/opensips-1.4.4-tls/opensips
/*
# rm -R /usr/src/opensips-1.4.4-tls/opensips

# rm -R /var/lib/mysql/opensips


r...@xxx:/usr/src# tar -xzvf opensips-1.5.0-tls_src.tar.gz
r...@xxx:/usr/src# cd opensips-1.5.0-tls

r...@xxx:/usr/src/opensips-1.5.0-tls# make clean

r...@xxx:/usr/src/opensips-1.5.0-tls# make all include_modules="db_mysql"


r...@xxx:/usr/src/opensips-1.5.0-tls# make prefix=/usr/local install
include_modules="db_mysql"




Please help me resolve this, I really didn't find any solution and I
am really frustrated at this point...



Following is snapshot of the screen...

# install MySQL stuff

if [ "yes" = "yes" ]; then \

mkdir -p /usr/local/lib64/opensips/opensipsctl ; \

sed -e "s#/usr/local/sbin#/usr/local/sbin/#g" \

< scripts/opensipsctl.mysql > 
/tmp/opensipsctl.mysql ; \

install  -m 644 /tmp/opensipsctl.mysql \


/usr/local/lib64/opensips/opensipsctl/opensipsctl.mysql ; \

rm -fr /tmp/opensipsctl.mysql ; \

sed -e 
"s#/usr/local/share/opensips#/usr/local/share/opensips/#g" \

< scripts/opensipsdbctl.mysql > 
/tmp/opensipsdbctl.mysql ; \

touch   
/usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql ; \

install  -m 644 /tmp/opensipsdbctl.mysql
/usr/local/lib64/opensips/opensipsctl/ ; \

rm -fr /tmp/opensipsdbctl.mysql ; \

mkdir -p /usr/local/share/opensips//mysql ; \

for FILE in scripts/mysql/acc-create.sql
scripts/mysql/alias_db-create.sql scripts/mysql/auth_db-create.sql
scripts/mysql/avpops-create.sql scripts/mysql/carrierroute-create.sql
scripts/mysql/closeddial-create.sql scripts/mysql/cpl-create.sql
scripts/mysql/dialog-create.sql scripts/mysql/dialplan-create.sql
scripts/mysql/dispatcher-create.sql scripts/mysql/domain-create.sql
scripts/mysql/domainpolicy-create.sql
scripts/mysql/drouting-create.sql scripts/mysql/group-create.sql
scripts/mysql/imc-create.sql scripts/mysql/lcr-create.sql
scripts/mysql/load_balancer-create.sql scripts/mysql/msilo-create.sql
scripts/mysql/nathelper-create.sql scripts/mysql/pdt-create.sql
scripts/mysql/permissions-create.sql scripts/mysql/presence-create.sql
scripts/mysql/registrar-create.sql scripts/mysql/rls-create.sql
scripts/mysql/siptrace-create.sql scripts/mysql/speeddial-create.sql
scripts/mysql/standard-create.sql scripts/mysql/uri_db-create.sql
scripts/mysql/userblacklist-create.sql scripts/mysql/usrloc-create.sql
; do \

if [ -f $FILE ] ; then \

touch   $FILE \


/usr/local/share/opensips//mysql/`basename "$FILE"` ; \

install  -m 644 $FILE \


/usr/local/share/opensips//mysql/`basename "$FILE"` ; \

fi ;\

done ; \

fi

# install PostgreSQL stuff

if [ "no" = "yes" ]; then \

mkdir -p /usr/local/lib64/opensips/opensipsctl ; \

sed -e "s#/usr/local/sbin#/usr/local/sbin/#g" \

< scripts/opensipsctl.pgsql > 
/tmp/opensipsctl.pgsql ; \

install  -m 644 /tmp/opensipsctl.pgsql \


/usr/local/lib64/opensips/opensipsctl/opensipsctl.pgsql ; \

rm -fr /tmp/opensipsctl.pgsql ; \

sed -e 
"s#/usr/local/share/opensips#/usr/local/share/opensips/#g" \

< scripts/opensipsdbctl.pgsql > 
/tmp/opensipsdbctl.pgsql ; \

touch   
/usr/local/lib64/opensips/opensipsctl/opensipsdbctl.pgsql ; \

install  -m 644 /tmp/opensipsdbctl.pgsql
/usr/local/lib64/opensips/opensipsctl/ ; \

rm -fr /tmp/opensipsdbctl.pgsql ; \

 

Re: [OpenSIPS-Users] New method in alias_db

2009-03-26 Thread Romanov Vladimir
This is path for another module :). Original message about alias_db. Y

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: Mauro Davi' [mailto:mauro.d...@acotel.com] 
Sent: Thursday, March 26, 2009 7:56 PM
To: Bogdan-Andrei Iancu; Romanov Vladimir; users@lists.opensips.org
Subject: R: [OpenSIPS-Users] New method in alias_db

Attached the patch file how bogdan suggested :)

-Messaggio originale-
Da: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Per conto di Bogdan-Andrei Iancu
Inviato: giovedì 26 marzo 2009 17:43
A: Romanov Vladimir; users@lists.opensips.org
Oggetto: Re: [OpenSIPS-Users] New method in alias_db

Ah, so it uses as input the RURI and stores the result in an AVP.

Of so, make it make more sense to rework the function a bit and to take
3 params - table, inputAVP,  outputAVP ; in the way you can translate anyhting 
to an AVP, not only the RURI.



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


Re: [OpenSIPS-Users] New method in alias_db

2009-03-26 Thread Romanov Vladimir
I submit new patch
https://sourceforge.net/tracker/?func=detail&aid=2713792&group_id=232389&atid=1086412

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


[OpenSIPS-Users] New method in alias_db

2009-03-25 Thread Romanov Vladimir
Hi!
I implement new  method in alias_db module - alias_db_find("tablename","avp"). 
This method  similar to alias_db_lookup but use avp as instead of message RURI.
I use this this new method in in this case:

if (uri==myself) {
if (is_method("REGISTER")) {
sl_send_reply("100", "Trying");
$avp(s:alias):=$tu;
if (alias_db_find("dbaliases","$avp(s:alias)")) {
xlog("L_INFO", "Registration was aliased - $tu -> 
$avp(s:alias)\n");
}

if (!www_authorize("_SIP_DOMAIN", "subscriber")) {
  www_challenge("_SIP_DOMAIN", "0");
  return;
};
if (!check_to()) {
 xlog("L_INFO", "Spoofed To-URI detected - M=$rm RURI=$ru F=$fu 
T=$tu IP=$si ID=$ci\n");
 sl_send_reply("403", "Spoofed To-URI Detected");
 exit;
};
if (!save("location","0","$avp(s:alias)"))  {
xlog("L_ERR", "Saving contact failed - M=$rm RURI=$ru F=$fu 
T=$tu IP=$si ID=$ci\n");
sl_reply_error();
}
exit;
};

This method implementationin main part  is copypaste from alias_db_lookup. Is 
this interesting to OpenSips users?
-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


Re: [OpenSIPS-Users] accept messages only from registered users

2009-03-17 Thread Romanov Vladimir
Hi
This function exist only in 1.5 and also not check all rules.
For sample some user can make calls using another registered user 'from' 
address in INVITE

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: Noel R. Morais [mailto:noelro...@gmail.com] 
Sent: Tuesday, March 17, 2009 10:33 PM
To: Romanov Vladimir
Cc: Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] accept messages only from registered users

So,

Use the function "registered(domain [,AOR])". To check the from field
use: registered("location","$fu")

http://www.opensips.org/html/docs/modules/devel/registrar.html#id271315

On Tue, Mar 17, 2009 at 3:41 PM, Romanov Vladimir  wrote:
> Hi Noel!
> This function check message destination user (RURI). I want check source of 
> message.
> 1) From: field
> 2) Contact: field
> 3) Source IP and port
> against records in location table
>
> -
> Vladimir Romanov
> Scartel Star Lab
> CTO
> +7 (960) 239-0853
>
>
> -Original Message-
> From: Noel R. Morais [mailto:noelro...@gmail.com]
> Sent: Tuesday, March 17, 2009 9:30 PM
> To: Romanov Vladimir
> Cc: Users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] accept messages only from registered users
>
> Hi Vladimir,
>
> use the function "lookup(domain)" from the Registrar module.  From the docs:
>
> "The functions extracts username from Request-URI and tries to find
> all contacts for the username in usrloc. If there are no such
> contacts, -1 will be returned. If there are such contacts, Request-URI
> will be overwritten with the contact that has the highest q value and
> optionally the rest will be appended to the message (depending on
> append_branches parameter value)."
>
> Take a look at 
> http://www.opensips.org/html/docs/modules/devel/registrar.html#id271214
>
> Noel
>
> 2009/3/17 Romanov Vladimir :
>> Hi All!
>>
>> How I can create configuration what accept messages only from registered
>> users? How I can check what message (publish, subscribe, invite, message)
>> from registered user?
>>
>> I don’t want to do proxy_authorize.
>>
>> -
>>
>> Vladimir Romanov
>>
>> Scartel Star Lab
>>
>> CTO
>>
>> +7 (960) 239-0853
>>
>>
>>
>> ___
>> 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] accept messages only from registered users

2009-03-17 Thread Romanov Vladimir
Hi Noel!
This function check message destination user (RURI). I want check source of 
message.
1) From: field
2) Contact: field
3) Source IP and port
against records in location table

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: Noel R. Morais [mailto:noelro...@gmail.com] 
Sent: Tuesday, March 17, 2009 9:30 PM
To: Romanov Vladimir
Cc: Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] accept messages only from registered users

Hi Vladimir,

use the function "lookup(domain)" from the Registrar module.  From the docs:

"The functions extracts username from Request-URI and tries to find
all contacts for the username in usrloc. If there are no such
contacts, -1 will be returned. If there are such contacts, Request-URI
will be overwritten with the contact that has the highest q value and
optionally the rest will be appended to the message (depending on
append_branches parameter value)."

Take a look at 
http://www.opensips.org/html/docs/modules/devel/registrar.html#id271214

Noel

2009/3/17 Romanov Vladimir :
> Hi All!
>
> How I can create configuration what accept messages only from registered
> users? How I can check what message (publish, subscribe, invite, message)
> from registered user?
>
> I don’t want to do proxy_authorize.
>
> -
>
> Vladimir Romanov
>
> Scartel Star Lab
>
> CTO
>
> +7 (960) 239-0853
>
>
>
> ___
> 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] accept messages only from registered users

2009-03-17 Thread Romanov Vladimir
Hi All!
How I can create configuration what accept messages only from registered users? 
How I can check what message (publish, subscribe, invite, message) from 
registered user?
I don't want to do proxy_authorize.
-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


Re: [OpenSIPS-Users] 3.00 load avg

2009-03-16 Thread Romanov Vladimir
Hi!
Why you don't want use VM in production? We have plans to use Citrix XenServer. 
We use rptpproxy instead of mediaproxy.

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Jeff Pyle
Sent: Monday, March 16, 2009 9:12 PM
To: Dan Pascu
Cc: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] 3.00 load avg

Hi Dan,

I haven't tried it on a real box yet.  With all the things it hooks into
it's not exactly portable at the moment.  Nothing has changed elsewhere on
the system, either with the emulator, kernels on host or guest, etc.

I'm not *too* worried about it only because the apps on the system (vm) seem
to be running well.  I may drop the v-cpus from 4 to 2 to see if that
adversely affects performance under low load.

For what it's worth I've excellent success with Xen under CentOS with
Openser 1.3.2 and other apps.  The reports seem to be accurate everywhere
but here.  Even mediaproxy (under moderate to low load) does fairly well,
although I'd never consider going into production with it on a virtual
machine.

Thanks for the analysis.


- Jeff



On 3/16/09 1:38 PM, "Dan Pascu"  wrote:
 
> There appear to be no network queue, so the app is idle. However you
> mention that you run this in a virtual machine. Do you see the problem
> with a real system as well? Otherwise I wouldn't rely on the accuracy of
> what the virtual machine reports. Besides, did you upgrade the emulator
> as well around that time? This may be very well a bug in the emulation
> software, reporting false status under certain conditions.



___
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] Register aliasing

2009-03-14 Thread Romanov Vladimir
We don't limit registration count.. User can register 1,2,3.. times. For sample 
2 registration using billing id and 2 using alias.

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Inaki Baz Castillo
Sent: Sunday, March 15, 2009 12:52 AM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Register aliasing

El Sábado, 14 de Marzo de 2009, Romanov Vladimir escribió:
> Hi!
> We want implement next scheme.
> From user side:
>
> 1)  Every user has two usernames - login & billingid. Passwords are
> same for both.
>
> 2)  User can login using  both names. Just for sample user can login
> form PC using one name and from mobile device using other name. All user
> registration must be same.
>
> 3)  Other users can call this user using both names.
>
> For 3) we can use alias_db module. For 1) & 2) we can do some aliasing in
> register messages. And convert all registration to one form (billing id for
> sample). For this purpose we must write simple module.
>
> Maybe there exist better solution?

Why not using a single username with maximun two registrations per AoR 
(parameter in registrar module)?



-- 
Iñaki Baz Castillo

___
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] Register aliasing

2009-03-14 Thread Romanov Vladimir
Hi!
We want implement next scheme.
>From user side:

1)  Every user has two usernames - login & billingid. Passwords are same 
for both.

2)  User can login using  both names. Just for sample user can login form 
PC using one name and from mobile device using other name. All user 
registration must be same.

3)  Other users can call this user using both names.

For 3) we can use alias_db module. For 1) & 2) we can do some aliasing in 
register messages. And convert all registration to one form (billing id for 
sample). For this purpose we must write simple module.

Maybe there exist better solution?
-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


Re: [OpenSIPS-Users] Bug in XCAP_Client

2009-03-05 Thread Romanov Vladimir
Hi!
I don't use Xcap now. I just want write module to do SSO authentication (using 
OpenSSO server), and I use XCAP_Client module for starting point to send HTTP 
request.

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853


-Original Message-
From: Anca Vamanu [mailto:a...@opensips.org] 
Sent: Thursday, March 05, 2009 8:55 PM
To: Romanov Vladimir
Cc: Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Bug in XCAP_Client

Thank you Romanov.
I have now committed the changes in 1.5.x. Could you please update and 
test again?

Regards,
Anca

Romanov Vladimir wrote:
>
> Hi All!
>
> I found bug in \modules\ xcap_client\ xcap_functions.c
>
> Function write_function not work with large content. If you download 
> large content this callback function will call several times. On every 
> call this ficnction create NEW buffer in memory and lost old.
>
> As result you have
>
> 1)  Memory leaks
>
> 2)  Corrupted content in buffer.
>
>  
>
> This is my variant of this function
>
>  
>
> int str_append(str* buff, char* s, int len)
>
> {
>
> /* reallocate memory and copy */
>
> char* newData;
>
> if (-1==len) {
>
> len=strlen(s);
>
> }
>
> if (0==len) {
>
> return buff->len;
>
> }
>
> newData= (char*)pkg_realloc(buff->s, buff->len + len + 1);
>
> if(newData== NULL) {
>
> ERR_MEM(PKG_MEM_STR);
>
> }
>
> memcpy(newData+buff->len, s , len);
>
> buff->s = newData;
>
> buff->len += len;
>
> buff->s[buff->len] = 0;
>
> return buff->len;
>
> error:
>
> return -1;   
>
> }
>
>  
>
> size_t write_function( void *ptr, size_t size, size_t nmemb, str *buff)
>
> {
>
> if (str_append(buff,(char*)ptr,(int)(size*nmemb))>=0) {
>
> return size* nmemb;
>
> } else {
>
> LM_ERR("Can't append to string");
>
> return CURLE_WRITE_ERROR;
>
> }
>
> }
>
>  
>
> int send_http_get(char* uri, str* buff)
>
> {
>
> CURLcode ret_code;
>
> CURL* curl_handle= NULL;
>
> int http_ret_code=-1;
>
>  
>
> LM_INFO("Send request %s",uri);
>
>  
>
> curl_handle = curl_easy_init();
>
>
>
> curl_easy_setopt(curl_handle, CURLOPT_URL, uri);
>
>
>
> curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1); 
>
>  
>
> curl_easy_setopt(curl_handle, CURLOPT_STDERR, stdout); 
>
>
>
> curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_function);
>
>
>
> curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, buff);
>
>  
>
> /* non-2xx => error */
>
> curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, 0);
>
>  
>
> ret_code= curl_easy_perform(curl_handle );
>
>
>
> if( ret_code!=0) {
>
> LM_ERR("Error [%i] while performing curl operation", 
> ret_code);
>
> } else {
>
> curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, 
> &http_ret_code);
>
> }
>
>  
>
> curl_easy_cleanup(curl_handle);
>
> LM_INFO("send_http_get return %i. Content length=%i", 
> http_ret_code, buff->len);
>
> return http_ret_code;
>
> }
>
>  
>
> -
>
> Vladimir Romanov
>
> Scartel Star Lab
>
> CTO
>
> +7 (960) 239-0853
>
>  
>
> 
>
> ___
> 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] Bug in XCAP_Client

2009-03-05 Thread Romanov Vladimir
Hi All!
I found bug in \modules\ xcap_client\ xcap_functions.c
Function write_function not work with large content. If you download large 
content this callback function will call several times. On every call this 
ficnction create NEW buffer in memory and lost old.
As result you have

1)  Memory leaks

2)  Corrupted content in buffer.

This is my variant of this function

int str_append(str* buff, char* s, int len)
{
/* reallocate memory and copy */
char* newData;
if (-1==len) {
len=strlen(s);
}
if (0==len) {
return buff->len;
}
newData= (char*)pkg_realloc(buff->s, buff->len + len + 1);
if(newData== NULL) {
ERR_MEM(PKG_MEM_STR);
}
memcpy(newData+buff->len, s , len);
buff->s = newData;
buff->len += len;
buff->s[buff->len] = 0;
return buff->len;
error:
return -1;
}

size_t write_function( void *ptr, size_t size, size_t nmemb, str *buff)
{
if (str_append(buff,(char*)ptr,(int)(size*nmemb))>=0) {
return size* nmemb;
} else {
LM_ERR("Can't append to string");
return CURLE_WRITE_ERROR;
}
}

int send_http_get(char* uri, str* buff)
{
CURLcode ret_code;
CURL* curl_handle= NULL;
int http_ret_code=-1;

LM_INFO("Send request %s",uri);

curl_handle = curl_easy_init();

curl_easy_setopt(curl_handle, CURLOPT_URL, uri);

curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1);

curl_easy_setopt(curl_handle, CURLOPT_STDERR, stdout);

curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_function);

curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, buff);

/* non-2xx => error */
curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, 0);

ret_code= curl_easy_perform(curl_handle );

if( ret_code!=0) {
LM_ERR("Error [%i] while performing curl operation", ret_code);
} else {
curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, 
&http_ret_code);
}

curl_easy_cleanup(curl_handle);
LM_INFO("send_http_get return %i. Content length=%i", http_ret_code, 
buff->len);
return http_ret_code;
}

-
Vladimir Romanov
Scartel Star Lab
CTO
+7 (960) 239-0853

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


[OpenSIPS-Users] Presence benchmark

2009-02-27 Thread Romanov Vladimir
Hi All!

How I can test performance of presence server in OpenSips?  We use IMS bench to 
test register, uac, message.

--
Vladimir Romanov


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