[OpenSIPS-Users] Request forwarding and topology hiding with b2b_init_request

2014-08-27 Thread Eugene Prokopiev
Hi,

My network scheme looks like:

10.10.2.2 ---> (10.10.2.1|10.10.1.1) ---> 10.10.1.2

I have two separate networks (10.10.1.0/24 and 10.10.2.0/24) without
routing between them. I have opensips-1.11.2 installed and with
interfaces in each network. I need to forward all requests from
10.10.2.2 to 10.10.1.2 and foward responses back.

My initial config was:

mhomed=yes
auto_aliases=no
disable_tcp=yes

mpath="/usr/lib64/opensips/modules/"

loadmodule "mi_fifo.so"
loadmodule "sl.so"

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

route {
  forward("10.10.1.2:5060");
}

All requests was forwarded fine, but I see unchanged ip address from
network 10.10.2.0/24 in all requests headers forwarded to 10.10.1.2. I
need to see ip address only from network 10.10.1.0/24 in this
requests.

So, I tried to use b2b_init_request:

mhomed=yes
auto_aliases=no
disable_tcp=yes

mpath="/usr/lib64/opensips/modules/"

loadmodule "mi_fifo.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "b2b_entities.so"
loadmodule "b2b_logic.so"

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

modparam("b2b_logic", "db_mode", 0)
modparam("b2b_entities", "db_mode", 0)

route {
  b2b_init_request("top hiding");
  forward("10.10.1.2:5060");
}

There are no significant improvements with this configuration. I see
my original INVITE and many additional INVITE requests with UserAgent
: OpenSIPS, forwarded to 10.10.1.2, but headers contains ip addresses
from network 10.10.2.0/24.

What is wrong in my configuration? How to make the real topology hiding?

-- 
WBR,
Eugene Prokopiev

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


[OpenSIPS-Users] Replace IP in To Field

2014-08-27 Thread John Komara
I need to replace the IP in the To field. It is a requirement for a customer. I 
am trying to do this with uac_replace_to. It replaces the To field in the 
INVITE. However it does not replace it ACK to the 200OK. Looking at the logs I 
see that a dialog is created for the INVITE. Immediately after the INVITE is 
sent the dialog is destroyed. I am assuming that this is why the To field is 
not being modified in the ACK.

It looks as though the dialog is never stored. I have tried to do this in 
memory and in mysql. I am never able to retrieve a dialog with the "opensipsctl 
fifo dlg_list" command. I have attached links to my debug logs and config.

Is there a better way to accomplish this than what I am trying to do?

Debug Logs: http://pastebin.com/mvKx5AQp
Config: http://pastebin.com/n9vwncpU

Thank you,

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


Re: [OpenSIPS-Users] ACK in failover for call setup

2014-08-27 Thread Seth Schultz
Liviu,

At some point we will most likely be upgrading to the latest LTS, but this
isn't scheduled anytime in the near future.

I applied the patch, but this didn't resolve the issue.

The problem, in a nutshell, appears to be that the local ACK/CANCEL is
created based on the initial INVITE (Internal->Internal), not the branch
INVITE (Internal->External).  This works great if all branches are
Internal->Internal, however it doesn't work in an N-branch scenario where
the other branches might be communicating with an External device.  The end
result is that the internal address is placed in the Via1 header for the
local ACK/CANCEL to the external gateway.

After making the modification to t_msgbuilder.c line 153 below, all ACKs
function correctly to all branches because we have a reply with the correct
external address (or internal address), however CANCEL from the internal
UAC to the External device is still broken because we don't have a reply.
 Is there a way to access the INVITE for the current branch and pull out
the Via1->host/port?  I apologize in advance if anything I am saying is
incorrect, this is really the first time I've ever looked at the source.

set_hostport(&hp, (is_local(Trans))?0:req);

To

if (rpl && rpl->via1)
{
hp.host = &rpl->via1->host;
hp.port = &rpl->via1->port_str;
}
else
{
set_hostport(&hp, (is_local(Trans))?0:req);
}

Thanks,
Seth

On Wed, Aug 27, 2014 at 5:31 AM, Liviu Chircu  wrote:

>  Hello Seth,
>
> Earlier this year, there were some important fixes related to
> set_advertised_address() which solved some memory corruption issues and
> fixed the IP used when creating multiple branches [1]. Unfortunately, they
> did not get backported to 1.9, since it was not supported anymore. If
> upgrading to 1.11 is not a possibility (although we highly recommend you do
> so), I've backported the patch for 1.9 [2].
>
> [1]: https://github.com/OpenSIPS/opensips/commit/ad92fa6ff6
> [2]: https://gist.github.com/liviuchircu/a72478ecd9a40588023d
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 08/26/2014 01:51 AM, Seth Schultz wrote:
>
>   Răzvan,
>
>  After digging through the source code, I found the line of code causing
> my issues.  In the opensips_1_9 branch in t_msgbuilder.c on line 152 we have
>
>  ...
>  *set_hostport(&hp, (is_local(Trans))?0:req);*
>  via=via_builder(&via_len, Trans->uac[branch].request.dst.send_sock,
>  &branch_str, 0, Trans->uac[branch].request.dst.proto, &hp );
>  if (!via){
>  LM_ERR("no via header got from builder\n");
>  goto error;
>  }
>  *len+= via_len;
>  ...
>
>  Would it be incredibly stupid to modify it to always base the via on the
> reply?
>
>  ...
>  *hp.host=&rpl->via1->host;*
> *hp.port=&rpl->via1->port_str;*
> via=via_builder(&via_len, Trans->uac[branch].request.dst.send_sock,
> &branch_str, 0, Trans->uac[branch].request.dst.proto, &hp );
> if (!via){
> LM_ERR("no via header got from builder\n");
> goto error;
> }
> *len+= via_len;
>  ...
>
>  After making this modification it does have the correct Via address for
> all failure ACK replies.
>
>  Thanks,
> Seth
>
>
> On Fri, Aug 22, 2014 at 10:26 AM, Seth Schultz 
> wrote:
>
>> Răzvan,
>>
>>  Unfortunately in my setup OpenSIPS is only using a single interface
>> 172.16.1.115.  The external IP NATing is handled by the firewall, so I
>> can't use force_send_socket, because it would still be 172.16.1.115.
>>
>>  Thanks,
>> Seth
>>
>> On Fri, Aug 22, 2014 at 5:07 AM, Răzvan Crainea 
>> wrote:
>>
>>>  Hi, Seth!
>>>
>>> So basically you want to change the outgoing interface for the second
>>> leg of the call, right? Instead of record_route_preset() function, have you
>>> considered using the force_send_socket() function? This forces OpenSIPS to
>>> switch the interfaces and should change the VIA headers properly without
>>> any issues. Let me know your answer
>>>
>>>
>>>
>>> ___
>>> Users mailing 
>>> listUsers@lists.opensips.orghttp://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 
> listUsers@lists.opensips.orghttp://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] B2B failed to create new b2b server instance

2014-08-27 Thread Satish Patel
Whenever I call those error showed up. 

I'm not using any kind of XML scenarios etc. just B2B. 



Sent from my iPhone

On Aug 27, 2014, at 12:54 PM, Bogdan-Andrei Iancu  wrote:

> Hi,
> 
> Any other errors aside those ? also, what is the contecxt of the errors ? 
> when do they show up ? at request ? initial or sequential ?
> 
> Regards,
>  Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 26.08.2014 23:33, Satish Patel wrote:
>> I am using 1.12 Opensips and just playing with B2B top hiding and i am 
>> getting following error
>> 
>> ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b server 
>> instance
>> ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b server 
>> instance
>> b2b_reply (B2B.346.3114641)
>> ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b server 
>> instance
>> ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b server 
>> instance
>> 
>> following my script code, also i am using nathelper for NAT, does it 
>> creating any issue?  
>> 
>> if (is_method("INVITE") && !has_totag()) {
>> b2b_init_request("top hiding");
>> engage_media_proxy(); # satish
>> setflag(ACC_DO); # do accounting
>> 
>> 
>> 
>> ___
>> 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] topology_hiding() not executing

2014-08-27 Thread Satish Patel
Hi Vlad,

I have created pastebin for Asterisk, Opensips and opensips.cf file, I am
going to send you in your private email address because of security reason.

Let me know if you see any issue in my configuration, or any kind of
suggestion.

Appreciate your help.


On Mon, Aug 25, 2014 at 11:48 PM, Satish Patel  wrote:

> I have put topology_hiding() function at following place in script but its
> not hiding VIA header following is my senerio
>
> [UA]>[Opensips]---[Asterisk/SIP gateway]
>
> I want to hind my UA IP address so Asterisk doesn't see them, currently my
> asterisk can see what IP address UA coming from, where should i put them
> generally
>
>
> if (is_method("INVITE")) {
> ...
> ...
> if  ( uri=~"^sip:[0-9]*@.*") {
> uac_replace_from("sip:4545@65.111.170.127");
> t_on_failure("3");
> resetflag(7);
> t_relay( "udp:65.111.170.127:5065" );
>  topology_hiding();
> exit;
> };
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] usrloc disable timer

2014-08-27 Thread Schneur Rosenberg
Hi

I'm using usrloc with db_mode set to 2, I'm using a backup server which is
always running and is using the same database, my problem is that the
second server constantly removes records from the location table, is it
possible to  disable the expired contacts timer? would setting
timer_interval to 0 disable the timer? I can write a cron that would delete
expired contacts. is there any downside to this? does the timer do anything
else? the documentation says "The timer deletes all expired contacts and
flushes all modified or new contacts to database" I'm not exactly what they
mean by flushing the modified or new contacts.

Both servers have exact same system time so that's not the issue.

If there is a better way please let me know.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] B2B failed to create new b2b server instance

2014-08-27 Thread Bogdan-Andrei Iancu

Hi,

Any other errors aside those ? also, what is the contecxt of the errors 
? when do they show up ? at request ? initial or sequential ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.08.2014 23:33, Satish Patel wrote:
I am using 1.12 Opensips and just playing with B2B top hiding and i am 
getting following error


ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b 
server instance
ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b 
server instance

b2b_reply (B2B.346.3114641)
ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b 
server instance
ERROR:b2b_logic:create_top_hiding_entities: failed to create new b2b 
server instance


following my script code, also i am using nathelper for NAT, does it 
creating any issue?


if (is_method("INVITE") && !has_totag()) {
b2b_init_request("top hiding");
engage_media_proxy(); # satish
setflag(ACC_DO); # do accounting



___
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] ERROR:core:_tls_read:

2014-08-27 Thread Bogdan-Andrei Iancu

Hi Gary,

yes, they may be "normal" runtime errors if connections are broken.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.08.2014 00:56, Gary Nyquist wrote:

Hi,
The following type errors are showing up in the log:
ERROR:core:_tls_read: TLS connection to 64.71.31.202:55271 read failed
I am guessing that this error appears when the TLS connection is broken.
Am I correct?
If yes, how can this event be used to remove the corresponding AOR 
from the REGISTRAR?

Thanks
-Gary


___
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] [OpenSIPS-Devel] OpenSIPS Public Meetings

2014-08-27 Thread Răzvan Crainea

Hi, all!

Thank you all for joining the first meeting. For those who could not 
make it, you can find the logs here[2].

Stay tuned for the next meeting on 24.09.2014!

[2] http://www.opensips.org/Community/IRCmeeting20140827

Regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 08/27/2014 05:31 PM, Bogdan-Andrei Iancu wrote:

To make it easier when comes to timezones, please see:
http://www.timeanddate.com/worldclock/fixedtime.html?msg=OpenSIPS+meeting&iso=20140827T18&p1=49&ah=1 



See you in 30 minutes on IRC ;)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 27.08.2014 01:12, Răzvan Crainea wrote:

Hi, all!

Don't forget about tomorrow's meeting at 18:00 UTC+2!
Looking forward to see you all in the #opensips IRC room!

Regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 08/22/2014 06:18 PM, Bogdan-Andrei Iancu wrote:

Saul, bring it into discussion on Wednesday - it sounds ok.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 22.08.2014 11:38, Saúl Ibarra Corretgé wrote:
On 22 Aug 2014, at 10:16, Bogdan-Andrei Iancu  
wrote:



Hi,

I'm really looking forward for this meeting - so far we came up 
with really great ideas for 1.12, but as usual, the input/feedback 
from community is really important for us. Recently there were 
several discussions (on different threads on the mailing lists) 
where people expressed their need for new features in 
OpenSIPSSo, here we go for it :).


Please look at the big topic we suggested, come up with your own 
ideas and let's talk ! See you on Wednesday !!


This is a great initiative folks, kudos! I’ll try to make it to the 
meeting.


Can I get “Asynchronous TLS” added to the list? :-)


Regards,

--
Saúl Ibarra Corretgé
AG Projects





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




___
Devel mailing list
de...@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



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



___
Devel mailing list
de...@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



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


Re: [OpenSIPS-Users] [OpenSIPS-Devel] OpenSIPS Public Meetings

2014-08-27 Thread Bogdan-Andrei Iancu

To make it easier when comes to timezones, please see:
http://www.timeanddate.com/worldclock/fixedtime.html?msg=OpenSIPS+meeting&iso=20140827T18&p1=49&ah=1

See you in 30 minutes on IRC ;)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 27.08.2014 01:12, Răzvan Crainea wrote:

Hi, all!

Don't forget about tomorrow's meeting at 18:00 UTC+2!
Looking forward to see you all in the #opensips IRC room!

Regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 08/22/2014 06:18 PM, Bogdan-Andrei Iancu wrote:

Saul, bring it into discussion on Wednesday - it sounds ok.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 22.08.2014 11:38, Saúl Ibarra Corretgé wrote:
On 22 Aug 2014, at 10:16, Bogdan-Andrei Iancu  
wrote:



Hi,

I'm really looking forward for this meeting - so far we came up 
with really great ideas for 1.12, but as usual, the input/feedback 
from community is really important for us. Recently there were 
several discussions (on different threads on the mailing lists) 
where people expressed their need for new features in 
OpenSIPSSo, here we go for it :).


Please look at the big topic we suggested, come up with your own 
ideas and let's talk ! See you on Wednesday !!


This is a great initiative folks, kudos! I’ll try to make it to the 
meeting.


Can I get “Asynchronous TLS” added to the list? :-)


Regards,

--
Saúl Ibarra Corretgé
AG Projects





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




___
Devel mailing list
de...@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



___
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] need help - Insert_hf when Route: missing

2014-08-27 Thread Satish Patel
I got your point and with in 1 hour I'm going to send you all info. 

Problem is last 3 days I couldn't sleep because of this freaking odd behavior, 
I need this solution to save my business. 

Sorry for if I'm pushing it hard but I have no way except you guys. Again 
thanks for staying top of this.  

Sent from my iPhone

On Aug 27, 2014, at 9:18 AM, Vlad Paiu  wrote:

> Hello,
> 
> Please be a little bit more patient - last reply for your questions was 
> yesterday :)
> 
> About your problem, you do not need to handle Route headers at all - this is 
> the entire point of topology hiding, OpenSIPS adds no Route: header to it, 
> since it acts like the endpoint, and the callee must contact OpenSIPS by the 
> Contact headers only.
> 
> As requested in the previous users list email, please post SIP traces of your 
> calls to see exactly what's going on ( leave plain topology hiding in place, 
> please remove your hacks with the Route headers ).
> 
> Best Regards,
> 
> Vlad Paiu
> OpenSIPS Developer
> http://www.opensips-solutions.com
> 
> On 27.08.2014 14:08, Satish Patel wrote:
>> I have post many question on topology hiding any not get any reply back from 
>> people and developers now I don't have any option except some goofy hack
>> 
>> When I use topology hiding it removes Route: and because of that callee 
>> doesn't able to send BYE back to opensips.
>> 
>> I want use insert_hf to inject Route: so I get clean BYE message. Do you 
>> guys have any suggestion?
>> 
>> Sent from my iPhone
>> ___
>> 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] need help - Insert_hf when Route: missing

2014-08-27 Thread Vlad Paiu

Hello,

Please be a little bit more patient - last reply for your questions was 
yesterday :)


About your problem, you do not need to handle Route headers at all - 
this is the entire point of topology hiding, OpenSIPS adds no Route: 
header to it, since it acts like the endpoint, and the callee must 
contact OpenSIPS by the Contact headers only.


As requested in the previous users list email, please post SIP traces of 
your calls to see exactly what's going on ( leave plain topology hiding 
in place, please remove your hacks with the Route headers ).


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 27.08.2014 14:08, Satish Patel wrote:

I have post many question on topology hiding any not get any reply back from 
people and developers now I don't have any option except some goofy hack

When I use topology hiding it removes Route: and because of that callee doesn't 
able to send BYE back to opensips.

I want use insert_hf to inject Route: so I get clean BYE message. Do you guys 
have any suggestion?

Sent from my iPhone
___
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] topology_hiding() not executing

2014-08-27 Thread Satish Patel
Oh boy finally got your reply, I need you badly to fix this. With in 1 hour I'm 
going to send you all related info. Just keep in touch. 

Sent from my iPhone

On Aug 27, 2014, at 8:39 AM, Vlad Paiu  wrote:

> Hello,
> 
> Please post the relevant part of your script when calling topology_hiding() 
> and when routing sequential requests, and also please pastebin a full SIP 
> trace showing the traffic for such a dialog.
> 
> Best Regards,
> Vlad Paiu
> OpenSIPS Developer
> http://www.opensips-solutions.com 
> On 26.08.2014 15:38, Satish Patel wrote:
>> I have tried your logic and it works but it is not handling BYE message, 
>> after caller hang up phone, caller not receiving BYE and caller phone is 
>> still in connected state not getting hung up. 
>> 
>> Sent from my iPhone
>> 
>> On Aug 26, 2014, at 5:09 AM, Vlad Paiu  wrote:
>> 
>>> Hello,
>>> 
>>> You must call topology_hiding() before t_relay() - please try that.
>>> Also, make sure to change your sequential request handling from
>>> 
>>>  if (loose_route())
>>> 
>>> to
>>> 
>>>  if (loose_route() || match_dialog())
>>> 
>>> 
>>> Best Regards,
>>> Vlad Paiu
>>> OpenSIPS Developer
>>> http://www.opensips-solutions.com 
>>> On 26.08.2014 06:48, Satish Patel wrote:
 I have put topology_hiding() function at following place in script but its 
 not hiding VIA header following is my senerio
 
 [UA]>[Opensips]---[Asterisk/SIP gateway]
 
 I want to hind my UA IP address so Asterisk doesn't see them, currently my 
 asterisk can see what IP address UA coming from, where should i put them 
 generally 
 
 
 if (is_method("INVITE")) {
 ...
 ...
 if  ( uri=~"^sip:[0-9]*@.*") {
 uac_replace_from("sip:4545@65.111.170.127");
 t_on_failure("3");
 resetflag(7);
 t_relay( "udp:65.111.170.127:5065" );
  topology_hiding();
 exit;
 };
 
 
 
 ___
 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] topology_hiding() not executing

2014-08-27 Thread Vlad Paiu

Hello,

Please post the relevant part of your script when calling 
topology_hiding() and when routing sequential requests, and also please 
pastebin a full SIP trace showing the traffic for such a dialog.


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 26.08.2014 15:38, Satish Patel wrote:
I have tried your logic and it works but it is not handling BYE 
message, after caller hang up phone, caller not receiving BYE and 
caller phone is still in connected state not getting hung up.


Sent from my iPhone

On Aug 26, 2014, at 5:09 AM, Vlad Paiu > wrote:



Hello,

You must call topology_hiding() before t_relay() - please try that.
Also, make sure to change your sequential request handling from

 if (loose_route())

to

 if (loose_route() || match_dialog())


Best Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com  
On 26.08.2014 06:48, Satish Patel wrote:
I have put topology_hiding() function at following place in script 
but its not hiding VIA header following is my senerio


[UA]>[Opensips]---[Asterisk/SIP gateway]

I want to hind my UA IP address so Asterisk doesn't see them, 
currently my asterisk can see what IP address UA coming from, where 
should i put them generally



if (is_method("INVITE")) {
...
...
if  ( uri=~"^sip:[0-9]*@.*") {
uac_replace_from("sip:4545@65.111.170.127 
");

t_on_failure("3");
resetflag(7);
t_relay( "udp:65.111.170.127:5065 
" );

 topology_hiding();
exit;
};



___
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] need help - Insert_hf when Route: missing

2014-08-27 Thread Satish Patel
I have post many question on topology hiding any not get any reply back from 
people and developers now I don't have any option except some goofy hack 

When I use topology hiding it removes Route: and because of that callee doesn't 
able to send BYE back to opensips. 

I want use insert_hf to inject Route: so I get clean BYE message. Do you guys 
have any suggestion?

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


Re: [OpenSIPS-Users] Topology hiding example

2014-08-27 Thread Satish Patel
I'm on same boat, I really want to use topology hiding but it's not working and 
missing BYE because its deleting route: in sip dialogs. 

There is not any good document out there so for now we are going with 
freeswitch. 

Sent from my iPhone

On Aug 26, 2014, at 4:59 AM, Eugene Prokopiev  wrote:

> Hi,
> 
> I have the installed opensips between external public network (where
> client devices are located) and internal private network with
> softswitch. I need to forward all incoming requests frim public
> network to softswitch and forward answers back, but I need to replace
> public addresses in sip/sdp headers for incoming requests and outgoing
> answers and forward rtp packets.
> 
> Where can I find full actual example of this scenario?
> 
> -- 
> WBR,
> Eugene Prokopiev
> 
> ___
> 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] ACK in failover for call setup

2014-08-27 Thread Liviu Chircu

Hello Seth,

Earlier this year, there were some important fixes related to 
set_advertised_address() which solved some memory corruption issues and 
fixed the IP used when creating multiple branches [1]. Unfortunately, 
they did not get backported to 1.9, since it was not supported anymore. 
If upgrading to 1.11 is not a possibility (although we highly recommend 
you do so), I've backported the patch for 1.9 [2].


[1]: https://github.com/OpenSIPS/opensips/commit/ad92fa6ff6
[2]: https://gist.github.com/liviuchircu/a72478ecd9a40588023d

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08/26/2014 01:51 AM, Seth Schultz wrote:

Ra(zvan,

After digging through the source code, I found the line of code 
causing my issues.  In the opensips_1_9 branch in t_msgbuilder.c on 
line 152 we have


...
*set_hostport(&hp, (is_local(Trans))?0:req);*
via=via_builder(&via_len, Trans->uac[branch].request.dst.send_sock,
&branch_str, 0, Trans->uac[branch].request.dst.proto, &hp );
if (!via){
LM_ERR("no via header got from builder\n");
goto error;
}
*len+= via_len;
...

Would it be incredibly stupid to modify it to always base the via on 
the reply?


...
*hp.host=&rpl->via1->host;*
*hp.port=&rpl->via1->port_str;*
via=via_builder(&via_len, Trans->uac[branch].request.dst.send_sock,
&branch_str, 0, Trans->uac[branch].request.dst.proto, &hp );
if (!via){
LM_ERR("no via header got from builder\n");
goto error;
}
*len+= via_len;
...

After making this modification it does have the correct Via address 
for all failure ACK replies.


Thanks,
Seth


On Fri, Aug 22, 2014 at 10:26 AM, Seth Schultz 
mailto:sschu...@scholarchip.com>> wrote:


Ra(zvan,

Unfortunately in my setup OpenSIPS is only using a single
interface 172.16.1.115.  The external IP NATing is handled by the
firewall, so I can't use force_send_socket, because it would still
be 172.16.1.115.

Thanks,
Seth

On Fri, Aug 22, 2014 at 5:07 AM, Ra(zvan Crainea
mailto:raz...@opensips.org>> wrote:

Hi, Seth!

So basically you want to change the outgoing interface for the
second leg of the call, right? Instead of
record_route_preset() function, have you considered using the
force_send_socket() function? This forces OpenSIPS to switch
the interfaces and should change the VIA headers properly
without any issues. Let me know your answer




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



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





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


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


Re: [OpenSIPS-Users] Load balancer problem

2014-08-27 Thread Anshuman S Rawat
Hi,

 

Yes, load_balance() returned false. But I found the problem. I had probing
on and '200' for OPTIONS was the only measurement for success. Fixed that
and it worked.

 

Thanks for responding.

 

Anshuman

 

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Tuesday, August 26, 2014 10:44 PM
To: OpenSIPS users mailling list; ara...@3clogic.com
Subject: Re: [OpenSIPS-Users] Load balancer problem

 

Hi,

By "failing" you mean the "load_balance" function returns false in script ?

Could you post the output of: 

opensipsctl fifo lb_list


Regards,



Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.08.2014 15:04, Anshuman S Rawat wrote:

Hi,

 

I am trying to use the load_balancer module for load balancing requests
between 2 OpenSIPS instances but my load_balance() function is failing for
reasons I couldn't figure out.

 

My load balancer table looks like this.

 

++--+-+---++
-+

| id | group_id | dst_uri | resources | probe_mode |
description |

++--+-+---++
-+

|  1 |1 | sip:192.168.1.18:6606   | vm=1000   |  2 |
|

|  2 |1 | sip:192.168.1.15:3300 | vm=1000   |  2 |
|

++--+-+---++
-+

 

Loaded modules:

loadmodule "db_mysql.so"

loadmodule "sl.so"

loadmodule "tm.so"

loadmodule "rr.so"

loadmodule "maxfwd.so"

loadmodule "usrloc.so"

loadmodule "signaling.so"

loadmodule "registrar.so"

loadmodule "textops.so"

loadmodule "mi_fifo.so"

loadmodule "xlog.so"

loadmodule "nathelper.so"

loadmodule "lcr.so"

loadmodule "dialog.so"

loadmodule "siptrace.so"

#loadmodule "uac.so"

loadmodule "path.so"

loadmodule "load_balancer.so"

loadmodule "auth.so"

loadmodule "auth_db.so"

loadmodule "msilo.so"

 

 

Module specific parameters:

 

# -- load balancer --

modparam("load_balancer", "db_url",
"mysql://user:password@localhost/opensips")

modparam("load_balancer", "db_table", "load_balancer")

modparam("load_balancer", "probing_interval", 30)

 

 

 

Syslog contains the following on startup:

 

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: NOTICE:core:main:
version: opensips 1.6.0-notls (x86_64/linux)

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:core:main:
using 128 Mb shared memory

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:core:main:
using 16 Mb private memory per process

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:sl:mod_init:
Initializing StateLess engine

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:tm:mod_init:
TM - initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:maxfwd:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:usrloc:ul_init_locks: locks array size 512

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
NOTICE:signaling:mod_init: initializing module ...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:registrar:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:textops:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:xlog:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:dialog:mod_init: Dialog module - initializing

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:siptrace:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:path:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:load_balancer:mod_init: Load-Balancer module - initializing

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:auth:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:auth_db:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 512 kb

 

 

load_balance() is called from main route the following way-

 

if (load_balance("1","vm"))

{

xlog("L_NOTICE", "Loadbalancer: route:method ($rm)
r-uri ($ru) : Contact : $ct  :callID $ci: destination: $du\n");

t_on_failure("3");

t_on_reply("1");

t_relay();

}

else

{

xlog("L_NOTICE", "Loadbalancer: route:method ($rm)
r-uri ($ru) : Contact : $ct  :callID $ci: FAILED $retcode\n");

t_reply("500", "Service unavailable");

}

 

 

The function always fails and I couldn't figure out why.

What am I doing wrong?

 

Thanks,

Anshuman

 






___