Re: [OpenSIPS-Users] REGISTER reply > MTU size?

2013-02-07 Thread Pauba, Kevin L
Out of curiosity, what might be the use cases where a registering client 
needs/wants to know all of the others with the same binding?  I'm probably 
blinded by the functions of our platform and can't imagine a use for that.

Thanks! 

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ovidiu Sas
Sent: Thursday, February 07, 2013 1:15 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] REGISTER reply > MTU size?

If you have a few bindings, there shouldn't be any issues (assuming that you 
have reasonable tags and headers).  In the end it's all about fitting the whole 
info into the max packet size.  If you have large bindings, then your chances 
to fit many bindings into a UDP packet are small ... If the bindings are really 
large, you can try to trim them before saving them (remove parameters if the 
client will be happy with that).

-ovidiu



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


Re: [OpenSIPS-Users] REGISTER reply > MTU size?

2013-02-07 Thread Pauba, Kevin L
Thanks for the reply, Ovidiu.

Unfortunately, I can't modify the client to use TCP.

Because of UDP fragmentation, it seems there should be a way to limit the size 
of the Contact header in the reply.  Would you agree?
Is it uncommon for the list of bindings for an AOR to be this large?

L8r

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ovidiu Sas
Sent: Thursday, February 07, 2013 12:49 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] REGISTER reply > MTU size?

If you are registering over UDP and if the reply is exceeding the maximum UDP 
packet length, the reply will be indeed fragmented..
http://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure
(see length).
One option would be to register over TCP to avoid fragmentation.

Regards,
Ovidiu Sas



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


[OpenSIPS-Users] REGISTER reply > MTU size?

2013-02-07 Thread Pauba, Kevin L
I'm replacing an existing proxy with OpenSIPs and I have one known problem yet 
to overcome.

Several hundred clients register with the proxy so that the proxy can load 
balance calls between them (based on q-value).   The clients use one of a set 
of different AORs based on their type/capabilities.
I'm running into a problem where the reply from the registration requests 
contain the contact addresses of ALL of the clients registered under the same 
AOR - it's getting truncated at the client and rejected (since the last contact 
isn't complete and is recognized by the client as an invalid SIP URI).

I haven't looked closely enough to determine whether it's being truncated by 
the network or if the buffer on the client isn't large enough - the result is 
the same, though (I suspect that it's the client buffer as the truncated 
messages are 4000 bytes long and larger than the MTU on the client).

I understand that OpenSIPs is operating in a manner that's compliant with the 
RFCs and that the client might, indeed, be the real problem.  Unfortunately, I 
can't modify the client and would like to work around the problem on the proxy 
side.

Short of modifying the registrar module's reply.c file, it there some way I can 
get the reply (sent by the module's exported save() function) to include only 
the client's contact information (and not the entire list)?

Thanks in advance!

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


[OpenSIPS-Users] REGISTRATION replies > MTU size?

2013-02-07 Thread Pauba, Kevin L
I'm replacing an existing proxy with OpenSIPs and I have one known problem yet 
to overcome.

Several hundred clients register with the proxy so that the proxy can load 
balance calls between them (based on q-value).   The clients use one of a set 
of different AORs based on their type/capabilities.
I'm running into a problem where the reply from the registration requests 
contain the contact addresses of ALL of the clients registered under the same 
AOR - it's getting truncated at the client and rejected (since the last contact 
isn't complete and is recognized by the client as an invalid SIP URI).

I haven't looked closely enough to determine whether it's being truncated by 
the network or if the buffer on the client isn't large enough - the result is 
the same, though (I suspect that it's the client buffer as the truncated 
messages are 4000 bytes long and larger than the MTU on the client).

I understand that OpenSIPs is operating in a manner that's compliant with the 
RFCs and that the client might, indeed, be the real problem.  Unfortunately, I 
can't modify the client and would like to work around the problem on the proxy 
side.

Short of modifying the registrar module's reply.c file, it there some way I can 
get the reply (sent by the module's exported save() function) to include only 
the client's contact information (and not the entire list)?

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


Re: [OpenSIPS-Users] Changing the "From" display name or URI in a reply

2013-01-28 Thread Pauba, Kevin L
Works like a charm, Ovi!

Thanks for the very clever suggestion.

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ovidiu Sas
Sent: Monday, January 28, 2013 10:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Changing the "From" display name or URI in a reply

One quick dirty hack would be to loop the REGISTER request:
 1. receive the original REGISTER request and modify the From header, then 
relay the request back to yourself  2. handle the received REGISTER request 
(from yourself) normally (by calling save()).

This should do the trick.

Regards,
Ovidiu Sas

--
VoIP Embedded, Inc.
http://www.voipembedded.com

On Mon, Jan 28, 2013 at 11:41 AM, Pauba, Kevin L  wrote:
> Is there a way to change the From header's display name in a reply to 
> a client device?
>
> I have a client device that requires a particular string in the From 
> header in the response from opensips to a REGISTER request.  I've 
> tried
> uac_replace_from() and subst() but neither of them changed the header 
> in the response sent from the save() function (in the registrar module).
>
> Short of enhancing the registrar module to accept a "from_uri" 
> parameter (for my own private use), is there any other method to 
> accomplish the same thing?
>
> Thanks in advance!


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


[OpenSIPS-Users] Changing the "From" display name or URI in a reply

2013-01-28 Thread Pauba, Kevin L
Is there a way to change the From header's display name in a reply to a client 
device?

I have a client device that requires a particular string in the From header in 
the response from opensips to a REGISTER request.  I've tried 
uac_replace_from() and subst() but neither of them changed the header in the 
response sent from the save() function (in the registrar module).

Short of enhancing the registrar module to accept a "from_uri" parameter (for 
my own private use), is there any other method to accomplish the same thing?

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


Re: [OpenSIPS-Users] Defines/vars in opensips.cfg before route{

2012-04-23 Thread Pauba, Kevin L
Here's one way:

$ m4 <<'EOF' > foo.cfg
> define(`myIP',1.2.3.4)dnl
>
> route {
> if (dst_ip == myIP) {
> ...
> }
> }
> EOF
$ cat foo.cfg

route {
if (dst_ip == 1.2.3.4) {
...
}
}


From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel Nihlén
Sent: Monday, April 23, 2012 4:28 AM
To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] Defines/vars in opensips.cfg before route{

Hi,

I been trying to find this in documentation but didn't mange. Sorry if I ask a 
question already answered.


I would like to have something like a static variable / define that is 
accessible outside and inside route{} allowing for having my IP's written only 
once in .cfg.

Something like this:
myIP="1.2.3.4"
listen=udp::5060


route{
…
if(dst_ip==){
...
}

...
}


Anything like this possible?

Thanks
Daniel Nihlen

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


Re: [OpenSIPS-Users] RFC: text pre-processing in OpenSIPS cfg file

2012-04-11 Thread Pauba, Kevin L
The GNU M4 Manual gives lots of simple examples.  Reading the two (very short) 
sections http://www.gnu.org/software/m4/manual/m4.html#Ifdef and 
http://www.gnu.org/software/m4/manual/m4.html#Include, you can do something 
like this:

define(`foo',1)
ifdef(`foo',include(`foo.m4'))

But it's really hard to sway the "don't like" argument -- I don't like beef 
liver and nothing you say will change my mind.

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Brett Nemeroff
Sent: Wednesday, April 11, 2012 10:54 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] RFC: text pre-processing in OpenSIPS cfg file

On Wed, Apr 11, 2012 at 10:41 AM, Bogdan-Andrei Iancu
 wrote:
> Well, it is not only about personal preferences and how is nicer, etc...you
> should consider also the required work to do - at the end somebody has to
> implement this. And my questions is: considering that the development
> resources are limited, does it make sense to invest them in just creating an
> alternative to something already existing ?
>

I honestly didn't like using M4. And it's not an opensips thing, it's
an M4 thing. I just don't like M4. I'm sure it can be attributed to me
not really knowing it, but I found that I couldn't really do what I
wanted with it without some sort of hacking. I wanted to do
conditional includes and such. Maybe all I needed was some good
examples.

Is there anyway to build m4 into the opensips pre-processor? so
opensips can just run the m4 file?
-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] RFC: text pre-processing in OpenSIPS cfg file

2012-04-11 Thread Pauba, Kevin L
My opinion is to stick with M4.   Where's the added value in re-implementing a 
small subset of M4's capability into OpenSIPs?  I would rather that development 
effort be directed toward enhancing OpenSIPs even more.

Leaning m4 can make the management of multiple configurations a breeze -- I 
support four different environments (development, QA, pre-production and 
production) across 5 geo-redundant data centers all with a single .m4 file.  
The use of m4 has _greatly_ simplifies the logic that I have to maintain.  
After learning m4, you can apply that knowledge to other projects (code 
generators).

Granted, the quoting in m4 takes a bit getting used to but I feel that any 
sufficiently powerful macro language would have to have something similar.  If 
not, it wouldn't be sufficiently powerful enough for my uses.

Thanks

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, April 10, 2012 10:50 AM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] RFC: text pre-processing in OpenSIPS cfg file

Hi,

I'm bringing here a discussion started on devel list, as I would like to get 
more opinions on the matter.

The discussion started around the decision if makes sense to have MACRO 
substitution (as text pre-processing) directly in OpenSIPS, considering that 
right now M4 is heavenly used for this (as additional tool to opensips).

So, the debate was : have built-in text pre-processing versus using M4 as text 
processor

Pros for M4:
- no effort to develop extra stuff - just install M4
- can do really complex things (more than only macros, ifdef, include, etc)
- you can use it or not
- easy to integrate with start / stop scripts
Against for M4:
- need to be installed and integrated
- you may have a mismatch for the line number (if errors reported in cfg) 
between the .m4 file and .cfg file

Pros for buit-in:
- you do no need to install M4 at all (everything comes packet)
- you may get accurate reporting on errors (for line in cfg)
Against for M4:
- more devel work to re-implement macros, ifdef, etc


Now, I would like to get your opinions on that (you as opensips users), to see 
if we stick to using M4 for cfg pre-processing or there is a real need to have 
this functionality as built-in.

Thanks and regards,
Bogdan



--

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


Re: [OpenSIPS-Users] standard opensips.cfg but include local config

2011-10-28 Thread Pauba, Kevin L
I use m4 for our OpenSIPs configuration file -- it allows me to maintain one 
file for 18 different OpenSIPs servers.

Works great!

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, October 28, 2011 6:56 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] standard opensips.cfg but include local config

Hi Gareth,

actually using m4 does not complicate thinks at all - we are using or 
more than 5 years and never run into difficulties or problem - even more 
it brings more power in doing text pre-processing  (not only "include" 
directive, but macros, defines, ifdef, loops ,etc ). Instead of keeping 
in SVN the .cfg file, keep the .m4 file(s) - and we added in the 
opensips init script the m4 triggering to generate the cfg file when 
starting opensips.

Regards,
Bogdan



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


Re: [OpenSIPS-Users] Config include file

2010-09-30 Thread Pauba, Kevin L
Oh, I forgot to answer you're last question ...

The 'dnl' deletes the newline after the 'define'.  The solution I just posted 
takes the output from the curl command and trims off the newline.   The 
regexp() m4 command seems like a little overkill but I didn't find a better way 
to do it.

I have a very complex (but powerful) m4 configuration that supports 6 different 
production sites.  It allows me to maintain a single configuration that it 
tailored each site by a simple m4 command during installation.  Yes, the 
quoting in m4 can be hairy but I've found it to be much more effective than 
using bash, perl or python.

Hope that helps!

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel Goepp
Sent: Thursday, September 30, 2010 4:45 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Sorry for asking an m4 question here, but it kinda relates to getting a config 
going for OpenSIPS, and you guys seem to know all about it ;)  I almost have my 
test working here, very simple to start:

My m4 file:

define(`_OPENSER_HOST',esyscmd(`curl -s http://checkip.dyndns.org/ | grep -o 
"[[:digit:].]\+"'))dnl
advertise_address="_OPENSER_HOST"

But this generates:

advertise_address="67.218.120.85
"

My understanding from reading the m4 page is that dnl should be trimming the 
carriage return on the end of the curl response.  But it doesn't appear to be.  
Thoughts?

Thanks

-dg

On Thu, Sep 30, 2010 at 1:49 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
Just found this:

http://snippets.dzone.com/posts/show/7256

Which has:

curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+"

It works!

So I'm thinking combining this with uname -a, you guys might have a better 
solution here.  Going to test now :)

Thanks!

-dg


On Thu, Sep 30, 2010 at 1:43 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
I'm definitely familiar with back tick and how this command works, I was just 
mentioning that the information I need to provide, the system doesn't know.  I 
could however merge some of these comments, and just have a file on each server 
that is it's public ip, and execute `cat my_public_ip.txt`  However, after more 
investigation, some of our boxes do have other differences, for example I just 
noticed that our 64bit vs 32bit systems have different mpaths.  I'm sure we 
could get more fancy with executing these commands, check the OS, and set 
accordingly.  This is very useful information, but for simplicity for now, I 
think we'll just stick with the original m4 suggestion.

Thanks all.

-dg


On Thu, Sep 30, 2010 at 1:23 PM, Brett Nemeroff 
mailto:br...@nemeroff.com>> wrote:
The point is, inside the ticks `` you place a shell command that returns 
whatever you want there.. :)
-Brett

On Thu, Sep 30, 2010 at 3:07 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
Unfortunately the hostname is not what we are using, but rather a public IP 
address which is on the other side of NAT, so the proxies are not aware of what 
it is.  I believe the m4 solution posted earlier will meet our need though for 
now, but thanks for the feedback, this is a creative solution ;)

-dg


On Thu, Sep 30, 2010 at 1:00 PM, Pauba, Kevin L 
mailto:klpa...@west.com>> wrote:
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')dnl
...
alias="_OPENSER_HOST"

Take special note of the backquote (`).

From: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
[mailto:users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org>]
 On Behalf Of Brett Nemeroff
Sent: Thursday, September 30, 2010 12:22 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Check out m4:
http://www.opensips.org/Resources/DocsTools

On Thu, Sep 30, 2010 at 12:19 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
We have many proxies that have an identical configuration other than their 
public IP address.  We set this IP address only for a few things:

In the global parameters:
advertised_address

Then in our routes for:
record_route_preset
rtpproxy_offer
rtpproxy_answer

What I would like to do is create a file on each of these servers (or a DB) 
that contains that servers public IP, and then put something like an include 
into the script.  This would make managing our config a lot easier.  So each 
system would have an identical config and could be updated very easily.  Does 
this make sense?  Any comments on how this might be done?

Thanks

-dg

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


___
Users mailing

Re: [OpenSIPS-Users] Config include file

2010-09-30 Thread Pauba, Kevin L
This works:

define(`_OPENSER_HOST',`regexp(esyscmd(curl -s http://checkip.dyndns.org/|grep 
-o "[[:digit:].]\+"),`\<.*\>',\&)')dnl
advertise_address="_OPENSER_HOST"

l8r

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel Goepp
Sent: Thursday, September 30, 2010 4:45 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Sorry for asking an m4 question here, but it kinda relates to getting a config 
going for OpenSIPS, and you guys seem to know all about it ;)  I almost have my 
test working here, very simple to start:

My m4 file:

define(`_OPENSER_HOST',esyscmd(`curl -s http://checkip.dyndns.org/ | grep -o 
"[[:digit:].]\+"'))dnl
advertise_address="_OPENSER_HOST"

But this generates:

advertise_address="67.218.120.85
"

My understanding from reading the m4 page is that dnl should be trimming the 
carriage return on the end of the curl response.  But it doesn't appear to be.  
Thoughts?

Thanks

-dg

On Thu, Sep 30, 2010 at 1:49 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
Just found this:

http://snippets.dzone.com/posts/show/7256

Which has:

curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+"

It works!

So I'm thinking combining this with uname -a, you guys might have a better 
solution here.  Going to test now :)

Thanks!

-dg


On Thu, Sep 30, 2010 at 1:43 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
I'm definitely familiar with back tick and how this command works, I was just 
mentioning that the information I need to provide, the system doesn't know.  I 
could however merge some of these comments, and just have a file on each server 
that is it's public ip, and execute `cat my_public_ip.txt`  However, after more 
investigation, some of our boxes do have other differences, for example I just 
noticed that our 64bit vs 32bit systems have different mpaths.  I'm sure we 
could get more fancy with executing these commands, check the OS, and set 
accordingly.  This is very useful information, but for simplicity for now, I 
think we'll just stick with the original m4 suggestion.

Thanks all.

-dg


On Thu, Sep 30, 2010 at 1:23 PM, Brett Nemeroff 
mailto:br...@nemeroff.com>> wrote:
The point is, inside the ticks `` you place a shell command that returns 
whatever you want there.. :)
-Brett

On Thu, Sep 30, 2010 at 3:07 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
Unfortunately the hostname is not what we are using, but rather a public IP 
address which is on the other side of NAT, so the proxies are not aware of what 
it is.  I believe the m4 solution posted earlier will meet our need though for 
now, but thanks for the feedback, this is a creative solution ;)

-dg


On Thu, Sep 30, 2010 at 1:00 PM, Pauba, Kevin L 
mailto:klpa...@west.com>> wrote:
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')dnl
...
alias="_OPENSER_HOST"

Take special note of the backquote (`).

From: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
[mailto:users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org>]
 On Behalf Of Brett Nemeroff
Sent: Thursday, September 30, 2010 12:22 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Check out m4:
http://www.opensips.org/Resources/DocsTools

On Thu, Sep 30, 2010 at 12:19 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
We have many proxies that have an identical configuration other than their 
public IP address.  We set this IP address only for a few things:

In the global parameters:
advertised_address

Then in our routes for:
record_route_preset
rtpproxy_offer
rtpproxy_answer

What I would like to do is create a file on each of these servers (or a DB) 
that contains that servers public IP, and then put something like an include 
into the script.  This would make managing our config a lot easier.  So each 
system would have an identical config and could be updated very easily.  Does 
this make sense?  Any comments on how this might be done?

Thanks

-dg

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


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


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


___
Users mailing list
Users@lists.opensips.org<mailto: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] Config include file

2010-09-30 Thread Pauba, Kevin L
Oops, I think I sent this off prematurely ...

I might have you covered on that too.  Maybe you can add this:

alias=ifelse(_OPENSER_HOST,`hostname1',`2.3.4.5',
 `hostname2',`2.3.4.6',
 `')

This will substitute 2.3.4.5 if the host's name is "hostname1".

I'll be quiet now! :)


From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Daniel Goepp
Sent: Thursday, September 30, 2010 3:07 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Unfortunately the hostname is not what we are using, but rather a public IP 
address which is on the other side of NAT, so the proxies are not aware of what 
it is.  I believe the m4 solution posted earlier will meet our need though for 
now, but thanks for the feedback, this is a creative solution ;)

-dg

On Thu, Sep 30, 2010 at 1:00 PM, Pauba, Kevin L 
mailto:klpa...@west.com>> wrote:
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')dnl
...
alias="_OPENSER_HOST"

Take special note of the backquote (`).

From: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
[mailto:users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org>]
 On Behalf Of Brett Nemeroff
Sent: Thursday, September 30, 2010 12:22 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Check out m4:
http://www.opensips.org/Resources/DocsTools

On Thu, Sep 30, 2010 at 12:19 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
We have many proxies that have an identical configuration other than their 
public IP address.  We set this IP address only for a few things:

In the global parameters:
advertised_address

Then in our routes for:
record_route_preset
rtpproxy_offer
rtpproxy_answer

What I would like to do is create a file on each of these servers (or a DB) 
that contains that servers public IP, and then put something like an include 
into the script.  This would make managing our config a lot easier.  So each 
system would have an identical config and could be updated very easily.  Does 
this make sense?  Any comments on how this might be done?

Thanks

-dg

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


___
Users mailing list
Users@lists.opensips.org<mailto: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] Config include file

2010-09-30 Thread Pauba, Kevin L
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')dnl
...
alias="_OPENSER_HOST"

Take special note of the backquote (`).

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Brett Nemeroff
Sent: Thursday, September 30, 2010 12:22 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file

Check out m4:
http://www.opensips.org/Resources/DocsTools

On Thu, Sep 30, 2010 at 12:19 PM, Daniel Goepp 
mailto:d...@goepp.net>> wrote:
We have many proxies that have an identical configuration other than their 
public IP address.  We set this IP address only for a few things:

In the global parameters:
advertised_address

Then in our routes for:
record_route_preset
rtpproxy_offer
rtpproxy_answer

What I would like to do is create a file on each of these servers (or a DB) 
that contains that servers public IP, and then put something like an include 
into the script.  This would make managing our config a lot easier.  So each 
system would have an identical config and could be updated very easily.  Does 
this make sense?  Any comments on how this might be done?

Thanks

-dg

___
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] Registrar's lookup() function not returning contact with greatest q-value

2010-08-11 Thread Pauba, Kevin L
I wanted to report that I do believe it was my custom module that was affecting 
the ordering of the contacts and _not_ the standard modules.

I discovered that the contacts are stored in an AVL tree and I was updating the 
nodes of the tree without "rebalancing" them based on the q-value.  When I 
changed the code in my custom module to use a module function built 
specifically for updating the contact information, the lookup() function works 
as expected.

Thanks go to Bogdan for pointing me in the right direction.



-Original Message-----
From: Pauba, Kevin L 
Sent: Thursday, August 05, 2010 8:49 AM
To: OpenSIPS users mailling list
Subject: RE: [OpenSIPS-Users] Registrar's lookup() function not returning 
contact with greatest q-value

I don't modify any of the default settings for the usrloc module.

I'll double check my configuration and "heartbeat" module to make sure the q 
order will be maintained.  There might be something I'm doing to the order when 
I update the q value (when the responses to the OPTION (heartbeats) are 
processed).

Thanks for the direction, Bogdan.  I'll report back soon.

L8r

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, August 04, 2010 5:04 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Registrar's lookup() function not returning 
contact with greatest q-value

Pauba,

Strange...especially that the UL SHOW also shows the wrong orderDo 
you have the "desc_time_order" param set in USRLOC ?

Regards,
Bogdan


Pauba, Kevin L wrote:
> Bogdan,
>
> I did provide the "b" flag to the lookup() function (see original message 
> below) but it replaced the RURI with the contact with Q=0, not the one with 
> Q=1 as I expected.
>
> The only registrar module parameter that I've changed from the default is 
> this:
>
> modparam("registrar", "min_expires", 0) # turn off checking 
> for minimum expiration time
>
>
> Also, the contacts are saved in the memory cache not in a DB table (using 
> save("location", "m") ).  Might that have an effect on the order in which 
> they're retrieved?
>
>
> Thanks!
>
>  
> -Original Message-
> From: users-boun...@lists.opensips.org 
> [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Wednesday, August 04, 2010 12:11 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] Registrar's lookup() function not returning 
> contact with greatest q-value
>
> Hi Pauba,
>
> First if you want to get only one contact (even if multiple registered), 
> see the "b" flag of the lookup() function: 
>
> http://www.opensips.org/html/docs/modules/1.6.x/registrar.html#id271036
>
> Also if more than one contact is returned, they are ordered of their 
> value (highest to lowest).
>
> Regards,
> Bogdan
>
> Pauba, Kevin L wrote:
>   
>> Hi,
>>
>> According to the registrar documentation module, "... the RURI will be 
>> overwritten with the highest-q rated contact ..." when the lookup() function 
>> is called.  My testing shows that the first matching contact is used.
>>
>> I'm running OpenSIPS V1.6.2.  I should mention that I've written a 
>> "heartbeat" module that pings the registered contacts periodically and 
>> accepts a "load" value in the response that is used to calculate the 
>> q-value.  A few bits in the Cflags are used to keep track of those that 
>> respond back and I've modified the show command to report the meaning of the 
>> flags.
>>
>> Here's the snippet from the output of the "opensipsctl ul show":
>>
>> AOR:: hmp
>> Contact:: sip:s...@10.27.193.121 Q=0
>> Expires:: 5051
>> Callid:: 1...@10.27.193.121
>> Cseq:: 78
>> User-agent:: oSIP/wicsip-2.11.MR3519
>> State:: CS_NEW
>> Flags:: 1
>> Cflag:: 34 (hb enabled, 0 unanswered)
>> Socket:: udp:10.27.193.119:5060
>> Methods:: 4294967295
>> Contact:: sip:s...@10.27.194.54 Q=1
>> Expires:: 6782
>> Callid:: 2...@10.27.194.54
>> Cseq:: 6
>> User-agent:: oSIP/wicsip-3.4.13
>> State:: CS_NEW
>>   

Re: [OpenSIPS-Users] Registrar's lookup() function not returning contact with greatest q-value

2010-08-05 Thread Pauba, Kevin L
I don't modify any of the default settings for the usrloc module.

I'll double check my configuration and "heartbeat" module to make sure the q 
order will be maintained.  There might be something I'm doing to the order when 
I update the q value (when the responses to the OPTION (heartbeats) are 
processed).

Thanks for the direction, Bogdan.  I'll report back soon.

L8r

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, August 04, 2010 5:04 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Registrar's lookup() function not returning 
contact with greatest q-value

Pauba,

Strange...especially that the UL SHOW also shows the wrong orderDo 
you have the "desc_time_order" param set in USRLOC ?

Regards,
Bogdan


Pauba, Kevin L wrote:
> Bogdan,
>
> I did provide the "b" flag to the lookup() function (see original message 
> below) but it replaced the RURI with the contact with Q=0, not the one with 
> Q=1 as I expected.
>
> The only registrar module parameter that I've changed from the default is 
> this:
>
> modparam("registrar", "min_expires", 0) # turn off checking 
> for minimum expiration time
>
>
> Also, the contacts are saved in the memory cache not in a DB table (using 
> save("location", "m") ).  Might that have an effect on the order in which 
> they're retrieved?
>
>
> Thanks!
>
>  
> -Original Message-
> From: users-boun...@lists.opensips.org 
> [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Wednesday, August 04, 2010 12:11 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] Registrar's lookup() function not returning 
> contact with greatest q-value
>
> Hi Pauba,
>
> First if you want to get only one contact (even if multiple registered), 
> see the "b" flag of the lookup() function: 
>    
> http://www.opensips.org/html/docs/modules/1.6.x/registrar.html#id271036
>
> Also if more than one contact is returned, they are ordered of their 
> value (highest to lowest).
>
> Regards,
> Bogdan
>
> Pauba, Kevin L wrote:
>   
>> Hi,
>>
>> According to the registrar documentation module, "... the RURI will be 
>> overwritten with the highest-q rated contact ..." when the lookup() function 
>> is called.  My testing shows that the first matching contact is used.
>>
>> I'm running OpenSIPS V1.6.2.  I should mention that I've written a 
>> "heartbeat" module that pings the registered contacts periodically and 
>> accepts a "load" value in the response that is used to calculate the 
>> q-value.  A few bits in the Cflags are used to keep track of those that 
>> respond back and I've modified the show command to report the meaning of the 
>> flags.
>>
>> Here's the snippet from the output of the "opensipsctl ul show":
>>
>> AOR:: hmp
>> Contact:: sip:s...@10.27.193.121 Q=0
>> Expires:: 5051
>> Callid:: 1...@10.27.193.121
>> Cseq:: 78
>> User-agent:: oSIP/wicsip-2.11.MR3519
>> State:: CS_NEW
>> Flags:: 1
>> Cflag:: 34 (hb enabled, 0 unanswered)
>> Socket:: udp:10.27.193.119:5060
>> Methods:: 4294967295
>> Contact:: sip:s...@10.27.194.54 Q=1
>> Expires:: 6782
>> Callid:: 2...@10.27.194.54
>> Cseq:: 6
>> User-agent:: oSIP/wicsip-3.4.13
>> State:: CS_NEW
>> Flags:: 1
>> Cflag:: 34 (hb enabled, 0 unanswered)
>> Socket:: udp:10.27.193.119:5060
>> Methods:: 4294967295
>>
>> ... and here's a snippet of the openser.cfg file that is related:
>>
>> $var(aor) = "sip:h...@wic.west.com";
>> lookup("location","b","$var(aor)");
>> xlog("L_DBG", "sending to hmp: $mb, $ru, $rs\n");
>> switch ($retcode) {
>> case -1:# no contact
>> xlog("L_ERR", "0101 $pp Forwarding to HMP failed 
>> -

Re: [OpenSIPS-Users] Registrar's lookup() function not returning contact with greatest q-value

2010-08-04 Thread Pauba, Kevin L
Bogdan,

I did provide the "b" flag to the lookup() function (see original message 
below) but it replaced the RURI with the contact with Q=0, not the one with Q=1 
as I expected.

The only registrar module parameter that I've changed from the default is this:

modparam("registrar", "min_expires", 0) # turn off checking for 
minimum expiration time


Also, the contacts are saved in the memory cache not in a DB table (using 
save("location", "m") ).  Might that have an effect on the order in which 
they're retrieved?


Thanks!

 
-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, August 04, 2010 12:11 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Registrar's lookup() function not returning 
contact with greatest q-value

Hi Pauba,

First if you want to get only one contact (even if multiple registered), 
see the "b" flag of the lookup() function: 
   
http://www.opensips.org/html/docs/modules/1.6.x/registrar.html#id271036

Also if more than one contact is returned, they are ordered of their 
value (highest to lowest).

Regards,
Bogdan

Pauba, Kevin L wrote:
> Hi,
>
> According to the registrar documentation module, "... the RURI will be 
> overwritten with the highest-q rated contact ..." when the lookup() function 
> is called.  My testing shows that the first matching contact is used.
>
> I'm running OpenSIPS V1.6.2.  I should mention that I've written a 
> "heartbeat" module that pings the registered contacts periodically and 
> accepts a "load" value in the response that is used to calculate the q-value. 
>  A few bits in the Cflags are used to keep track of those that respond back 
> and I've modified the show command to report the meaning of the flags.
>
> Here's the snippet from the output of the "opensipsctl ul show":
>
> AOR:: hmp
> Contact:: sip:s...@10.27.193.121 Q=0
> Expires:: 5051
> Callid:: 1...@10.27.193.121
> Cseq:: 78
> User-agent:: oSIP/wicsip-2.11.MR3519
> State:: CS_NEW
> Flags:: 1
> Cflag:: 34 (hb enabled, 0 unanswered)
> Socket:: udp:10.27.193.119:5060
> Methods:: 4294967295
> Contact:: sip:s...@10.27.194.54 Q=1
> Expires:: 6782
> Callid:: 2...@10.27.194.54
> Cseq:: 6
> User-agent:: oSIP/wicsip-3.4.13
> State:: CS_NEW
> Flags:: 1
> Cflag:: 34 (hb enabled, 0 unanswered)
> Socket:: udp:10.27.193.119:5060
> Methods:: 4294967295
>
> ... and here's a snippet of the openser.cfg file that is related:
>
> $var(aor) = "sip:h...@wic.west.com";
> lookup("location","b","$var(aor)");
> xlog("L_DBG", "sending to hmp: $mb, $ru, $rs\n");
> switch ($retcode) {
> case -1:# no contact
> xlog("L_ERR", "0101 $pp Forwarding to HMP failed 
> -- no registered contact. r-uri: $ru, callid: $ci, p-charging-vector: 
> $(hdr(P-Charging-Vector)), contact: $ct\n");
> sl_send_reply("404", "Not Found");
> exit;
> case -3:# internal error
> xlog("L_ERR", "0101 $pp Forwarding to HMP failed. 
> r-uri: $ru, callid: $ci, p-charging-vector: $(hdr(P-Charging-Vector)), 
> contact: $ct\n");
> sl_send_reply("404", "Not Found");
> exit;
> case -2:# method not supported
> xlog("L_ERR", "0101 $pp Forwarding to HMP failed. 
> r-uri: $ru, callid: $ci, p-charging-vector: $(hdr(P-Charging-Vector)), 
> contact: $ct\n");
> sl_send_reply("405", "Not Found");
> exit;
> }
> if (! t_relay() ) {
> sl_reply_error();
> }
> exit;
>
> A tcpdump has verified that the first contact listed is the one selected by 
> the lookup() f

[OpenSIPS-Users] Registrar's lookup() function not returning contact with greatest q-value

2010-08-03 Thread Pauba, Kevin L
Hi,

According to the registrar documentation module, "... the RURI will be 
overwritten with the highest-q rated contact ..." when the lookup() function is 
called.  My testing shows that the first matching contact is used.

I'm running OpenSIPS V1.6.2.  I should mention that I've written a "heartbeat" 
module that pings the registered contacts periodically and accepts a "load" 
value in the response that is used to calculate the q-value.  A few bits in the 
Cflags are used to keep track of those that respond back and I've modified the 
show command to report the meaning of the flags.

Here's the snippet from the output of the "opensipsctl ul show":

AOR:: hmp
Contact:: sip:s...@10.27.193.121 Q=0
Expires:: 5051
Callid:: 1...@10.27.193.121
Cseq:: 78
User-agent:: oSIP/wicsip-2.11.MR3519
State:: CS_NEW
Flags:: 1
Cflag:: 34 (hb enabled, 0 unanswered)
Socket:: udp:10.27.193.119:5060
Methods:: 4294967295
Contact:: sip:s...@10.27.194.54 Q=1
Expires:: 6782
Callid:: 2...@10.27.194.54
Cseq:: 6
User-agent:: oSIP/wicsip-3.4.13
State:: CS_NEW
Flags:: 1
Cflag:: 34 (hb enabled, 0 unanswered)
Socket:: udp:10.27.193.119:5060
Methods:: 4294967295

... and here's a snippet of the openser.cfg file that is related:

$var(aor) = "sip:h...@wic.west.com";
lookup("location","b","$var(aor)");
xlog("L_DBG", "sending to hmp: $mb, $ru, $rs\n");
switch ($retcode) {
case -1:# no contact
xlog("L_ERR", "0101 $pp Forwarding to HMP failed -- 
no registered contact. r-uri: $ru, callid: $ci, p-charging-vector: 
$(hdr(P-Charging-Vector)), contact: $ct\n");
sl_send_reply("404", "Not Found");
exit;
case -3:# internal error
xlog("L_ERR", "0101 $pp Forwarding to HMP failed. 
r-uri: $ru, callid: $ci, p-charging-vector: $(hdr(P-Charging-Vector)), contact: 
$ct\n");
sl_send_reply("404", "Not Found");
exit;
case -2:# method not supported
xlog("L_ERR", "0101 $pp Forwarding to HMP failed. 
r-uri: $ru, callid: $ci, p-charging-vector: $(hdr(P-Charging-Vector)), contact: 
$ct\n");
sl_send_reply("405", "Not Found");
exit;
}
if (! t_relay() ) {
sl_reply_error();
}
exit;

A tcpdump has verified that the first contact listed is the one selected by the 
lookup() function even though the q-value of that contact is less than the 
second contact in the list.

I'm not interested in parallel forking but, instead, want to forward requests 
to the least-loaded endpoint.  Am I doing something wrong?

Thanks!

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


Re: [OpenSIPS-Users] dispatcher probing mode always re-enables

2010-05-05 Thread Pauba, Kevin L
Hi Bogdan,

Is there a tracker item for this issue?  I might need to patch our production 
systems to fix this problem and would like to review the changes made.

Thanks!

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, May 05, 2010 6:46 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] dispatcher probing mode always re-enables

Hi Brett,

indeed, there was a bug - now is fixed on trunk - if you could give it a 
try will be helpful -> I will backport it later to stable.

Thanks and regards,
Bogdan



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


Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"

2010-02-16 Thread Pauba, Kevin L
Thanks for the offer, Bogdan.  I've patched it up myself just to see that it 
works as expected.  In msg_translator.c:received_builder() I added the #ifdef 
... #else ... #endif:

#ifdef NOTDEFINED
memcpy(buf, RECEIVED, RECEIVED_LEN);
if ( (tmp=ip_addr2a(source_ip))==0)
return 0; /* error*/
tmp_len=strlen(tmp);
len=RECEIVED_LEN+tmp_len;
memcpy(buf+RECEIVED_LEN, tmp, tmp_len);
#else
len=0;
#endif

The original code was between the #ifdef and #else.  This seems to work fine 
although I welcome any suggested improvements.

I was just looking for an alternative since changing OpenSIPs code is my last 
resort.  This LB is not SIP aware and is almost more pain to work with that 
it's worth but I'm being forced into using it.

OpenSIPs has been a great addition to our platform as it's simplified many 
tasks when trying to get different SIP endpoints working together.  I'm 
thankful for it.

Keep up the good work! :)

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, February 16, 2010 5:29 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"

Hi,

The received param is automatically added by OpenSIPS (as per RFC) as it 
detects a difference between the IP address in the VIA hdr (the UAC's 
IP) and the source IP at network level (the LB's IP).

There is no way to disable this (as it is standard SIP processing), but 
if something really  important for you, I can give you a patch to 
disable it.

Regards,
Bogdan

Pauba, Kevin L wrote:
> We are using a commercial load balancer in front of a pair of OpenSIPs 
> proxies (V1.6.1).
>
> The proxies add a Via header of the form:
>
> Via: SIP/2.0/UDP 
> XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3
>
> ... and forward() on the request.
>
> The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load 
> balancer) but it can't figure out where to send them (so they appear to get 
> dropped).  The replies need to get sent to XXX.XXX.XXX.XXX instead.
>
> Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from 
> the Via?
>
> I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route 
> and adding the same subst() call just before the forward() but those didn't 
> work.
>
> Thanks!
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
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] Via with "received=YYY.YYY.YYY.YYY"

2010-02-15 Thread Pauba, Kevin L
We are using a commercial load balancer in front of a pair of OpenSIPs proxies 
(V1.6.1).

The proxies add a Via header of the form:

Via: SIP/2.0/UDP 
XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3

... and forward() on the request.

The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load 
balancer) but it can't figure out where to send them (so they appear to get 
dropped).  The replies need to get sent to XXX.XXX.XXX.XXX instead.

Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from the 
Via?

I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route and 
adding the same subst() call just before the forward() but those didn't work.

Thanks!

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


Re: [OpenSIPS-Users] force_send_socket() and provisional responses.

2010-02-08 Thread Pauba, Kevin L
Nevermind ...

I found some code in a onreply_route that was drop()ing the 18* responses (this 
a a 700 line configuration).

Sorry to those that might have expended some time on this.

Thanks!

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Pauba, Kevin L
Sent: Monday, February 08, 2010 9:49 AM
To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] force_send_socket() and provisional responses.

I'm running OpenSIPs V1.6.1 (notls) and I'm using force_send_socket() to route 
some dialogs through a virtual IP.  I expected all replies from the VIP to be 
be redirected to the same socket where the INVITE came from.  Unfortunately, 
only the "200 OK" is making it back ... the provisional ("183 Session Progress" 
with early media and "180 Ringing" are not making it through.

Must I recognize these messages and use force_send_socket() again to redirect 
these responses to the non-VIP socket?

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


[OpenSIPS-Users] force_send_socket() and provisional responses.

2010-02-08 Thread Pauba, Kevin L
I'm running OpenSIPs V1.6.1 (notls) and I'm using force_send_socket() to route 
some dialogs through a virtual IP.  I expected all replies from the VIP to be 
be redirected to the same socket where the INVITE came from.  Unfortunately, 
only the "200 OK" is making it back ... the provisional ("183 Session Progress" 
with early media and "180 Ringing" are not making it through.

Must I recognize these messages and use force_send_socket() again to redirect 
these responses to the non-VIP socket?

Thanks!

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


Re: [OpenSIPS-Users] Include

2009-01-23 Thread Pauba, Kevin L
The example you provided is the method I used -- once you get used to the odd 
(but necessary) syntax, the syntax doesn't seem as bad.

Here's an example of some code that is similar to what I've done (although I 
have more than 50 macros defined in my current source).  The m4 source is 
copied to the SIP Proxy Server (in this example, a development host) and the 
following command is executed to generate the configuration:

$ m4 -DDEV config.m4 > config.cfg



define(`ROUTE_MAIN', 0)
define(`_OPENSER_IP',`regexp(esyscmd(`hostname -i'),`\<.+\>',\&)')
define(`_OPENSER_PORT',`5060')
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')

ifdef(`DEV',`
define(`OPENSER_NAME',`OPENSER (Development)')
define(`DEBUG_LEVEL',`3')
')

ifdef(`QA',`
define(`OPENSER_NAME',`OPENSER (Q`'A)')
define(`DEBUG_LEVEL',`3')
')

debug=DEBUG_LEVEL # -3 (L_ALERT) to 5 (L_DBG)
fork=no
log_stderror=no # do not print to stderr, if yes, syslog will be disabled
log_facility=LOG_LOCAL0

check_via=no# (cmd. line: -v)
dns=no   # (cmd. line: -r)
rev_dns=no  # (cmd. line: -R)
listen=_OPENSER_IP
port=_OPENSER_PORT
children=4
alias="OPENSER_NAME"
alias="_OPENSER_HOST"

route[ROUTE_MAIN] {

if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return;
  };

  if (msg:len > max_len) {
sl_send_reply("513", "Message too big");
return;
  };

  if (method == "INVITE" || method == "CANCEL") {
#
# Ensure a P-Charging-Vector header is present.
#
if (! is_present_hf("P-Charging-Vector")) {
$var(uuid) = $ci + $Ts + "_OPENSER_IP";
  append_hf("P-Charging-Vector: 
icid-value=$(var(uuid){s.md5})\r\n");
}

ifdef(`DEV',`
#
# Special rules for use in development.
#
...
')
...
}
...
}


-Original Message-
From: Matti Zemack [mailto:matti.zem...@rtcfactory.com] 
Sent: Friday, January 23, 2009 2:33 AM
To: Pauba, Kevin L
Cc: users@lists.opensips.org
Subject: RE: [OpenSIPS-Users] Include

Thanks Kevin!


I've started using m4 as Iñaki showed me yesterday, basically for setting 
parameters on different systems. This I've already implemented and using 
"happily ever after". :-)

Is there a better way of using M4 for bigger pieces of code, than the example 
below:
divert(-1)
define(`ROUTE1',
`route[1] {
 xlog("L_NOTICE", "We are now in route1\n");
}
')
divert(0)dnl


Thanks,
Matti Zemack
Stockholm
Sweden

-Original Message-
From: Pauba, Kevin L [mailto:klpa...@west.com] 
Sent: den 22 januari 2009 18:08
Not only the cleverest, I think it's the best!

I maintain the configuration for 12 SIP Proxies (using OpenSER) and I don't 
need 12 different configuration files.  A number of macros transform one m4 
file into one of 12 different configuration files with the stroke of a short 
command line.

I'd be happy to help provide some help to get you started ...

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Thursday, January 22, 2009 9:15 AM
Hi Matti,

no, there is no other solution - using M4 is the cleverest solution ;)

Regards,
Bogdan

Matti Zemack wrote:
>
> Hi again,
>
> First of all, Thanks for all help I received previously today. 
> Fantastic and very quick response.
>
> So here is my second newbie-question: Is there any way to include 
> files at startup? It would be nice to split a 2000+ lines config file 
> into easier to handle parts.
>
> (After this morning tip from Iñaki, I suppose I could use m4 for this 
> errand... Any other clever suggestions?)
>
> 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] Include

2009-01-22 Thread Pauba, Kevin L
Not only the cleverest, I think it's the best!

I maintain the configuration for 12 SIP Proxies (using OpenSER) and I don't 
need 12 different configuration files.  A number of macros transform one m4 
file into one of 12 different configuration files with the stroke of a short 
command line.

I'd be happy to help provide some help to get you started ...

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Thursday, January 22, 2009 9:15 AM
To: Matti Zemack
Cc: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Include

Hi Matti,

no, there is no other solution - using M4 is the cleverest solution ;)

Regards,
Bogdan

Matti Zemack wrote:
>
> Hi again,
>
> First of all, Thanks for all help I received previously today. 
> Fantastic and very quick response.
>
> So here is my second newbie-question: Is there any way to include 
> files at startup? It would be nice to split a 2000+ lines config file 
> into easier to handle parts.
>
> (After this morning tip from Iñaki, I suppose I could use m4 for this 
> errand... Any other clever suggestions?)
>
> Best Regards,
>
> Matti Zemack
>
> Stockholm
>
> Sweden
>
> 
>
> ___
> 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