[OpenSIPS-Users] How to test if a message is from myself

2011-01-31 Thread Dave Singer
Is there any way to check if the source IP/port is one that opensips
is listening on or one ? something like if ("sip:$si:$sp" == myself) {
...bla; bla;}

Thanks
Dave

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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-01-31 Thread Dave Singer
Toyima,

I posted in the list last week on the thread "multiple
use_media_proxy() calls" my notes on getting media proxy installed on
centos 5.5.

To compile opensips just do the yum installs mentioned in that thread,
get the opensips source, unpack, compile and install according to docs
on install from source.
what I do after the yum installs and updates:

cd /usr/local/src/
wget "http://opensips.org/pub/opensips/latest/src/opensips-1.6.4-tls_src.tar.gz";
tar -xzf opensips-1.6.?-tls_src.tar.gz
cd opensips-1.6.?-tls
# note: the -j is the number of threads the compile can use. I
usually use one less than number of cores.
TLS=1 make -j3 prefix=/opt/opensips doc-prefix=/usr/local
man-prefix=/usr/local include_modules="db_mysql db_postgres" install

A few months ago I also posted an init.d script for centos that does
double checking for problems (runs opensips with -c and runs it full
on localhost:2021 or some port) because -c only does syntax checking
and I got tired of restarting and it would fail when starting back up.
It also is set to use monit if it is installed and configured.

Dave

On Mon, Jan 31, 2011 at 11:23 AM, Brett Nemeroff  wrote:
> On Mon, Jan 31, 2011 at 10:28 AM, Toyima Dias  wrote:
>>
>> Hello,
>>
>> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
>> case i need to install it on Red Hat, i've found some information but not
>> very well supported, i would like to have a very clean and stable
>> installation for a very large and stable production server, is there any
>> recommendations please?
>>
>> Regards
>
> Toyima,
> If you are trying to install mediaproxy, then yes, Debian is the way to go.
> With it's dependencies you'll be fighting to make it work for a while.
> However, if you are just trying to get Opensips to run on Redhat.. Can't you
> just compile from source? It's really not so advanced. Maybe I'm missing
> something?
> -Brett
>
> ___
> 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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Brett Nemeroff
On Mon, Jan 31, 2011 at 10:28 AM, Toyima Dias  wrote:

> Hello,
>
> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
> case i need to install it on Red Hat, i've found some information but not
> very well supported, i would like to have a very clean and stable
> installation for a very large and stable production server, is there any
> recommendations please?
>
> Regards
>
>
Toyima,
If you are trying to install mediaproxy, then yes, Debian is the way to go.
With it's dependencies you'll be fighting to make it work for a while.

However, if you are just trying to get Opensips to run on Redhat.. Can't you
just compile from source? It's really not so advanced. Maybe I'm missing
something?

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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-01-31 Thread Skyler
Hi Adrian,

 Not sure if this is what yer after though I am a CentOS x86_64 admin and
this is what I did. I don't have trouble with 'translation' (CentOS/Debian)
so much, its the dependencies that were and are always a huge pain. Once
those were figured out, all was well and working. I found all the info I
needed from searching the list archive.

I started with...


vi /etc/yum.repos.d/epel-repository

## Copy and paste the below
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=
http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=http://mirror.its.dal.ca/pub/epel/RPM-GPG-KEY-EPEL


# get a complete list of all packages so you can pick/choose
yum search opensips

# Install what you need
yum install opensips opensips-mysql ... etc.


These might be older than the current debian packages (not sure), though
I've had no issues and if anything these are stable versions. I wish
opensips and the commonly sought after tools
(mediaproxy/cdrtool/rtpproxy/sems..etc) were better RH supported, though
dependencies are more the problem than the opensips packaging itself. I
suppose I can't complain...if it were THAT important to me I would build my
own updated rpm's and have them to share with you.

 Come to think of it...if I were to create a software and give it out for
free...I would only support what I created in the first place. With the
tools I used. If you want it differently, create it.


All the best.

Skyler.



On Mon, Jan 31, 2011 at 8:28 AM, Toyima Dias  wrote:

> Hello,
>
> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
> case i need to install it on Red Hat, i've found some information but not
> very well supported, i would like to have a very clean and stable
> installation for a very large and stable production server, is there any
> recommendations please?
>
> Regards
>
>
> ___
> 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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Adrian Georgescu
Would the maintainers of those packages please step forward so that people who 
need support know exactly who to ask when in need?

This would help everyone to better understand who is maintaing what so that 
there is no fear uncertainty and doubts but only sure things.

Adrian

On Jan 31, 2011, at 5:51 PM, Peter Lemenkov wrote:

> 2011/1/31 Toyima Dias :
>> Hello,
>> 
>> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
>> case i need to install it on Red Hat, i've found some information but not
>> very well supported, i would like to have a very clean and stable
>> installation for a very large and stable production server, is there any
>> recommendations please?
> 
> Despite of FUD spreaded here for reasons unknown to me, OpenSIPs
> packages does exists for RHEL 5 and RHEL 6 (via EPEL supplementary
> repository). They are in a very good shape and several folks are
> using them in a production environment.
> 
> 
> -- 
> With best regards, Peter Lemenkov.
> 
> ___
> 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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Peter Lemenkov
2011/1/31 Toyima Dias :
> Thanks Peter,
>
> Could you provide more information please?

http://fedoraproject.org/wiki/EPEL


-- 
With best regards, Peter Lemenkov.

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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-01-31 Thread Toyima Dias
Thanks Peter,

Could you provide more information please? i've books of OpenSIPS and they
only mention Debian...quite frustrating


2011/1/31 Peter Lemenkov 

> 2011/1/31 Toyima Dias :
>  > Hello,
> >
> > I've seen many information on how to install OpenSIPS in DEBIAN, but in
> my
> > case i need to install it on Red Hat, i've found some information but not
> > very well supported, i would like to have a very clean and stable
> > installation for a very large and stable production server, is there any
> > recommendations please?
>
> Despite of FUD spreaded here for reasons unknown to me, OpenSIPs
> packages does exists for RHEL 5 and RHEL 6 (via EPEL supplementary
> repository). They are in a very good shape and several folks are
> using them in a production environment.
>
>
> --
> With best regards, Peter Lemenkov.
>
> ___
> 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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Peter Lemenkov
2011/1/31 Toyima Dias :
> Hello,
>
> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
> case i need to install it on Red Hat, i've found some information but not
> very well supported, i would like to have a very clean and stable
> installation for a very large and stable production server, is there any
> recommendations please?

Despite of FUD spreaded here for reasons unknown to me, OpenSIPs
packages does exists for RHEL 5 and RHEL 6 (via EPEL supplementary
repository). They are in a very good shape and several folks are
using them in a production environment.


-- 
With best regards, Peter Lemenkov.

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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-01-31 Thread Toyima Dias
Yes i understand,

But the customer NEEDS to make this implementation on Red-Hat, donĀ“t know
why :S customer things...like always :S


2011/1/31 Jeff Pyle 

>  Toyima,
>
> Adrian is right.  We started on a CentOS infrastructure with Opensips.  It
> works, but it's a pain.  We're migrating to a complete Debian
> infrastructure.  We started with Debian because of Opensips, Mediaproxy and
> CDRtool.  But now that we understand it we find it to be much more
> lightweight, configurable and just "easier" than CentOS and the other RedHat
> derivatives.
>
> Is Debian "better" than CentOS?  Not the question, and not the point.  I
> can say in our experience it is far easier to manage Opensips-based systems
> in Debian than in CentOS.  Xen is a lot more flexible, too, and we've made
> great use of that with Opensips.
>
>
> - Jeff
>
> From: Adrian Georgescu 
> Reply-To: OpenSIPS users mailling list 
> Date: Mon, 31 Jan 2011 11:35:13 -0500
> To: OpenSIPS users mailling list 
> Subject: Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat
>
>  You should use Debian in production as the software is developed on
> Debian. If you use Redhat you will always be behind new developments or any
> bug fixes as there might be nobody porting them to Redhat.
>
> Adrian
>
>  On Jan 31, 2011, at 5:28 PM, Toyima Dias wrote:
>
>  Hello,
>
> I've seen many information on how to install OpenSIPS in DEBIAN, but in my
> case i need to install it on Red Hat, i've found some information but not
> very well supported, i would like to have a very clean and stable
> installation for a very large and stable production server, is there any
> recommendations please?
>
> Regards
>
> ___
> 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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-01-31 Thread Jeff Pyle
Toyima,

Adrian is right.  We started on a CentOS infrastructure with Opensips.  It 
works, but it's a pain.  We're migrating to a complete Debian infrastructure.  
We started with Debian because of Opensips, Mediaproxy and CDRtool.  But now 
that we understand it we find it to be much more lightweight, configurable and 
just "easier" than CentOS and the other RedHat derivatives.

Is Debian "better" than CentOS?  Not the question, and not the point.  I can 
say in our experience it is far easier to manage Opensips-based systems in 
Debian than in CentOS.  Xen is a lot more flexible, too, and we've made great 
use of that with Opensips.


- Jeff

From: Adrian Georgescu mailto:a...@ag-projects.com>>
Reply-To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Date: Mon, 31 Jan 2011 11:35:13 -0500
To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

You should use Debian in production as the software is developed on Debian. If 
you use Redhat you will always be behind new developments or any bug fixes as 
there might be nobody porting them to Redhat.

Adrian

On Jan 31, 2011, at 5:28 PM, Toyima Dias wrote:

Hello,

I've seen many information on how to install OpenSIPS in DEBIAN, but in my case 
i need to install it on Red Hat, i've found some information but not very well 
supported, i would like to have a very clean and stable installation for a very 
large and stable production server, is there any recommendations please?

Regards

___
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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Adrian Georgescu
You should use Debian in production as the software is developed on Debian. If 
you use Redhat you will always be behind new developments or any bug fixes as 
there might be nobody porting them to Redhat.

Adrian

On Jan 31, 2011, at 5:28 PM, Toyima Dias wrote:

> Hello,
>  
> I've seen many information on how to install OpenSIPS in DEBIAN, but in my 
> case i need to install it on Red Hat, i've found some information but not 
> very well supported, i would like to have a very clean and stable 
> installation for a very large and stable production server, is there any 
> recommendations please?
> Regards
> 
> 
> ___
> 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] Installing OpenSIPS on Red Hat

2011-01-31 Thread Toyima Dias
Hello,

I've seen many information on how to install OpenSIPS in DEBIAN, but in my
case i need to install it on Red Hat, i've found some information but not
very well supported, i would like to have a very clean and stable
installation for a very large and stable production server, is there any
recommendations please?

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


Re: [OpenSIPS-Users] Introduction

2011-01-31 Thread Dovid Bender
Tyler,

Welcome to the addiction.
  - Original Message - 
  From: Tyler Merritt 
  To: users@lists.opensips.org 
  Sent: Monday, January 31, 2011 11:34
  Subject: [OpenSIPS-Users] Introduction


  Hello!


  In my experience - it's customary to send an introductory and polite hello to 
a user list before blasting away with questions - so


  Hi!


  I've been using Asterisk for about 4 years, and only recently had the 
opportunity to begin messing with OpenSIPs.  


  OpenSIPs > Asterisk for sure.


  In only a couple days - I've been able to do a heck of a lot with OpenSIPs 
that would take major modifications to chan_sip.c to accomplish in Asterisk.


  Thank you for that :)


  Looking forward to a lot more discoveries of powerful functionality and 
flexibility!



Tyler Merritt. Sales Engineer. 
Contact: tmerr...@fonality.com | 310.861.4300 x 8850 | 
fonality.com | SE Blog 







--


  ___
  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] fix_route_dialog problem

2011-01-31 Thread Guido Negro

Hi,

Thanks a lot. Please hit me up as soon as you'll have a version working 
in that direction, as I have specific test cases already set up that 
might be handy.


Regards,

Guido.

On 31/01/11 14:33, Vlad Paiu wrote:

Hello,

Indeed that ticket was mistakenly marked as closed. As I explained 
before, if a message with no route headers is received, loose_route() 
automatically rejects it and fix_route_dialog() cannot be called as 
the dialog doesn't get the chance to be matched.


I am working to implement fix that will make it possible to cope with 
such a scenario.


Regards,

On 01/31/2011 01:35 PM, Guido Negro wrote:

Hi,

just a quick note to tell you that I actually thought about this way 
of using fix_route_dialog() because of this ticket:


http://sourceforge.net/tracker/?func=detail&aid=3090388&group_id=232389&atid=1086413 



You may want to correct it?

Guido







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


Re: [OpenSIPS-Users] fix_route_dialog problem

2011-01-31 Thread Vlad Paiu

Hello,

Indeed that ticket was mistakenly marked as closed. As I explained 
before, if a message with no route headers is received, loose_route() 
automatically rejects it and fix_route_dialog() cannot be called as the 
dialog doesn't get the chance to be matched.


I am working to implement fix that will make it possible to cope with 
such a scenario.


Regards,

On 01/31/2011 01:35 PM, Guido Negro wrote:

Hi,

just a quick note to tell you that I actually thought about this way 
of using fix_route_dialog() because of this ticket:


http://sourceforge.net/tracker/?func=detail&aid=3090388&group_id=232389&atid=1086413 



You may want to correct it?

Guido




--
Vlad Paiu
www.voice-system.ro


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


Re: [OpenSIPS-Users] Two Opensips proxies sharing the same DB

2011-01-31 Thread Victor Gamov

Hi All

On 20.01.2011 23:44, Bogdan-Andrei Iancu wrote:

Jeff Pyle wrote:

We're looking to add a second Opensips instance on a separate server
for failover. Or, from an operational perspective, it could be
described as "active-active" since both will be available at any one
time. We'll control the traffic flow to the proxies with the SRV
records used by the clients.

Looking through the db tables used, it seems there may be some
conflict with the location and dialog tables.

The usrloc module clearly saves the local socket used during the
registration. Is there a way to tell Opensips 1.6 to ignore this when
loading the record?

socket;s are discarded at load time if not local.


I run db_mode=3 to keep everything current in the db. The performance is
acceptable (MySQL cluster helps). If I understand you correctly: on a
shared table, if I save() a registration on Proxy A, but then load() it
into Proxy B, Proxy B will ignore it since the socket is non-local.

the socket is ignored, not the record - the record will be used, but the
socket info discarded


It's may be useful if lookup() will return IP-address of proxy which 
save() info into DB.  This IP-address may be used to generate 305 "Use 
proxy" in "shared DB environment"


--
CU,
Victor Gamov
<>___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] fix_route_dialog problem

2011-01-31 Thread Guido Negro

Hi,

just a quick note to tell you that I actually thought about this way of 
using fix_route_dialog() because of this ticket:


http://sourceforge.net/tracker/?func=detail&aid=3090388&group_id=232389&atid=1086413

You may want to correct it?

Guido

On 25/01/11 11:14, Vlad Paiu wrote:

Hi,

Are you sure you are calling record_route() properly in your script ?
If you do this, you shouldn't receive any SIP msgs without any route 
headers, as there would be at least 1 route header, the one OpenSIPS 
has added in the first place.


The dialog module depends on the RR module. If a SIP msg with no route 
headers is received, the loose_route() part rejects it as it isn't 
valid from it's point of view, and the message isn't attempted to be 
matched to any certain dialog.


Could you please post a full SIP trace for such a call ?

Regards,
Vlad


On 01/24/2011 06:35 PM, Guido Negro wrote:

Hi,

thanks for your reply.

I am using the script reported in the Opensips book ("Building 
telephony systems with Opensips") at page 81, that is :



if (has_totag() ) {
  # sequential request withing a dialog should
  # take the path determined by record-routing
  if (loose_route() ) {
if (is_method("BYE" ) ) {
  setflag(1) ; # do accounting . . .
  setflag(3 ) ; # . . . even if the transaction fails
} else if ( is_method( "INVITE" ) ) {
  # even if in most of the cases is useless, do RR for
  # re-INVITEs alos, as some buggy clients do change route set
  # during the dialog.
  record_route() ;
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI) .
route( 1) ;
  } else {
if ( is_method(" ACK") ) {
  if ( t_check_trans( ) ) {
# non loose- route, but stateful ACK; must be an ACK after
# a 487 or e. g. 4 04 from upstream server
t_relay() ;
exit;
  } else {
# ACK without matching transaction ->
# ignore and discard
exit;
  }
}
sl_send_reply("4 04" , " Not here") ;
  }
  exit;
}


Now I've got 2 problems. When a BYE with correct to/from tag & 
correct call-id, but without any route headers arrives (a message I'd 
like to 'fix'):


1) I get the variable $DLG_status to be  after loose_route() (I 
checked with specific experiments) and this also causes an error in 
the log: opensips[3216]: ERROR:dialog:w_validate_dialog: null dialog


2) loose_route() fails, so I always get a 404 response on the callee 
side that tried to disconnect, and the caller remains connected.



I am probably using fix_route_dialog not in the correct way, but what 
I wanted to do is something like this (very-pseudo code):


When loose_route fails (or more in general for every in-dialog 
subsequent request):

Try to fix the request according to saved dialog infos:
- Fix succesful: forward the request.
- Couldnt fix it: reject the request (send 404 back).


Regards,

Guido.







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


[OpenSIPS-Users] Introduction

2011-01-31 Thread Tyler Merritt
Hello!

In my experience - it's customary to send an introductory and polite hello
to a user list before blasting away with questions - so

Hi!

I've been using Asterisk for about 4 years, and only recently had the
opportunity to begin messing with OpenSIPs.

OpenSIPs > Asterisk for sure.

In only a couple days - I've been able to do a heck of a lot with OpenSIPs
that would take major modifications to chan_sip.c to accomplish in Asterisk.

Thank you for that :)

Looking forward to a lot more discoveries of powerful functionality and
flexibility!

   *Tyler Merritt*. Sales Engineer
.
  Contact: tmerr...@fonality.com  | 310.861.4300 x 8850
|
  fonality.com  | SE
Blog
   

  


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