Re: [OpenSIPS-Users] compile with openssl version

2017-07-12 Thread Tito Cumpen
Liviu,

Here is the output:

linux-vdso.so.1 =>  (0x7ffee9d89000)

libdl.so.2 => /lib64/libdl.so.2 (0x7f096f341000)

libresolv.so.2 => /lib64/libresolv.so.2 (0x7f096f121000)

libc.so.6 => /lib64/libc.so.6 (0x7f096ed59000)

/lib64/ld-linux-x86-64.so.2 (0x7f096f791000)



On Wed, Jul 12, 2017 at 5:51 AM, Liviu Chircu  wrote:

> Can you post the output of the following:
>
> LD_LIBRARY_PATH=/usr/local/ssl/lib/ ldd modules/tls_mgm/tls_mgm.so
> Remember, we want to get it to find the new shared libraries, not some
> statically compiled libraries (aka ".a" files).
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 12.07.2017 00:38, Tito Cumpen wrote:
>
> Liviu,
>
>
> it is check out the following
>
> ls -al /usr/local/ssl/lib/
>
> total 5780
>
> drwxr-xr-x 4 root root4096 Jul 11 18:22 .
>
> drwxr-xr-x 9 root root4096 Jul 11 18:22 ..
>
> drwxr-xr-x 2 root root4096 Apr 24 21:35 engines
>
> -rw-r--r-- 1 root root 5122378 Jul 11 18:22 libcrypto.a
>
> -rw-r--r-- 1 root root  776104 Jul 11 18:22 libssl.a
>
> drwxr-xr-x 2 root root4096 Apr 24 21:35 pkgconfig
>
>
>
> is there an extra module I need to enable when compiling openssl?
>
>
>
>
>
> On Tue, Jul 11, 2017 at 5:34 PM, Liviu Chircu  wrote:
>
>> That's a libcrypto symbol - make sure that one is also compiled and
>> installed under /usr/local/ssl/lib
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> 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] Mid-Registrar Absorb 2nd Register(w/ AuthHeader) Request - Only on Reg Renewal.

2017-07-12 Thread Liviu Chircu
Thanks for the nice report, Ali - I'm already testing a fix for this, 
and will keep you posted!


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

On 12.07.2017 16:26, Ali Raza wrote:

Hello Guys,

I am new to OpenSIPS. I am currently test mid-registrar module with 
FreeSwitch and I am facing a issue not sure if its a bug or its me.


Let me explain whats happening:

I am running OpenSIPS  mid-registrar in contact-throttling 
mode(mode:1) with usrloc mode:0 - because mid-registrar was crashing 
again and again then I saw the 
post https://github.com/OpenSIPS/opensips/issues/1094 - so that issue 
is now gone with  usrloc mode:0.


When I run opensips my devices(soft phone: zopier and sip phone: 
fanvil) register perfectly but as soon the registration time for 
fanvilphone is reaching expiry(outging expiry) opensips passes my 
registrartion request to freeswitch - Freeswitch sends back 
401unauthorised message which is delivered to the phone by opensips. 
This time phone sends register request with AuthHeader but this 
request gets absorbed by mid-registrar and reply from UAC with 
AuthHeader never reach UAS and freeswitch then remove the 
registrartion from its database assuming the UAC is dead. But when the 
softphone-Zopier outgoing register expiring somehow Softphone sends 
the register request with AuthHeader and as OpenSIPs forwards 1 
register request to freeswtich - Freeswitch renew its registrartion. 
So softphone remain registered and works fine.


2nd/Renew Registration from FanvilPhone:

1. UAC==Reg==>OpenSIPS==>FreeSwitch

2. FreeSwitch==401==>OpenSIPs==401==>UAC

3. UAC==Reg w/Auth-Header==>OpenSIPs(Absorbe by mid-registrar: 
Returncode: 2)


4. OpenSIPs==Reply 200==>UAC (so actually phone thinks its registered)

2nd/Renew Registration from SoftPhone Zopier:

1. SoftPhone==Reg w/Auth-Header==>OpenSIPs==Reg w/Auth-Header==>FreeSwitch

2. FreeSwitch==Reply 200==>OpenSIPs==Reply 200==>SoftPhone-Zopier.


MY OPENSIPS CONFIG -- USED FOR MID-REGISTRAR:

 USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode", 0)
modparam("usrloc", "use_domain", 1)

 MID-REGISTRAR module
loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 180) ##Set to low for 
testing purpose.

modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */

if ( !(is_method("REGISTER")) ) {
if (check_source_address("10")) {
  xlog("looking up $ru!\n");
  if (!mid_registrar_lookup("location")) {
   t_reply("404", "Not Found");
   exit;
  }

  t_relay();
  exit;
   }
}

if (is_method("REGISTER"))
{
 #mid_registrar_save("location");
 xlog("BEFORE IT PASS TO MID-REG SAVE!");
 mid_registrar_save("","m");
 switch ($retcode) {
 case 1:
  xlog("forwarding REGISTER to main registrar ($$ci=$ci) - 
$fd\n");

  #Call script to set $ru - Testing!
  #perl_exec("dest_host","$fd");
  $ru = "sip:dispatcher\@10.10.7.206:5070";
  xlog("NEW HOST VALUE: $ru");
  t_relay();
  break;
case 2:
 xlog("absorbing REGISTER! ($$ci=$ci)\n");
 break;
default:
 xlog("failed to save registration! ($$ci=$ci)\n");
}
exit;
}


LET ME KNOW IF YOU NEED ANYTHING ELSE.

THANKS!

Regards
Ali Raza



___
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] Mid-Registrar Absorb 2nd Register(w/ AuthHeader) Request - Only on Reg Renewal.

2017-07-12 Thread Ali Raza
Hello Guys, 

I am new to OpenSIPS. I am currently test mid-registrar module with FreeSwitch 
and I am facing a issue not sure if its a bug or its me. 

Let me explain whats happening: 

I am running OpenSIPS mid-registrar in contact-throttling mode(mode:1) with 
usrloc mode:0 - because mid-registrar was crashing again and again then I saw 
the post https://github.com/OpenSIPS/opensips/issues/1094 - so that issue is 
now gone with usrloc mode:0. 

When I run opensips my devices(soft phone: zopier and sip phone: fanvil) 
register perfectly but as soon the registration time for fanvilphone is 
reaching expiry(outging expiry) opensips passes my registrartion request to 
freeswitch - Freeswitch sends back 401unauthorised message which is delivered 
to the phone by opensips. This time phone sends register request with 
AuthHeader but this request gets absorbed by mid-registrar and reply from UAC 
with AuthHeader never reach UAS and freeswitch then remove the registrartion 
from its database assuming the UAC is dead. But when the softphone-Zopier 
outgoing register expiring somehow Softphone sends the register request with 
AuthHeader and as OpenSIPs forwards 1 register request to freeswtich - 
Freeswitch renew its registrartion. So softphone remain registered and works 
fine. 

2nd/Renew Registration from FanvilPhone: 

1. UAC==Reg==>OpenSIPS==>FreeSwitch 

2. FreeSwitch==401==>OpenSIPs==401==>UAC 

3. UAC==Reg w/Auth-Header==>OpenSIPs(Absorbe by mid-registrar: Returncode: 2) 

4. OpenSIPs==Reply 200==>UAC (so actually phone thinks its registered) 

2nd/Renew Registration from SoftPhone Zopier: 

1. SoftPhone==Reg w/Auth-Header==>OpenSIPs== Reg w/Auth-Header==>FreeSwitch 

2. FreeSwitch==Reply 200==>OpenSIPs==Reply 200==>SoftPhone-Zopier. 


MY OPENSIPS CONFIG -- USED FOR MID-REGISTRAR: 

 USeR LOCation module 
loadmodule "usrloc.so" 
modparam("usrloc", "nat_bflag", "NAT") 
modparam("usrloc", "db_mode", 0) 
modparam("usrloc", "use_domain", 1) 

 MID-REGISTRAR module 
loadmodule "mid_registrar.so" 
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */ 
modparam("mid_registrar", "outgoing_expires", 180) ##Set to low for testing 
purpose. 
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */ 

if ( !(is_method("REGISTER")) ) { 
if (check_source_address("10")) { 
xlog("looking up $ru!\n"); 
if (!mid_registrar_lookup("location")) { 
t_reply("404", "Not Found"); 
exit; 
} 

t_relay(); 
exit; 
} 
} 

if (is_method("REGISTER")) 
{ 
#mid_registrar_save("location"); 
xlog("BEFORE IT PASS TO MID-REG SAVE!"); 
mid_registrar_save("","m"); 
switch ($retcode) { 
case 1: 
xlog("forwarding REGISTER to main registrar ($$ci=$ci) - $fd\n"); 
#Call script to set $ru - Testing! 
#perl_exec("dest_host","$fd"); 
$ru = "sip:dispatcher\@10.10.7.206:5070"; 
xlog("NEW HOST VALUE: $ru"); 
t_relay(); 
break; 
case 2: 
xlog("absorbing REGISTER! ($$ci=$ci)\n"); 
break; 
default: 
xlog("failed to save registration! ($$ci=$ci)\n"); 
} 
exit; 
} 


LET ME KNOW IF YOU NEED ANYTHING ELSE. 

THANKS! 

Regards 
Ali Raza 

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


Re: [OpenSIPS-Users] Set userpart parameter using $rU

2017-07-12 Thread xaled
Hi Ben,

 

thanks for pointing this out. 

I’ll try the fix on my 2.3 opensips.

 

Greetings,

Xaled

 

From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Ben Newlin
Sent: Mittwoch, 12. Juli 2017 14:54
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Set userpart parameter using $rU

 

Xaled,

 

I ran into this issue very recently myself. Please reference this thread from 
the mailing list: 
http://lists.opensips.org/pipermail/users/2017-July/037666.html

 

Thanks,

Ben

 

 

From: Users mailto:users-boun...@lists.opensips.org> > on behalf of xaled mailto:xa...@web.de> >
Reply-To: OpenSIPS users mailling list mailto:users@lists.opensips.org> >
Date: Wednesday, July 12, 2017 at 8:45 AM
To: 'OpenSIPS users mailling list' mailto:users@lists.opensips.org> >
Subject: [OpenSIPS-Users] Set userpart parameter using $rU

 

Hello,

 

I cannot set the userpart parameter in the RURI using $rU. The needed parameter 
always becomes the URI and not userpart parameter.

 

rewriteuser("+1234556;rn=+1234567");

or

$rU = "+1234556;rn=+1234567";

 

Produces the same result with the userpart parameter becoming URI parameter:

 

"INVITE sip:+1234...@test.com:5080;rn=+1234567 SIP/2.0\r

 

Only modifying the whole URI using $ru works as needed:

 

$ru="sip:" + "+1234567;rn=+1234567" + "@" + "test.com";

 

"INVITE sip:+1234567;rn=+1234...@test.com SIP/2.0\r

 

Is there a reason for this behavior?

 

Thanks,

xaled

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


Re: [OpenSIPS-Users] Set userpart parameter using $rU

2017-07-12 Thread Ben Newlin
Xaled,

I ran into this issue very recently myself. Please reference this thread from 
the mailing list: 
http://lists.opensips.org/pipermail/users/2017-July/037666.html

Thanks,
Ben


From: Users  on behalf of xaled 
Reply-To: OpenSIPS users mailling list 
Date: Wednesday, July 12, 2017 at 8:45 AM
To: 'OpenSIPS users mailling list' 
Subject: [OpenSIPS-Users] Set userpart parameter using $rU

Hello,

I cannot set the userpart parameter in the RURI using $rU. The needed parameter 
always becomes the URI and not userpart parameter.

rewriteuser("+1234556;rn=+1234567");
or
$rU = "+1234556;rn=+1234567";

Produces the same result with the userpart parameter becoming URI parameter:

"INVITE sip:+1234...@test.com:5080;rn=+1234567 SIP/2.0\r

Only modifying the whole URI using $ru works as needed:

$ru="sip:" + "+1234567;rn=+1234567" + "@" + "test.com";

"INVITE sip:+1234567;rn=+1234...@test.com SIP/2.0\r

Is there a reason for this behavior?

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


[OpenSIPS-Users] Set userpart parameter using $rU

2017-07-12 Thread xaled
Hello,

 

I cannot set the userpart parameter in the RURI using $rU. The needed parameter 
always becomes the URI and not userpart parameter.

 

rewriteuser("+1234556;rn=+1234567");

or

$rU = "+1234556;rn=+1234567";

 

Produces the same result with the userpart parameter becoming URI parameter:

 

"INVITE sip:+1234...@test.com:5080;rn=+1234567 SIP/2.0\r

 

Only modifying the whole URI using $ru works as needed:

 

$ru="sip:" + "+1234567;rn=+1234567" + "@" + "test.com";

 

"INVITE sip:+1234567;rn=+1234...@test.com SIP/2.0\r

 

Is there a reason for this behavior?

 

Thanks,

xaled

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


[OpenSIPS-Users] Multiple sites - Registering and NAT'ing issue -- Best options for implementing

2017-07-12 Thread Josh S. via Users

Hi all,


We've got two twin sites sitting behind nat in different private 
networks, by twins I mean they both have the exact same config.
UACs can register only once at any site, also they can move between 
sites and place calls. (just locally though)

Each opensips instance registers the local UACs.  Opensips version is 2.3
RTTProxy is integrated, and running just fine.

UACs are being registered into the twin remote instance using 
t_replicate("sip:IP:PORT")   (although I'm not sure whether this is the 
best method to achieve this)


So, the   opensipsctl ul show  command shows:
   AOR:: 100
Contact:: sip:100@192.168.1.2:12345;ob
   AOR:: 101
Contact:: sip:101@11.22.33.44:5060;ob

and in the other site, same command shows:

   AOR:: 100
Contact:: sip:100@22.33.44.55:5060;ob
   AOR:: 101
Contact:: sip:101@192.168.1.3:54321;ob

being 11.22.33.44 and 22.33.44.55 the public IP address of each opensips 
registar.


Each opensips instance is working ok with the stock config, and the UACs 
on its private internal network can make calls between each other.

But of course not to the UACS on the remote site. And that is the issue.

So I started to play around with nat_tranversal, nathelper, 
topology_hiding, and reading all the many info in the docs/modules and 
what not, and in this list of course.

I also tried the b2bua module, to no avail.

I reached to an end route where progress is not made-  I began to 
think this cannot be that complicated. I refuse to play 'inventing the 
wheel' again game.


I need some little help in finding the right direction to get the two 
sites routing calls between each other.

Any hint would be greatly appreciated, guys.


Just for clarifying purposes, a little drawing



Private NetSite A   
  Public IP side


UAC1|
 ---> OpenSIPS 
11.22.33.44

UAC2||
 |
 |
 | <---> RTTProxy





Private Net Site B 
Public IP side


UAC3|
 ---> 
OpenSIPS 22.33.44.55

UAC4||
 |
 |
 | <---> RTTProxy


it's required that the UACs can move around to any site, same username 
(uri), and still be reachable from any other point.


from stock config, I made the slight changes to allow for RTTProxy be 
integrated, and it's working. No NAT was involved, as yet.
The two sites share the same domain, and also the same internal IP 
network in 192.168.1.0/24 space,

although that can change if needed.
Each site works fine individually.

What changes need to be done in the config for the calls be routed 
between the two sites?

Any example around?

Thanks a lot.

Josh Smit




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


Re: [OpenSIPS-Users] compile with openssl version

2017-07-12 Thread Liviu Chircu

Can you post the output of the following:

LD_LIBRARY_PATH=/usr/local/ssl/lib/ ldd modules/tls_mgm/tls_mgm.so

Remember, we want to get it to find the new shared libraries, not some 
statically compiled libraries (aka ".a" files).


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

On 12.07.2017 00:38, Tito Cumpen wrote:

Liviu,


it is check out the following

ls -al /usr/local/ssl/lib/

total 5780

drwxr-xr-x 4 root root4096 Jul 11 18:22 .

drwxr-xr-x 9 root root4096 Jul 11 18:22 ..

drwxr-xr-x 2 root root4096 Apr 24 21:35 engines

-rw-r--r-- 1 root root 5122378 Jul 11 18:22 libcrypto.a

-rw-r--r-- 1 root root776104 Jul 11 18:22 libssl.a

drwxr-xr-x 2 root root4096 Apr 24 21:35 pkgconfig



is there an extra module I need to enable when compiling openssl?





On Tue, Jul 11, 2017 at 5:34 PM, Liviu Chircu > wrote:


That's a libcrypto symbol - make sure that one is also compiled
and installed under /usr/local/ssl/lib

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

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