Re: [OpenSIPS-Users] access to password as variable?

2009-10-18 Thread Stanisław Pitucha
2009/10/16 Steven E. Ames sa...@officescape.com:
 Thanks. I'll start down the radius path. My problem with avp_db_query is I 
 don't actually have a password. The idea here is to let a few select devices 
 that we use internally to REGISTER in a dynamic fashion because the password 
 they are presenting can be generated by sending their username through a 
 hashing algorithm. So they don't actually have passwords or even usernames in 
 the database. My original plan was just to exec_avp sending username and 
 password and getting back a GO/NO_GO. Now it looks like it'll be send 
 username/password to radius which execs script and sends back go/no_go. More 
 complicated but you do what you gotta to make the powers that be happy.

What is their hashing algorithm? Opensips can do md5 and other string
operations itself from the script, so maybe you don't need any
external programs at all?

Can you show the algorithm? If you can get repeat it in opensips, then
you can repeat the Digest Hash Algorithm too and check the password
that way.

-- 
KTHXBYE,

Stanisław Pitucha, Gradwell Voip Engineer

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


[OpenSIPS-Users] Using RTPProxy to proxy all non-NAT'ed calls as well

2009-10-18 Thread Julian Yap
I have a working set up where OpenSIPS is my registrar and SIP Proxy.

NAT'ed UA calls are handled with RTPProxy.

I want RTPProxy to handle non-NAT'ed UA's (for example, UA's on a
public internet IP).

I tried a quick test of running the force_rtp_proxy() function on
non-NAT'ed INVITE packets but I get this error:
Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
ERROR:nathelper:extract_body: message body has length zero
Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
ERROR:nathelper:force_rtp_proxy2_f: can't extract body from the
message

Is it possible to run RTPProxy in this fashion?  I'm looking for the
easiest fix.

Thanks,
Julian

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


Re: [OpenSIPS-Users] Using RTPProxy to proxy all non-NAT'ed calls as well

2009-10-18 Thread Alex Balashov
You are attempting to invoke rtpproxy on a request or reply which does 
not contain an SDP body, and therefore force_rtp_proxy() cannot 
operate on it.

Julian Yap wrote:

 I have a working set up where OpenSIPS is my registrar and SIP Proxy.
 
 NAT'ed UA calls are handled with RTPProxy.
 
 I want RTPProxy to handle non-NAT'ed UA's (for example, UA's on a
 public internet IP).
 
 I tried a quick test of running the force_rtp_proxy() function on
 non-NAT'ed INVITE packets but I get this error:
 Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
 ERROR:nathelper:extract_body: message body has length zero
 Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
 ERROR:nathelper:force_rtp_proxy2_f: can't extract body from the
 message
 
 Is it possible to run RTPProxy in this fashion?  I'm looking for the
 easiest fix.
 
 Thanks,
 Julian
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

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


Re: [OpenSIPS-Users] Using RTPProxy to proxy all non-NAT'ed calls as well

2009-10-18 Thread Julian Yap
Hmm, so in theory RTPProxy should work in my case?

I just need to check the SDP?  My NAT section has something like this:
if(!isflagset(22)  !search(^Content-Length:[ ]*0))

That Content-Length check should suffice?

On Sun, Oct 18, 2009 at 12:34 AM, Alex Balashov
abalas...@evaristesys.com wrote:
 You are attempting to invoke rtpproxy on a request or reply which does
 not contain an SDP body, and therefore force_rtp_proxy() cannot
 operate on it.

 Julian Yap wrote:

 I have a working set up where OpenSIPS is my registrar and SIP Proxy.

 NAT'ed UA calls are handled with RTPProxy.

 I want RTPProxy to handle non-NAT'ed UA's (for example, UA's on a
 public internet IP).

 I tried a quick test of running the force_rtp_proxy() function on
 non-NAT'ed INVITE packets but I get this error:
 Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
 ERROR:nathelper:extract_body: message body has length zero
 Oct 18 00:18:17 sip1 /sbin/opensips[18749]:
 ERROR:nathelper:force_rtp_proxy2_f: can't extract body from the
 message

 Is it possible to run RTPProxy in this fashion?  I'm looking for the
 easiest fix.

 Thanks,
 Julian

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


 --
 Alex Balashov - Principal
 Evariste Systems
 Web     : http://www.evaristesys.com/
 Tel     : (+1) (678) 954-0670
 Direct  : (+1) (678) 954-0671

 ___
 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] Load balancer and Access control list

2009-10-18 Thread Bogdan-Andrei Iancu
Hi Peter,

Interesting - the LB was not designed to work via 3xx redirect model, 
even so, with some changes, it is possible to do it.

On the other side, can you trick FS to look for the IP (used for ACLs) 
somewhere else than the net level (src IP) ? maybe you can configure LB 
to put the original SRC IP into a SIP header into the request.

Regards,
Bogdan

Peter P GMX wrote:
 Hello,

 I am using OpenSIPS as a load balancer in front of Freeswitch by using
 the load balancer module.
 Scenario: All phones are registered at Freeswitch. Some gateways provide
 calls via registered accounts  and some external gateways are accepted
 by their IPs (access control list, ACL).

 When using OpenSIPS in front of Freeswitch I am losing the ACL feature
 for some external gateways, as from Freeswitch's perpective all calls
 are now coming from OpenSIPS.

 Does anybody know how to solve this ACL problem? Is there a way load
 balance by redirecting invites (302 Moved temporarily) to Freeswitch?
 Then the gateway will contact Freeswitch directly and ACLs will still apply.
 So is there any load balancing feature in OpenSIPS which uses redirects
 or do I have to implement it by myself? E.g. by a perl script which
 changes the redirect IP on every request (e.g. round robin).

 Best regards
 Peter




 ___
 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] Dialplan issues: simple strip\prefix cases

2009-10-18 Thread Bogdan-Andrei Iancu
Hi Sebastian,

So use:

Dpid = 1
Pr = 0
match_op = 1
match_exp = ^4224+
match_len = 0
subst_exp = ^(*4224*)(.+)
repl_exp = \2

Regards,
Bogdan


Sebastian Sastre wrote:
 Agreed, I followed a previous post from Bogdan but I cant replicate it. 

 In short I have some numbers which I need to strip the first 4 numbers from.

 How would you do this? I've been playing aroung with the different regexp
 expressions I know of, but I cant get the result. 

 Any help appreciated. 

 Thanks 


 The previous post was 

 Jul 17, 2009; 07:36am
 Re: 2 dialplan issues: simple strip\prefix cases and execution with drouting
 use_next_gw function

 Hi Ricardo,

 for stripping some digits, try something like:

 match: ^55+
 subst: ^(55)(.+)
 repl: \2

 This will strip the 55 prefix from the number

 For item 2) - take care as the do_routing() function is computing all
 the next branches in advances, based on the current URI...The
 use_next_gw() function will just upload the precomputed RURIs in the new
 branch.

 If you want some per branch changes via dialplan, do it after the
 do_routing() and use_next_gw() functions..

 Regards,
 Bogdan


 Ricardo Martins wrote:

   
 Hi all! I've been working a quite time with dialplan module and need
 some orientation from more experienced users. On one case, I need to
 strip some digits depending on the dial prefix and on the other case I
 need to subst some digits with 0 or 00.

 I could make the subst case to work, replacing the starting 55 with 0,
 using the following rule:
 match: ^55+
 subst: ^(55)(.+)
 











 Sebastian Sastre
 Next IP
 sebast...@next-ip.com
 + 305-507-8722- Main
 + 305-507-8728- Direct
  
 The information transmitted herein is intended only for the person or entity
 to which it is addressed and may contain confidential and/or privileged
 material. Any review, retransmission, dissemination or other use of, or
 taking of any action in reliance upon, this information by persons or
 entities other than the intended recipient is prohibited. If you received
 this in error, please contact the sender and delete the material from any
 computer.
 La información contenida en este mensaje electrónico tiene carácter
 CONFIDENCIAL, está dirigida únicamente al destinatario de la misma y sólo
 podrá ser usada por éste. Si el lector de este mensaje no es el destinatario
 del mismo, se le notifica que cualquier copia o distribución de éste se
 encuentra totalmente prohibida. Si usted ha recibido este mensaje por error,
 por favor notifique inmediatamente al remitente por este mismo medio y borre
 el mensaje de su sistema.
  

 -Original Message-
 From: users-boun...@lists.opensips.org
 [mailto:users-boun...@lists.opensips.org] On Behalf Of Brett Nemeroff
 Sent: Friday, October 16, 2009 12:31 AM
 To: OpenSIPS users mailling list
 Subject: Re: [OpenSIPS-Users] Dialplan issues: simple strip\prefix cases

 I don't mean to point out the obvious here, but \4 doesn't exist.
 that'd refer to the 4th set of parens in your expression. See your
 exp, you only have 2.

 As a completely separate issue, I also suspect that ^4224+ is wrong.
 I'm not an expert in regex, but I think that means starts with 4224
 and then continues with 1 or more '4' . You probably mean ^4224.+

 -Brett


 On Thu, Oct 15, 2009 at 4:38 PM, Sebastian Sastre sebast...@next-ip.com
 wrote:
   
 Hello,



 I’m trying to use the Dialplan module to strip the prefix of my calls.

 On the database I have.



 Dpid = 1

 Pr = 0

 match_op = 1

 match_exp = ^4224+

 match_len = 0

 subst_exp = ^(4224)(.+)
 repl_exp = \4



 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]: INFO:dialog:mod_init:
 Dialog module - initializing

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]: INFO:dialplan:mod_init:
 initializing module...

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]:
 ERROR:dialplan:build_rule: repl_exp uses a non existing subexpression

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]:
 ERROR:dialplan:init_db_data: failed to load database data

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]:
 
 ERROR:dialplan:mod_init:
   
 could not initialize data

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]: ERROR:core:init_mod:
 failed to initialize module dialplan

 Oct 15 17:25:32 RouteMe /usr/sbin/opensips[30516]: ERROR:core:main: error
 while initializing modules







 Thanks





 ___
 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




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

   


___
Users mailing list
Users@lists.opensips.org

Re: [OpenSIPS-Users] Issue with incoming calls.

2009-10-18 Thread Bogdan-Andrei Iancu
Peter,

check for ICMP errors  - maybe the requests from opensips do not get to 
the external party due net issues.

Regards,
Bogdan

Leon Li wrote:
 Peter,

 I am new to OpenSIPs, but from your ngrep, there seems to be a loop of
 INVITE msgs.

 U 10.0.100.99:5060 - 90.145.5.83:5060
 INVITE sip:0031851110...@90.145.5.83 SIP/2.0.

 U 90.145.5.83:5060 - 10.0.100.99:5060
 INVITE sip:0031851110...@90.145.5.83 SIP/2.0.

 So it looks like something wrong in script handling outbound -- inbound
 call. If you can paste your config, someone should be able to check it.
 :)

 Regards,
 Leon 


 -Original Message-
 From: users-boun...@lists.opensips.org
 [mailto:users-boun...@lists.opensips.org] On Behalf Of Peter den Hartog
 Sent: Thursday, 15 October 2009 7:47 PM
 To: users@lists.opensips.org
 Subject: [OpenSIPS-Users] Issue with incoming calls.


 Hello,

 I've placed a new testing opensips server inside my network. It has a
 private modem + router, connected to the sip trunk.

 When i call outside, it goes great, i see the route goes to the sip
 trunk
 and then my mobile phone rings.
 But when i call inside, something goes wrong. The signal does reach my
 server, here you can see the ngrep: 
 http://dl.getdropbox.com/u/1382962/log.txt

 As you can see, (in my eyes) a lot of the same messages to the same
 server!
 I've opened in my router the udp port 5060 and let it forward directly
 to my
 server. If i close that, nothing reaches my opensips server.

 Any ideas?

   


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


Re: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User

2009-10-18 Thread Bogdan-Andrei Iancu
Hi Larry,

Kemp, Larry wrote:
 Hi Bogdan, Thanks for your help very very much.

 I edited /etc/openser/openser.cfg adding alias=usmetrotel.com and restarted 
 OpenSER. It crashes the openser daemon.
   
what you mean by crash ? does not start? do you get an error and it 
stops?

Regards,
Bogdan
 I cannot place calls, but I can see the SIP messages from the softphones when 
 I do the ngrep on the OpenSER. I statically entered the extensions 1000 and 
 1001 in the OpenSER via the:
 /sbin/openserctl add 1000 password 1...@usmetrotel.com
 /sbin/openserctl add 1001 password 1...@usmetrotel.com
 Commands, as the book states to do.

 So when I perform an openserctl ul show I expected to see my two statically 
 entered users (1000 and 1001) show up. But here is what comes back:
 database engine MYSQL loaded
 Control engine FIFO loaded
 entering fifo_cmd ul_dump
 200 OK
 Domain:: aliases table=512 records=0 max_slot=0
 Domain:: location table=512 records=0 max_slot=0
 FIFO command was:
 :ul_dump:openser_receiver_31972

 If I try to run:
 /sbin/openserctl add 1000 password 1...@usmetrotel.com or
 /sbin/openserctl add 1001 password 1...@usmetrotel.com
 again, the system tells me:
 database engine MYSQL loaded
 Control engine 'FIFO' loaded
 is_user: user counter=1
 ERROR: user 1000 already exists.

 Yet if I try to remove it using:
 /sbin/openserctl rm 1000

 the command hangs with this output:
 database engine MYSQL loaded
 Control engine FIFO loaded
 is_user: user counter=1


 Also, when I run the command openserctl domain showdb it displays:
 +++-+
 | id | domain | last_modified   |
 +++-+
 | 1  | usmetrotel.com | -00-00 00:00:00 |
 +++-+

 So I am not sure if the server knows that it hosts the domain usmetrotel.com 
 and the extensions 1000 and 1001 for that domain or not.

 Not sure how to tell the openser.cfg that usmetrotel.com is a local domain 
 and make my soft phones communicate with the OpenSER. According to everything 
 I have read in the book, it states it should be working. Perhaps the next 
 section on page 101 Enhancing The Script and page 102 Managing Multiple 
 Domains will make thing s more clear. I guess I was expecting the calls to 
 work as the book states they should be working and able to call each other 
 several times by this point.

 Again I appreciate the help, very much.

 Thanks

 LK

 -Original Message-
 From: users-boun...@lists.opensips.org 
 [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
 Sent: Thursday, October 15, 2009 1:40 PM
 To: users@lists.opensips.org
 Subject: Re: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User

 No, it is not in RC file, but in opensips.cfg - there you need to
 configure that domains should be considered as local.

 Regards,
 Bogdan

 Kemp, Larry wrote:
   
 Bogdan,

 Assuming you are talking about the file /etc/openser/openserctlrc; at the 
 top of that script it shows:
 ## your SIP domain
 SIP_DOMAIN=usmetrotel.com

 Would I still need to place:  alias=usmetrotel.com or ALIAS=USMEROTEL.COM 
 in there and restart the daemon? All the variables look to be all CAPS. Not 
 certain if the /sbin/openserctlrc cares or not.

 Right underneath the SIP_DOMAIN=usmetrotel.com line in 
 /etc/openser/openser.cfg I added ALIAS=usmetrotel.com and restarted the 
 service. It restarted okay so this did not apparently break the OpenSER 
 service. I'll try registering the X-Lite phones and let you know what 
 happens.



 -Original Message-
 From: Kemp, Larry
 Sent: Thursday, October 15, 2009 10:57 AM
 To: 'Bogdan-Andrei Iancu'
 Subject: RE: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS 
 User

 Bogdan,

 Thanks always for your very much appreciated help!

 Is that in the /etc/openser/openser.cfg in /etc/openser/openserctl or some 
 other file?

 In /etc/openser/openser.cfg a search for the word alias shows results at 
 Line 151 at Col 25 as:
 lookup(aliases);

 And then again at line 153 Column 53 as:
 append_hf (P-hint: outbound alias\r\n);

 In /etc/openser/openserctlrc the word alias appears several times commented 
 out at Line 31 and then two lines down as a variable:
 ALIASES+TYPE=DB

 It seems more like it would go in this file but I have no idea, I am not a 
 Kung Fu Master with C or OpenSER either. I am having a tough go of it.



 -Original Message-
 From: users-boun...@lists.opensips.org 
 [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
 Sent: Wednesday, October 14, 2009 11:53 PM
 To: OpenSIPS users mailling list
 Subject: Re: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS 
 User

 Hi Larry,

 most probably your opensips does not recognize the usmetrotel.com as a
 local domain, so it is keep forwarding the request to itself.

 adding something like:
 alias=usmetrotel.com

 in your script should solve 

Re: [OpenSIPS-Users] OpenSips as SMS-GW

2009-10-18 Thread Bogdan-Andrei Iancu
OpenSIPS has not SMS capabilities.
How the SMS in encapsulated via SIP (in a 3GPP case) ?

Regards,
Bogdan

Ajay Pratap Singh Pundhir wrote:
 yes i am talking about SIP Client which support SMS. 3GPP has recently 
 released standard for SMS over IP, so i am talking about the Softphone 
 which support SMS service, i.e. which can register as a SMS capable 
 device, and can Send/Recieve SMS in the format described in Stsndards.

 One idea which came to my mind is to add one more tab in UCTIMSClient 
 for SMS.


 On Wed, Oct 14, 2009 at 2:37 AM, Bogdan-Andrei Iancu 
 bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:

 what is a client for SMS services ??? everything is SIP here, so
 maybe
 you need a SIP client with IM support, right?

 Regards,
 Bogdan

 Ajay Pratap Singh Pundhir wrote:
  Thanks,
 
  is there any open source client available for SMS service in
 IMS. or i
  have to make one from scratch.
 
 
 
 
 
 
  On Tue, Oct 13, 2009 at 7:32 PM, Bogdan-Andrei Iancu
  bog...@voice-system.ro mailto:bog...@voice-system.ro
 mailto:bog...@voice-system.ro mailto:bog...@voice-system.ro
 wrote:
 
  Hi,
 
  OpenSIPS has a builtin SMS module, but for SMS over AT-modems -
  see the
  SMS module
 (http://www.opensips.org/html/docs/modules/1.5.x/sms.html).
 
  The module can control an AT-modem to send and receive SMS
  directly from
  the GSM network.
 
  Another options is to simply integrate (via DB for example)
 opensips
  with kannel (SMS gateway).
 
  Regards,
  Bogdan
 
  Ajay Pratap Singh Pundhir wrote:
   Hi ,
  
   Any one have idea about can OpenSips/Openser be used as SMS-GW
  for the
   SMS over IP application ( I have OpenIMSCore Network
 Configured) .
   Is there any opensourse implimentaion of SMS over IP ??
  
  
   Thanks
  
  
  



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