Re: [OpenSIPS-Users] Dumb ass question

2021-06-11 Thread Slava Bendersky via Users
Hello Johan, 
You can use something like this 





route[ONHOLD] { 
if(!is_audio_on_hold()) 
return; 

$var(cline-ip) = NULL; 

if(has_body("application/sdp")) { 
if(search_body("a=sendonly") || search_body("a=inactive")) { 
$var(cline-ip) = $(rb{sdp.line,c}{s.select,2, }); 
xlog("[$rm] On hold call SDP IP [$var(cline-ip)]\n"); 
if($(var(cline-ip){s.select,1,.}{s.int})==0 && $socket_in(proto)=="WSS") { 
xlog("[$rm] On hold call going from WAN SouceIP <$si> to LAN with transport 
$socket_in(proto)\n"); 
$var(rtpengine_f_topbx) = "replace-session-connection replace-origin 
UDP/TLS/RTP/SAVPF"; 
$var(codec_flag_topbx) = "codec-strip-PCMU codec-strip-G722 codec-strip-PCMA"; 
$var(codec_trans) = "transcode-OPUS codec-mask-G722"; 
$avp(on_hold) = "true"; 
rtpengine_offer("$var(rtpengine_f_topbx) $var(codec_flag_topbx) 
$var(codec_trans) ICE=remove in-iface=external out-iface=internal"); 
t_on_reply("handle_wss_reply"); 
} else { 
xlog("[$rm] On hold call going from WAN SouceIP <$si> to LAN with transport 
$socket_in(proto)\n"); 
rtpengine_offer("RTP/AVP replace-session-connection replace-origin ICE=remove 
in-iface=external out-iface=internal"); 
t_on_reply("3"); 
} 
} 
} 
route(RELAY); 
exit; 
} 


volga629 







From: "johan"  
To: "OpenSIPS users mailling list"  
Sent: Friday, June 11, 2021 6:05:39 AM 
Subject: [OpenSIPS-Users] Dumb ass question 

Hello, 


is there somebody that can help me with rewriting the sdp when you 
receive 0.0.0.0 ? 

I kind of like tried a bunch of variations on this 
fix_nated_sdp(0x12,"1.2.3.4");, but obviously I do something wrong. 

wkr, Johan. 


___ 
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] 3.1 - Mid_Registrar - AOR throttling with WebRTC failing

2020-08-21 Thread Slava Bendersky via Users
Please check contact header. 

volga629 


From: "Mark Allen"  
To: "OpenSIPS users mailling list"  
Sent: Friday, August 21, 2020 8:08:18 AM 
Subject: Re: [OpenSIPS-Users] 3.1 - Mid_Registrar - AOR throttling with WebRTC 
failing 

I've not received any feedback on this regarding whether or not what I'm doing 
should be working. Trying to find a workaround has just led to a number of 
dead-ends. Can anyone please help me with this? 
We are using mid-registrar with AOR Throttling talking to Asterisk/FreePBX. We 
have OpenSIPS 3.1 running on Debian Buster. For SIP phones, physical and 
softphones, connected on our LAN, all works fine. Where we hit problems is with 
WebRTC phones. 

WebRTC phone registers via mid-registrar without a problem. However, a call 
coming from Asterisk (e.g. extension --> extension) fails with an error like: 

476 Unresolvable destination 

...and a syslog entry... 

ERROR:core:sip_resolvehost: forced proto 6 not matching sips uri 
CRITICAL:core:mk_proxy: could not resolve hostname: "cfdtugr3cntl.invalid" 
ERROR:tm:uri2proxy: bad host name in URI 
 
ERROR:tm:t_forward_nonack: failure to add branches 

We can get calls to WebRTC from Asterisk working via OpenSIPS if we are only 
using registration throttling. As this establishes a 1:1 relationship, by using 
add_path_received() we get Asterisk to include a Route which bypasses the 
resolvehost problem. However, with multiple endpoints registered to a single 
OpenSIPS AOR with AOR throttling, this workaround obviously won't work. How can 
I set up OpenSIPS so that we can have multiple endpoints, including WebRTC 
ones, registered to a single OpenSIPS AOR and have calls successfully reach the 
WebRTC phones? 








On Mon, 3 Aug 2020 at 08:44, Mark Allen < [ mailto:m...@allenclan.co.uk | 
m...@allenclan.co.uk ] > wrote: 



I don't know if anyone has had a chance to look at my problem but I wonder if 
at least I could get an opinion on the following: 
1 - Should I be seeing the path saved in the appropriate column in the 
"location" table? 
2 - Am I using mid_registrar_save() and mid_registrar_lookup() with path 
support correctly in my script? 
3 - have I correctly understood how to combine WebRTC with mid-registrar 
module, path, and AOR throttling so that it should work for calls originating 
from the main registrar? 

I'm stuck on how to move forward with this 

Cheers, 

Mark 

Relevant code snippets... 

loadmodule "mid_registrar.so" 
modparam("mid_registrar", "mode", 2) /* 0 = mirror / 1 = ct / 2 = AoR */ 
modparam("mid_registrar", "outgoing_expires", 3600) 

add_path_received(); 
$avp(returncode) = mid_registrar_save("location","p0v"); 
switch ($avp(returncode)) { 
case 1: 
route(resolve_registrar); 
$ru = "sip:" + $avp(main_registrar) + ":5060"; 
t_on_failure("1"); 
t_relay(); 
break; 
case 2: 
break; 
default: 
} 

if (!mid_registrar_lookup("location")) { 
t_reply(404, "Not Found"); 
exit; 
} 


NB - route(resolve_registrar) sets the variable $avp(main_registrar) to the IP 
address of the Asterisk server 

On Thu, 30 Jul 2020 at 09:16, Mark Allen < [ mailto:m...@allenclan.co.uk | 
m...@allenclan.co.uk ] > wrote: 

BQ_BEGIN

We are working on a test setup, hoping to move to a production system in 
mid-August. We want to use mid-registrar AOR throttling. Users will connect 
through OpenSIPS using a combination of SIP and WebRTC endpoints, registering 
to an extension on an Asterisk main-registrar... 

+--+ 
 ---> | | +--+ 
 ---> | OpenSIPS | ---> | Asterisk | 
 ---> | | +--+ 
+--+ 

Multiple SIP phones (hardware or softphones) registering via an OpenSIPS 3.1 
mid_registration AOR is working fine. A call to the extension number on 
Asterisk results in all mid-registered SIP extensions ringing and when one 
answers, the other devices register a missed call. So far, so good. 

With 3.0 - we had a problem with WebRTC "phones" (even when just using 
mid_registrar in "mirroring" mode). Webphone could register and call other 
phones without a problem. However, calls to the WebPhone failed - there was a 
problem with the WebSocket addressing giving "476 Unresolvable destination" 
when the call originates from the main registrar - e.g. one extension calling 
another. The /var/log/syslog entry said... 

ERROR:core:sip_resolvehost: forced proto 6 not matching sips uri 
CRITICAL:core:mk_proxy: could not resolve hostname: "4xp44jxl0qq0.invalid" 
ERROR:tm:uri2proxy: bad host name in URI  
ERROR:tm:t_forward_nonack: failure to add branches 

Stas Kobar gave me a way to resolve this - [ 
http://lists.opensips.org/pipermail/users/2020-July/043443.html | 
http://lists.opensips.org/pipermail/users/2020-July/043443.html ] As we were 
using 3.0, I used the "path" module and "add_path_received()" to handle this 
for WebRTC. This worked for a single device registered to an address. However, 
as far as I could see, using "path" effectively bypassed the "contact" address 
held in the OpenSIPS "location" table so it 

Re: [OpenSIPS-Users] [Crash Report] Weird crash with drouting/tls_mgm/usrloc/db_postgresql

2020-08-11 Thread Slava Bendersky via Users
That commit is helped a lot to identify the problem if opensips can't connect 
to database, but it not improve stability. 
Stability is mix protocols and underlining library, opensips just use api to 
connect, so all mention tweaks are still need it. 

volga629 


From: "Adrien Martin"  
To: "volga629" , "OpenSIPS users mailling list" 
 
Sent: Tuesday, August 11, 2020 1:02:24 PM 
Subject: Re: [OpenSIPS-Users] [Crash Report] Weird crash with 
drouting/tls_mgm/usrloc/db_postgresql 

Hello, 

I tried to reduce the number of workers to 1 with Opensips 3.1 (can not change 
TCP workers with 2.4+) and there is another crash about tls_domain that i have 
to investigate :) 
Our problems are somewhat different though, in this one there is no load/no 
calls, just some registrations (less than 5 UAC) and some drouting probing UDP 
and TLS. 

As #1579 was closed, did the commit 
https://github.com/OpenSIPS/opensips/commit/c1403a1d9bee2254a84a866352266a41d9ff93bc
 fixed your problem or did you just tweak the 
workers/sysctl.conf/postgresql.conf? 

Thanks, regards, 
-- 
Adrien Martin 

Le 11/08/2020 à 14:34, Slava Bendersky a écrit : 
> Hello Everyone, 
> You need tweak sysctl and postgresql.conf to allow opensips connect properly 
> to remote postgresql. 
> In opensips I can't pass for any transport udp_worker tcp_worker more then 
> 10. Other wise it starts segfaulting. One opensips open from 150-170 
> connections to database under load when cluster of 3 nodes you need 
> postgresql at least 650 connection limit. If you use TCP or WSS or TLS you 
> need increase tcp protocol buffer on protocol level other wise it will be 
> bottleneck for database and it will slow down all. 
> 
> volga629 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Crash Report] Weird crash with drouting/tls_mgm/usrloc/db_postgresql

2020-08-11 Thread Slava Bendersky via Users
Hello Everyone, 
You need tweak sysctl and postgresql.conf to allow opensips connect properly to 
remote postgresql. 
In opensips I can't pass for any transport udp_worker tcp_worker more then 10. 
Other wise it starts segfaulting. One opensips open from 150-170 connections to 
database under load when cluster of 3 nodes you need postgresql at least 650 
connection limit. If you use TCP or WSS or TLS you need increase tcp protocol 
buffer on protocol level other wise it will be bottleneck for database and it 
will slow down all. 

volga629 


From: "Adrien Martin"  
To: "OpenSIPS users mailling list" , "johan" 
 
Sent: Tuesday, August 11, 2020 7:25:31 AM 
Subject: Re: [OpenSIPS-Users] [Crash Report] Weird crash with 
drouting/tls_mgm/usrloc/db_postgresql 

Hello, 

Thanks for your answer. 
Do you mean the patch didn't resolve the issue for volga629? 

Anyway it's an interesting idea, this would point to a concurrency problem. 
Gonna try but i think it would not work because there would still be udp and 
tcp/tls workers at the same time. 


Regards, 
-- 
Adrien Martin 


Le 11/08/2020 à 12:00, Johan De Clercq a écrit : 
> I believe that 1579 was fixed by volga629 by reducing the number of workers 
> in opensips.cfg. 


___ 
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 and topology_hiding

2020-08-05 Thread Slava Bendersky via Users
Hello Liviu, 
I am working on setup mid_registrar and topology_hiding and having issue with 
retransmissions and RE-INVITE are failing to route even dialog in place and 
have to use something like $ru = $tu; then location search, but even this is 
not working 100%. I tried use C and U flags. 
I can share my config with cluster support, but really need you help with this. 
I have open ticket while back for RE-INVITE issue #2067. 



Slava. 


From: "volga629"  
To: "OpenSIPS users mailling list"  
Sent: Wednesday, August 5, 2020 9:23:49 AM 
Subject: Re: [OpenSIPS-Users] mid_registrar and topology_hiding 




From: "Yohann Poilvert"  
To: "OpenSIPS users mailling list"  
Sent: Wednesday, August 5, 2020 5:28:08 AM 
Subject: Re: [OpenSIPS-Users] mid_registrar and topology_hiding 

Hello Liviu ! 

Great news ! 

Have you a full config example ? 
I think it missed "ctid" in the INVITE contact on my side... 



[ https://twitter.com/SegLoad ] 
[ https://www.linkedin.com/in/yohann-poilvert-a7ba84117/ ]  

Yohann Poilvert 

0686739335 
[ mailto:y.poilv...@geekinfo.fr | y.poilv...@geekinfo.fr ] 
[ https://www.geekinfo.fr/ | https://www.geekinfo.fr/ ] 


De: "Liviu Chircu"  
À: "users"  
Envoyé: Mercredi 5 Août 2020 10:20:13 
Objet: Re: [OpenSIPS-Users] mid_registrar and topology_hiding 

On 05.08.2020 11:11, Yohann Poilvert wrote: 



Is mid_registrar and topology_hiding are now compatible between them ? 
Inbound calls are ok but not outbound... (Need auth) 




Hey, Yohann! 

Yes, since mid-registrar mangles the REGISTER contacts, while topology_hiding 
mangles the INVITE/200 OK contacts. They should play together well. 

Regards, 
-- 
Liviu Chircu [ http://www.twitter.com/liviuchircu | www.twitter.com/liviuchircu 
] | [ http://www.opensips-solutions.com/ | www.opensips-solutions.com ] 
OpenSIPS Summit 2020 Distributed [ 
http://www.opensips.org/events/Summit-2020Distributed | 
www.opensips.org/events/Summit-2020Distributed ] 

___ 
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] mid_registrar and topology_hiding

2020-08-05 Thread Slava Bendersky via Users



From: "Yohann Poilvert"  
To: "OpenSIPS users mailling list"  
Sent: Wednesday, August 5, 2020 5:28:08 AM 
Subject: Re: [OpenSIPS-Users] mid_registrar and topology_hiding 

Hello Liviu ! 

Great news ! 

Have you a full config example ? 
I think it missed "ctid" in the INVITE contact on my side... 



[ https://twitter.com/SegLoad ] 
[ https://www.linkedin.com/in/yohann-poilvert-a7ba84117/ ]  

Yohann Poilvert 

0686739335 
[ mailto:y.poilv...@geekinfo.fr | y.poilv...@geekinfo.fr ] 
[ https://www.geekinfo.fr/ | https://www.geekinfo.fr/ ] 


De: "Liviu Chircu"  
À: "users"  
Envoyé: Mercredi 5 Août 2020 10:20:13 
Objet: Re: [OpenSIPS-Users] mid_registrar and topology_hiding 

On 05.08.2020 11:11, Yohann Poilvert wrote: 



Is mid_registrar and topology_hiding are now compatible between them ? 
Inbound calls are ok but not outbound... (Need auth) 




Hey, Yohann! 

Yes, since mid-registrar mangles the REGISTER contacts, while topology_hiding 
mangles the INVITE/200 OK contacts. They should play together well. 

Regards, 
-- 
Liviu Chircu [ http://www.twitter.com/liviuchircu | www.twitter.com/liviuchircu 
] | [ http://www.opensips-solutions.com/ | www.opensips-solutions.com ] 
OpenSIPS Summit 2020 Distributed [ 
http://www.opensips.org/events/Summit-2020Distributed | 
www.opensips.org/events/Summit-2020Distributed ] 

___ 
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] opensips + rtpengine

2020-08-03 Thread Slava Bendersky via Users
Hello Karsten, 
The solution was for high loads to call delete under relay in my case . 
In 3.1 you need change $proto. 

route[RELAY] { 
if(is_method("INVITE") && $proto=="wss") { 
t_on_branch("manage_wss"); 
} else if( is_method("INVITE") && $proto=="tcp|udp") { 
route(manage_rtp); 
} else if(is_method("BYE|CANCEL")) { 
rtpengine_delete(); 
} 

t_relay(); 
exit; 
} 


volga629 


From: "Karsten Horsmann"  
To: "volga629" , "OpenSIPS users mailling list" 
 
Cc: "Alain Bieuzent"  
Sent: Sunday, August 2, 2020 3:35:47 AM 
Subject: Re: [OpenSIPS-Users] opensips + rtpengine 

Hi Volga, 

did you solve that issue? Would be nice to have an solution for that. 

Kind regards 
Karsten Horsmann 

volga629 via Users < [ mailto:users@lists.opensips.org | 
users@lists.opensips.org ] > schrieb am Mi., 18. März 2020, 16:06: 





I will do that test. 
On 3/18/20 6:37 AM, Alain Bieuzent wrote: 

BQ_BEGIN



Hi Volga, 



Your configuration look good, 



Have you check the number of port really use by rtpengine when you ran out of 
ports ? (netstat -paun | grep rtpengine | wc -l) 



Regards 




De : volga629 [ mailto:volga...@networklab.ca |  ] 
Date : lundi 16 mars 2020 à 20:38 
À : Alain Bieuzent [ mailto:alain.bieuz...@free.fr |  ] 
, OpenSIPS users mailling list [ mailto:users@lists.opensips.org | 
 ] 
Objet : Re: [OpenSIPS-Users] opensips + rtpengine 



Hello Alain, 
port-min = 5000 
port-max = 5 
delete-delay = 5 
timeout = 10 
silent-timeout = 900 
onreply_route[handle_media_reply] { 
xlog("incoming reply\n"); 
if(is_method("INVITE|UPDATE") && t_check_status("200|183")) { 
if(has_body("application/sdp")) { 
rtpengine_answer("trust-address RTP/AVP replace-session-connection 
replace-origin ICE=remove"); 
} 
} 
t_on_failure("media_delete_route"); 
} 
failure_route[media_delete_route] { 
if(t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) { 
xlog("Call with Reply [$rs] make it close"); 
rtpengine_delete(); 
} 
} 
but rtpengine produce error 
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11348]: 
ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran out of ports 
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]: 
ERROR:rtpengine:rtpe_function_call: proxy replied with error: Unknown call-id 
volga629 


On 3/15/20 9:04 AM, Alain Bieuzent wrote: 

BQ_BEGIN


Hi, 



Can you share value of delete-delay, port-min and port-max of your rtpengine 
configuration. 



Have you also check if you handle rtpengine_delete on failed calls (in case sip 
cause code 4XX, 5XX and 6XX). 



At @job, we handle max 6000 calls on a 6 cores servers without any issue. 



Regards 








De : Users [ mailto:users-boun...@lists.opensips.org | 
 ] au nom de volga629 via Users [ 
mailto:users@lists.opensips.org |  ] 
Répondre à : volga629 [ mailto:volga...@networklab.ca | 
 ] , OpenSIPS users mailling list [ 
mailto:users@lists.opensips.org |  ] 
Date : vendredi 13 mars 2020 à 18:39 
À : [ mailto:users@lists.opensips.org |  ] 
Objet : [OpenSIPS-Users] opensips + rtpengine 





Hello Everyone, 

Might be somebody can point me to right place. 

Under load Rtpengine on server with 12 core can't pass 400 channels/sessions. 

Mar 13 18:14:53 CentOS-77-64-minimal rtpengine[14588]: WARNING: 
[1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in packet from [ 
http://136.243.43.23:47763/ | 136.243.43.23:47763 ] : Ran out of ports 
[d3:sdp289: 

WARNING: [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in packet from 
[ http://136.243.43.23:55847/ | 136.243.43.23:55847 ] : Unknown call-id 
[d3:sdp250: 

It like it not closing calls properly, but I am running rtpengine_delete() in 
loose _route on BYE or CANCEL. 



Here are more details 


[ https://github.com/sipwise/rtpengine/issues/946 | 
https://github.com/sipwise/rtpengine/issues/946 ] 



# Handle requests within SIP dialogs 
route[handle_sequential] { 
if (has_totag()) { 
if (loose_route()) { 
# BYE rtpengine_delete() 
if (is_method("BYE|CANCEL")) { 
xlog("LOOSE_ROUTE:DBG: [$rm] trying delete rtpengine\n"); 
rtpengine_delete(); 
xlog("Average MOS of the entire call is $rtpstat(MOS-average)\r\n"); 
xlog("Average MOS of caller is $(rtpstat(MOS-average)[$ft])\r\n"); 
xlog("Average MOS of callee is $(rtpstat(MOS-average)[$tt])\r\n"); 
xlog("Min MOS of caller is $(rtpstat(MOS-min)[$ft]) reported at 
$(rtpstat(MOS-min-at)[$ft])\r\n"); 
} 
t_relay(); 
exit; 

volga629 

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



BQ_END

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

BQ_END


___
Users mailing list

Re: [OpenSIPS-Users] negative ACK

2020-07-17 Thread Slava Bendersky via Users

Hello Johan, 
That google cloud but I am suspect some sort of NAT problem. I can register and 
place call, but loose route causing some routing issue. 

volga629 

From: "johan"  
To: "volga629"  
Sent: Friday, July 17, 2020 4:21:47 AM 
Subject: Fwd: [OpenSIPS-Users] negative ACK 




Is there a reason why you don't use a normal listener ? 
And please run netstat -tulpn as I believe that port 8443 is closed. 

wkr, 
 Forwarded Message  Subject:[OpenSIPS-Users] negative ACK 
Date:   Thu, 16 Jul 2020 22:40:05 -0400 (EDT) 
From:   Slava Bendersky via Users [ mailto:users@lists.opensips.org | 
 ] 
Reply-To:   Slava Bendersky [ mailto:volga...@networklab.ca | 
 ] , OpenSIPS users mailling list [ 
mailto:users@lists.opensips.org |  ] 
To: OpenSIPS users mailling list [ mailto:users@lists.opensips.org | 
 ] 

Hello Everyone, 
What possible reason that port portion is ignored here in loose route with ACK 
method. 
That latest 3.1-dev 

Also I wonder if possible maintain aliases domains in database. 

I set an alias 

Aliases: 
wss: gk5ix.doctor.lan:8443 

Jul 16 22:37:07 [263361] NOTICE:core:main: config file ok, exiting... 

Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:parse_to_param: tag=cqbimfskge 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:core:_parse_to: 
end of header reached, state=29 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:core:_parse_to: 
display={}, ruri={ sip:64...@gk5ix.doctor.lan:8443} 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field:  [50]; uri=[sip:64...@gk5ix.doctor.lan:8443] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: to body [] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: cseq : <6492>  
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: content_length=0 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: found end of header 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:sipmsgops:has_totag: totag found 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:parse_headers: flags=200 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:rr:is_preloaded: 
No 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if host==us: 16==11 && [gk5ix.doctor.lan] 
== [10.142.0.15] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if port 5060 matches port 5060 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if host==us: 16==11 && [gk5ix.doctor.lan] 
== [10.142.0.15] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if port 5060 matches port 5060 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
WARNING:rr:after_strict: no socket found to match RR [1][gk5ix.doctor.lan:5060] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:rr:after_strict: 
Next hop: 
'sip:104.196.55.209:8443;transport=wss;lr;ftag=vdi4gq47qa064.90d9c317' is loose 
rout 
er 


Any help thank you. 

volga629 

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


[OpenSIPS-Users] negative ACK

2020-07-16 Thread Slava Bendersky via Users
Hello Everyone, 
What possible reason that port portion is ignored here in loose route with ACK 
method. 
That latest 3.1-dev 

Also I wonder if possible maintain aliases domains in database. 

I set an alias 

Aliases: 
wss: gk5ix.doctor.lan:8443 

Jul 16 22:37:07 [263361] NOTICE:core:main: config file ok, exiting... 

Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:parse_to_param: tag=cqbimfskge 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:core:_parse_to: 
end of header reached, state=29 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:core:_parse_to: 
display={}, ruri={sip:64...@gk5ix.doctor.lan:8443} 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field:  [50]; uri=[sip:64...@gk5ix.doctor.lan:8443] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: to body [] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: cseq : <6492>  
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: content_length=0 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:get_hdr_field: found end of header 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:sipmsgops:has_totag: totag found 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:parse_headers: flags=200 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:rr:is_preloaded: 
No 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if host==us: 16==11 && [gk5ix.doctor.lan] 
== [10.142.0.15] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if port 5060 matches port 5060 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if host==us: 16==11 && [gk5ix.doctor.lan] 
== [10.142.0.15] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
DBG:core:grep_sock_info_ext: checking if port 5060 matches port 5060 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: 
WARNING:rr:after_strict: no socket found to match RR [1][gk5ix.doctor.lan:5060] 
Jul 16 22:22:45 dev1-opensips /usr/sbin/opensips[263213]: DBG:rr:after_strict: 
Next hop: 
'sip:104.196.55.209:8443;transport=wss;lr;ftag=vdi4gq47qa064.90d9c317' is loose 
rout 
er 


Any help thank you. 

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


[OpenSIPS-Users] nat helper ping

2020-07-08 Thread Slava Bendersky via Users
Hello Everyone, 
Based on this conversation 

[ https://groups.google.com/forum/#!topic/jssip/1D3n2_MJrf8 | 
https://groups.google.com/forum/#!topic/jssip/1D3n2_MJrf8 ] 

Opensips is not set user name portion in request uri for NAT helper OPTIONS 
packet. I found RFC for proxy layer that user name portion is not required, but 
I can't find any information about UA. 

Is possible clarify what behavior should be for UA. 

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


[OpenSIPS-Users] dialog cluster

2020-06-29 Thread Slava Bendersky via Users
Hello Everyone, 
With PgSQL dialog module in cluster latest master 3.1-dev active/active setup 
tries insert duplicate data from each node. 
This setup contain 3 vips for each node on LAN and WAN sides. 

/usr/sbin/opensips[1727986]: ERROR:db_postgres:db_postgres_submit_query: 
0x7f4eb5e95e28 PQsendQuery Error: ERROR: duplicate key value violates unique 
constraint "dialog_pkey"#012DETAIL: Key (dlg_id)=(7546448396242) already 
exists.#012 Query: 

Might be some miss configuration, but can find what the issue 

 Dialog 
loadmodule "dialog.so" 
#modparam("dialog", "db_url", "postgres:///opensips") 
modparam("dialog", "db_mode", 2) 
modparam("dialog","profiles_with_value","outbound; inbound") 
modparam("dialog", "dlg_match_mode", 1) 
modparam("dialog", "default_timeout", 3600) 
modparam("dialog", "options_ping_interval", 900) 
modparam("dialog", "profiles_with_value", "caller ; domain") 
modparam("dialog", "dialog_replication_cluster", 1) 


if(!has_totag() && is_method("INVITE") && !has_body("application/csta+xml")) { 

create_dialog(); 
topology_hiding(); 

### Set profile ### 
### Set profile ### 
set_dlg_profile("caller",$fU@$fd); 
set_dlg_profile("domain",$fd); 

get_profile_size("caller",$fU@$fd,$var(ccaller)); 
get_profile_size("caller",$fd,$var(cdomain)); 
xlog("Number of calls from user $fU@$fd is $var(ccaller)"); 
xlog("Number of calls from domain $fd is $var(cdomain)"); 


xlog("Got request on ip addr [$socket_in(ip)] and call dir $avp(DLG_dir)\n"); 
# Wan route 
$var(ip_lst) = $shv(vip_wan_lst); 
route(SET_SOURCE_SOCKET); 
if($avp(DLG_dir)=="topbx") { 
switch($(avp(req_ip){s.select,3,.})) { 
case "38": 
set_dlg_sharing_tag("vip1"); 
xlog("[$rm] Set dialog tag vip1 ~> $(avp(req_ip){s.select,3,.})\n"); 
break; 
case "39": 
set_dlg_sharing_tag("vip2"); 
xlog("[$rm] Set dialog tag vip2 ~> $(avp(req_ip){s.select,3,.})\n"); 
break; 
case "40": 
set_dlg_sharing_tag("vip3"); 
xlog("[$rm] Set dialog tag vip3 ~> $(avp(req_ip){s.select,3,.})\n"); 
break; 
default: 
xlog("[$rm] Unknown last octet ~> $(avp(req_ip){s.select,3,.})\n"); 
} 
} 
} 

Any help thank you, volga629 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] cluster/cassandra cache

2020-06-09 Thread Slava Bendersky via Users
Hello Everyone, 
Opensips v3.1 dev can't connect properly to Cassandra cluster. 

1591735692.141 [ERROR] (cluster_connector.cpp:190:void 
datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)):
 Unable to establish a control connection to host 10.100.101.9 because of the 
following error: Underlying connection error: Received error response 'Invalid 
or unsupported protocol version (66); supported versions are (3/v3, 4/v4, 
5/v5-beta)' (0x020A) 
Any help, thank you. 

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


[OpenSIPS-Users] Help db_postgresql

2020-05-21 Thread Slava Bendersky via Users
Hello Everyone, 
Opensips Team I really need help with ticket [ 
https://github.com/OpenSIPS/opensips/issues/2114 | 
https://github.com/OpenSIPS/opensips/issues/2114 ] . 
I tested multiply deployments with upcoming 3.1 and impossible connect to 
remote postgresql database directly to port 5432 or pgpool port. 
It segfaulting, just basic start. 
I tried on clustered setup active/active with share cache db, standalone and 
active/passive all same behavior can't connect to posgresql. 

May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:db_postgres:db_postgres_new_connection: timeout expired 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:db_postgres:db_postgres_new_connection: cleaning up 
0x7f725a791ab0=pkg_free() 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: ERROR:core:db_do_init: 
could not add connection to the pool 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:clusterer:child_init: cannot initialize database connection 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:core:init_mod_child: failed to initializing module clusterer, rank 63 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:core:tcp_start_processes: init_children failed 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe 
May 21 06:28:01 aitossbc01 /usr/sbin/opensips[3538470]: 
ERROR:core:tcp_start_processes: failed to send -1 status code 


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


Re: [OpenSIPS-Users] OpenSIPS as Teams SBC

2020-05-11 Thread Slava Bendersky via Users
Hello All, 
Microsoft is rely on approved sbc vendors, where most sbc are use VIA and 
headers to route traffic. That why Contact header is important, also they use 
from and to. 
Opensips is rely on route headers and use different way to route it. 

volga629 


From: "John Quick"  
To: "OpenSIPS users mailling list" , 
ja...@ip-sentinel.com 
Sent: Monday, May 11, 2020 6:19:50 AM 
Subject: Re: [OpenSIPS-Users] OpenSIPS as Teams SBC 

I agree completely with Ovidiu. 
The Microsoft documentation says to use a FQDN in the Contact header, but 
this is wrong when the SBC is acting as a SIP Proxy. 
The blog post on the OpenSIPS website explains that actually the 
Record-Route header needs the FQDN. 
The one exception to this is the handling of OPTIONS pings - for these, 
OpenSIPS is the end point so it must use a FQDN in Contact. 

If you change the Contact header in call setup then you risk breaking the 
path for sequential requests, such as ACK. 
If ACK does not reach its destination, the call drops at one end after about 
20 seconds - exactly what you are seeing. 

I have not yet found a good way to capture TLS encoded SIP. In theory, you 
can use sngrep with the -k option to identify the path to the private key 
file. 
It would be necessary to start sngrep first, then start (or restart) 
OpenSIPS. However, this never works for me. 
I had more success using the siptrace module to capture the packets to a DB 
table. Presenting it as a sequence diagram may be possible using the 
OpenSIPS Control Panel. 
Wireshark also has the ability to capture, decode and present TLS encrypted 
SIP. 
Another option might be to mirror the traffic to Homer in HEP format and 
then use Homer to create the sequence diagram. 

John Quick 
Smartvox Limited 


___ 
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] MS Teams REFER transfer on hold.

2020-05-08 Thread Slava Bendersky via Users
Hello Johan, 
Thank you for reply and help. 
Based on MS Teams Allow header will disable REFER and MS Teams will send invite 
in dialog. 
The following code snippet on 200 OK reply is resolve the issue. 

$var(refer-allow) = "INVITE, ACK, CANCEL, BYE, INFO, NOTIFY, PRACK, UPDATE, 
OPTIONS"; 
remove_hf("Allow"); 
insert_hf("Allow: $var(refer-allow)\r\n"); 


volga629 

From: "johan"  
To: "OpenSIPS users mailling list"  
Sent: Friday, May 8, 2020 9:58:56 AM 
Subject: Re: [OpenSIPS-Users] MS Teams REFER transfer on hold. 



try with replying that you don't support refer. 
On 8/05/2020 11:19, Slava Bendersky via Users wrote: 





Hello Everyone, 
I am trying put tougher transfer feature with in MS Teams. 
And based on my research and testing right now is not possible with opensips. 
MS Teams are sending on hold in case of transfer and onhold as a=inactive. 
Major problem they require encode/decode params in REFER-TO REFER-BY. 

MS Teams expect observe REFER with 202 and decode params with future action. 

Here official requirements doc. 
[ 
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-protocols-sip#call-transfer
 | 
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-protocols-sip#call-transfer
 ] 

Any suggestion welcome. 

volga629. 



___
Users mailing list [ mailto:Users@lists.opensips.org | Users@lists.opensips.org 
] [ http://lists.opensips.org/cgi-bin/mailman/listinfo/users | 
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


[OpenSIPS-Users] MS Teams REFER transfer on hold.

2020-05-08 Thread Slava Bendersky via Users
Hello Everyone, 
I am trying put tougher transfer feature with in MS Teams. 
And based on my research and testing right now is not possible with opensips. 
MS Teams are sending on hold in case of transfer and onhold as a=inactive. 
Major problem they require encode/decode params in REFER-TO REFER-BY. 

MS Teams expect observe REFER with 202 and decode params with future action. 

Here official requirements doc. 
[ 
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-protocols-sip#call-transfer
 | 
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-protocols-sip#call-transfer
 ] 

Any suggestion welcome. 

volga629. 


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


[OpenSIPS-Users] MS Teams REFER transfer on hold.

2020-05-08 Thread Slava Bendersky via Users
Hello Everyone, 
I am trying put tougher transfer feature with MS Teams. 
And based right now not possible with opensips. 
MS Teams are sending on hold in case of transfer and onhold. 
Major problem they require encode/decode params in REFER-TO REFER-BY. 

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


Re: [OpenSIPS-Users] [BLOG] SIP Push Notification with OpenSIPS 3.1 LTS [RFC 8599 support][Part I]

2020-05-07 Thread Slava Bendersky via Users
WOW, Great Thank you !!! 

volga629 


From: "Liviu Chircu"  
To: "OpenSIPS users mailling list" , "OpenSIPS devel 
mailling list" , busin...@lists.opensips.org, 
n...@lists.opensips.org 
Sent: Thursday, May 7, 2020 3:44:19 PM 
Subject: [OpenSIPS-Users] [BLOG] SIP Push Notification with OpenSIPS 3.1 LTS 
[RFC 8599 support][Part I] 

Hi, folks! 

We now have standards-based SIP Push Notification support in OpenSIPS 
3.1! If you want to learn how they work, as well as how to enable them 
in OpenSIPS, you can follow along this 2-part blog series [1]. Thank 
you and enjoy! 

Stay safe, 

[1]: 
https://blog.opensips.org/2020/05/07/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-i/
 

-- 
Liviu Chircu 
www.twitter.com/liviuchircu | 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


Re: [OpenSIPS-Users] [BLOG] Shaken, not stirred - the STIR/SHAKEN support in OpenSIPS

2020-01-23 Thread Slava Bendersky via Users
Thank you Bogdan,
Will be nice to have NSS certificate management in mix.

volga629 

Sent from mobile device typos are expected.

> On Jan 23, 2020, at 08:34, Bogdan-Andrei Iancu  wrote:
> 
> 
> There is no doubt about the danger and security threats presented by the 
> robocalls or identity thieves. Also there is no doubt that STIR/SHAKEN 
> is the solution that addresses the threats.
> 
> And starting with 3.1 OpenSIPS provides a very flexible implementation 
> for STIR/SHAKEN, for any operator to us.
> 
> https://blog.opensips.org/2020/01/23/shaken-not-stirred/
> 
> Enjoy the reading,
> 
> -- 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> OpenSIPS Summit, Amsterdam, May 2020
> https://www.opensips.org/events/Summit-2020Amsterdam/
> OpenSIPS Bootcamp, Miami, March 2020
> https://opensips.org/training/OpenSIPS_Bootcamp_2020/
> 
> 
> ___
> 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 lua

2020-01-15 Thread Slava Bendersky via Users

Hello Vlad,
In lua script  we use \n only in xlog.

this repository



On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  wrote:
I still don't think it is AVP_set function's fault for the 
whitespaces. Make sure that the string you produce in lua and want to 
return to opensips doesn't have a newline character at the end. It 
seems that syslog prints a newline as "#012" sometimes (if it's not 
actually at the end of a message).


Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
On 1/13/20 3:26 PM, volga629 via Users wrote:

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert 
white spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

 On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu  
 wrote:

Hi Volga,

Sorry for getting to this so late. Do you still encounter this 
issue? I have tried to reproduce this myself but it seems that 
AVP_set() does set the value correctly.


Regards,

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


On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in 
insert some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: Tested 
string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: 
Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

___
Users mailing list
Users@lists.opensips.org 



___
Users mailing list
Users@lists.opensips.org 



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