Re: [OpenSIPS-Users] Using dispatcher and t_replicate()

2010-10-01 Thread Jody Rudolph
Just in case anyone might need a workaround here like I did I thought I would 
share what I did to get it to work.

Since the servers I am load balancing registrations across share a database 
backend for registrations I am trying to spread the registrations across single 
servers using dispatcher.

Lets say we have the following 3 IPs:

192.168.1.2
192.168.1.3
192.168.1.4


Since we cant use (that I can figure out anyway)
ds_select_dst("1", "4");
t_replicate($du);

I used:

ds_select_dst("1", "4");
switch($du)
{
case "sip:192.168.1.2":
xlog("reg destination address is $du\n");
t_replicate("sip:192.168.1.2");
break;
case "sip:192.168.1.3":
xlog("reg destination address is $du\n");
t_replicate("sip:192.168.1.3");
break;
case "sip:192.168.1.4":
xlog("reg destination address is $du\n");
t_replicate("sip:192.168.1.4");
break;
default:
xlog("Dispatching Reg failed: $du\n");
sl_reply_error();
break;
   }
exit;

Not the cleanest way of doing it, but it works.



Thanks,
Jody Rudolph
> 
> 


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


[OpenSIPS-Users] Using dispatcher and t_replicate()

2010-10-01 Thread Jody Rudolph
I am trying to replicate registrations over a variable number of servers in a 
cluster. The ideal function for this would be t_replicate because it ignores 
the status reply, but it seems it will not accept any sort of variable as 
input. 

Example:
ds_select_dst("1", "4");
t_replicate($du);


t_relay will work but the 200OK from the upstream servers is always passed 
along to the client which results in two 200OK being sent (one from opensips 
and one from the upstream cluster.


Can anyone help me with a way to get t_replicate to accept a variable, or a way 
to get reply_route to drop the 200OK and not pass it along to the registering 
user?

Thanks,
Jody Rudolph




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


[OpenSIPS-Users] UAC_REPLACE_TO function problem

2010-10-01 Thread Wesley Volcov
Hi List!

I need to use alias_db module to find if exisits an username associated a
DID number. I'm trying to use the alias_db_find, but it's not work as it
should.
I'm using opensips 1.6.2 version.

I have the follow configuration in my opensips.cfg:

if (alias_db_find("dbaliases", "$tu", "$var(to_alias)", "d")) {
uac_replace_to("$var(to_alias)");
xlog(" TEST -- $var(to_alias)  URI -- $ru");
};

But, on my log I have:

/usr/local/sbin/opensips[3372]: TEST -- sip:9558815...@myipaddress URI --
sip:14163043...@mydomain

The uac_relace_to is not wordking.

Am I missing some thing?

Regards,
-- 
Wesley Volcov
Email: wesleyvol...@gmail.com
Messenger: vol...@live.com
Mobile: +55 11 9989-5348
Website: http://volcov.blogspot.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Fw: Using same DNS resolved ip

2010-10-01 Thread Nauman Sulaiman
Hi Anca

I've tried 2 different User Agent behind Opensips issuing the REGISTER, 
Opensips is just proxying the request. The problem is each time it sends to a 
different IP.So Callcentric returns 407 with stale = true

Regards

--- On Thu, 30/9/10, Nauman Sulaiman  wrote:

> From: Nauman Sulaiman 
> Subject: [OpenSIPS-Users] Using same DNS resolved ip
> To: users@lists.opensips.org
> Date: Thursday, 30 September, 2010, 22:34
> Hi, using Opensips 1.6.2. We were
> wondering if it was possible to force Opensips to use the
> same IP address when issuing REGISTER request to certain
> VoIP providers such as CallCentric which do load balancing
> on their servers. Currently we are using Opensips as
> outboundproxy each time it issues a REGISTER request it does
> a round robin of all DNS address got from an SRV lookup.
> Because i think there is a bug in CallCentric and others
> that if it receives a REGISTER with auth info at a different
> ip that issued the challenge it sends another 407 challenge.
> Is there anyway to force Opensips to use the same ip?
> 
> 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


Re: [OpenSIPS-Users] Adding P-Preferred-Service header

2010-10-01 Thread David Santiago
Fair enough :)

Thanks for the follow up, Jeff

On Fri, Oct 1, 2010 at 5:51 PM, Jeff Pyle  wrote:

> Right... I usually put the second option in there so I have some control of
> where it goes in the list of headers.  I think by default it puts the new
> ones at the top.  Nothing wrong with that, just a bit weird looking.
>
> And in my example I forgot the \r\n.  Oops.
>
> Glad it's working for you.
>
>
>
> - Jeff
>
>
> On Oct 1, 2010, at 11:33 AM, David Santiago wrote:
>
> Thx Jeff,
>
> In the meantime I have tried with
>
> append_hf("P-Preferred-Service: header value\r\n");
>
> and it seems to also work fine.
>
>
> Regards,
> David
>
> On Fri, Oct 1, 2010 at 5:21 PM, Jeff Pyle  wrote:
>
>> David,
>>
>> http://www.opensips.org/html/docs/modules/1.4.x/textops.html#id271351
>>
>> Something
>> like this:
>>   insert_hf("P-Preferred-Service: header value", "Contact");
>>
>>
>> - Jeff
>>
>> On Oct 1, 2010, at 11:09 AM, David Santiago wrote:
>>
>> Hi,
>>
>> I need to add a P-Preferred-Service header to the SIP messages that are
>> sent from my OpenSIPS installation to the destination slee server.
>>
>> What is the recommended way to do this?
>>
>>
>> Thanks in advance,
>> David
>> ___
>> 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] Adding P-Preferred-Service header

2010-10-01 Thread Jeff Pyle
Right... I usually put the second option in there so I have some control of 
where it goes in the list of headers.  I think by default it puts the new ones 
at the top.  Nothing wrong with that, just a bit weird looking.

And in my example I forgot the \r\n.  Oops.

Glad it's working for you.



- Jeff


On Oct 1, 2010, at 11:33 AM, David Santiago wrote:

Thx Jeff,

In the meantime I have tried with

append_hf("P-Preferred-Service: header value\r\n");

and it seems to also work fine.


Regards,
David

On Fri, Oct 1, 2010 at 5:21 PM, Jeff Pyle 
mailto:jp...@fidelityvoice.com>> wrote:
David,

http://www.opensips.org/html/docs/modules/1.4.x/textops.html#id271351

Something
 like this:
  insert_hf("P-Preferred-Service: header value", "Contact");


- Jeff

On Oct 1, 2010, at 11:09 AM, David Santiago wrote:

Hi,

I need to add a P-Preferred-Service header to the SIP messages that are sent 
from my OpenSIPS installation to the destination slee server.

What is the recommended way to do this?


Thanks in advance,
David
___
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] Adding P-Preferred-Service header

2010-10-01 Thread David Santiago
Thx Jeff,

In the meantime I have tried with

append_hf("P-Preferred-Service: header value\r\n");

and it seems to also work fine.


Regards,
David

On Fri, Oct 1, 2010 at 5:21 PM, Jeff Pyle  wrote:

> David,
>
> http://www.opensips.org/html/docs/modules/1.4.x/textops.html#id271351
>
> Something
> like this:
>   insert_hf("P-Preferred-Service: header value", "Contact");
>
>
> - Jeff
>
> On Oct 1, 2010, at 11:09 AM, David Santiago wrote:
>
> Hi,
>
> I need to add a P-Preferred-Service header to the SIP messages that are
> sent from my OpenSIPS installation to the destination slee server.
>
> What is the recommended way to do this?
>
>
> Thanks in advance,
> David
> ___
> 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] Adding P-Preferred-Service header

2010-10-01 Thread Jeff Pyle
David,

http://www.opensips.org/html/docs/modules/1.4.x/textops.html#id271351

Something
 like this:
  insert_hf("P-Preferred-Service: header value", "Contact");


- Jeff

On Oct 1, 2010, at 11:09 AM, David Santiago wrote:

Hi,

I need to add a P-Preferred-Service header to the SIP messages that are sent 
from my OpenSIPS installation to the destination slee server.

What is the recommended way to do this?


Thanks in advance,
David
___
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] Adding P-Preferred-Service header

2010-10-01 Thread David Santiago
Hi,

I need to add a P-Preferred-Service header to the SIP messages that are sent
from my OpenSIPS installation to the destination slee server.

What is the recommended way to do this?


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


Re: [OpenSIPS-Users] Downstream proxy rewriting contact header

2010-10-01 Thread Adam Twardowski
remove the fix_natted_contact() on P1?

On Fri, Oct 1, 2010 at 10:18 AM, Nauman Sulaiman  wrote:

> Hi, using Opensips 1.6.2 we have the following setup.
>
> UA1Opensips Proxy --- P1 -- P2 -- UA2
>
> Proxy P1 is rewriting contact header sent by opensips in 180 and 200K
> response  to INVITE from UA2 to UA1. All proxies are record-routing. P1
> seems to assume all requests are from behind NAT and rewrites the contact
> header with source IP ie that of Opensips proxy. The result is UA2 ACK is
> routed only to Opensips proxy and does not reach UA1. Is there any i can
> handle this in the Opensips proxy to account for behaviour of P1.
>
> 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] Downstream proxy rewriting contact header

2010-10-01 Thread Nauman Sulaiman
Hi, using Opensips 1.6.2 we have the following setup.

UA1Opensips Proxy --- P1 -- P2 -- UA2

Proxy P1 is rewriting contact header sent by opensips in 180 and 200K response  
to INVITE from UA2 to UA1. All proxies are record-routing. P1 seems to assume 
all requests are from behind NAT and rewrites the contact header with source IP 
ie that of Opensips proxy. The result is UA2 ACK is routed only to Opensips 
proxy and does not reach UA1. Is there any i can handle this in the Opensips 
proxy to account for behaviour of P1. 

Thanks


  

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


Re: [OpenSIPS-Users] Adding data to a request before relaying it

2010-10-01 Thread Najib Hara

Thank you Anca, I'm working on it and I'll post the specific part of the 
routing logic as soon as finished.

From: lebron_na...@hotmail.com
To: users@lists.opensips.org
Subject: Adding data to a request before relaying it
Date: Fri, 1 Oct 2010 08:55:05 +








Hi everybody,

I'm a newer in the OpenSIPS world and I'm trying to learn how to use it 
efficiently.
I'm working on a project where I have to modify incoming requests before 
relaying them to their first destination.
By modifying, I mean sending those requests to a server which will send back 
messages with the additional data to implement in the requests.
The next step is to collect those informations from the responses and add them 
to the initial requests which will be relayed to their initial destination.
My question is: is OpenSIPS capable of doing this ?

For more detail, here is a scheme.

Thank you in advance for your responses
  ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Adding data to a request before relaying it

2010-10-01 Thread Adam Twardowski
A 600 is probably not the best response to be using there, 6XX messages are
global errors, meaning it will never complete no matter where you send it.
 We have a similar setup but we use 302 reply to move the data around.

2010/10/1 Anca Vamanu 

>  Hi Najib,
>
> You can do this by defining a failure_route which will be called when the
> 600 reply is received and there inserting the data as the body for Invite
> with textops functions (
> http://www.opensips.org/html/docs/modules/devel/textops.html#id271334.)
> and sending the Invite to another destination.
>
> Regards,
>
> --
> Anca Vamanuwww.voice-system.ro
>
>
> On 10/01/2010 11:55 AM, Najib Hara wrote:
>
> Hi everybody,
>
> I'm a newer in the OpenSIPS world and I'm trying to learn how to use it
> efficiently.
> I'm working on a project where I have to modify incoming requests before
> relaying them to their first destination.
> By modifying, I mean sending those requests to a server which will send
> back messages with the additional data to implement in the requests.
> The next step is to collect those informations from the responses and add
> them to the initial requests which will be relayed to their initial
> destination.
> My question is: is OpenSIPS capable of doing this ?
>
> For more detail, here is a scheme.
>
> Thank you in advance for your responses
>
>
> ___
> 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] Adding data to a request before relaying it

2010-10-01 Thread Anca Vamanu

Hi Najib,

You can do this by defining a failure_route which will be called when 
the 600 reply is received and there inserting the data as the body for 
Invite with textops functions 
(http://www.opensips.org/html/docs/modules/devel/textops.html#id271334.) 
and sending the Invite to another destination.


Regards,

--
Anca Vamanu
www.voice-system.ro


On 10/01/2010 11:55 AM, Najib Hara wrote:

Hi everybody,

I'm a newer in the OpenSIPS world and I'm trying to learn how to use 
it efficiently.
I'm working on a project where I have to modify incoming requests 
before relaying them to their first destination.
By modifying, I mean sending those requests to a server which will 
send back messages with the additional data to implement in the requests.
The next step is to collect those informations from the responses and 
add them to the initial requests which will be relayed to their 
initial destination.

My question is: is OpenSIPS capable of doing this ?

For more detail, here is a scheme.

Thank you in advance for your responses
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using same DNS resolved ip

2010-10-01 Thread Anca Vamanu
Hi Nauman,

What do you use to send the REGISTER request? Do you use the MI command 
t_uac_dlg, 
http://www.opensips.org/html/docs/modules/devel/tm.html#id272728? You 
can specify there the local socket to use when sending the REGISTER message.

Regards,

-- 
Anca Vamanu
www.voice-system.ro



On 10/01/2010 12:34 AM, Nauman Sulaiman wrote:
> Hi, using Opensips 1.6.2. We were wondering if it was possible to force 
> Opensips to use the same IP address when issuing REGISTER request to certain 
> VoIP providers such as CallCentric which do load balancing on their servers. 
> Currently we are using Opensips as outboundproxy each time it issues a 
> REGISTER request it does a round robin of all DNS address got from an SRV 
> lookup. Because i think there is a bug in CallCentric and others that if it 
> receives a REGISTER with auth info at a different ip that issued the 
> challenge it sends another 407 challenge. Is there anyway to force Opensips 
> to use the same ip?
>
> Thanks
>

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


Re: [OpenSIPS-Users] Adding data to a request before relaying it

2010-10-01 Thread Raúl Alexis Betancor Santana
On Viernes 01 Octubre 2010 09:55:05 Najib Hara escribió:
> Hi everybody,
> 
> I'm a newer in the OpenSIPS world and I'm trying to learn how to use it
> efficiently. I'm working on a project where I have to modify incoming
> requests before relaying them to their first destination. By modifying, I
> mean sending those requests to a server which will send back messages with
> the additional data to implement in the requests. The next step is to
> collect those informations from the responses and add them to the initial
> requests which will be relayed to their initial destination. My question
> is: is OpenSIPS capable of doing this ?
> 
> For more detail, here is a scheme.
> 
> Thank you in advance for your responses


The short answer is yes, OpenSIPS is able to do what you describe.

Best regards
-- 
Raúl Alexis Betancor Santana
Dimensión Virtual

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


[OpenSIPS-Users] Adding data to a request before relaying it

2010-10-01 Thread Najib Hara

Hi everybody,

I'm a newer in the OpenSIPS world and I'm trying to learn how to use it 
efficiently.
I'm working on a project where I have to modify incoming requests before 
relaying them to their first destination.
By modifying, I mean sending those requests to a server which will send back 
messages with the additional data to implement in the requests.
The next step is to collect those informations from the responses and add them 
to the initial requests which will be relayed to their initial destination.
My question is: is OpenSIPS capable of doing this ?

For more detail, here is a scheme.

Thank you in advance for your responses
  <>___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Testing SIP SIMPLE Presence and XCAP with SIP Communicator

2010-10-01 Thread Adrian Georgescu
FYI

SIP communicator http://sip-communicator.org has recently added  support for 
XCAP document management (including icon) and Presence.

The SIP account wizard from SIP Communicator can now automatically enroll SIP 
accounts in sip2sip.info (select it from the drop down box) and the XCAP root 
and Presence settings are automatically provisioned in the client. In the 
backend there is  a tandem of OpenXCAP and OpenSIPS running.

If someone wants to test, you may report problems related to the server side 
here.

Regards,
Adrian




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


Re: [OpenSIPS-Users] "Asterisk Contexts" in OpenSIPS

2010-10-01 Thread Raúl Alexis Betancor Santana
On Viernes 01 Octubre 2010 07:53:38 Deon Vermeulen escribió:
> Hi Raul
> 
> Thanks for the clarification and response. Really appreciate it.
> 
> Have been looking at the siptraces provided by SIP Trace in Opensips
> Control Panel.
> 
> I'm guessing I still have a NAT Traversal issue.
> 
> What is really strange is that I can only phone from us...@domaina.com
> to us...@domain.com, but not visa-versa.
> When I answer the call on us...@domain.com the call does not setup but
> times out with error 408 on both ends.

If as I suppose, you are new to OpenSIPS, I suggest you to begin with the 
standar config file, it does nat-fixing-handling, and when you undestand what 
it does, try to modify it for adding what youe need.

Also a bunch of SIP knowleadge is "a must".

Best regards
-- 
Raúl Alexis Betancor Santana
Dimensión Virtual

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