Re: [OpenSIPS-Users] Parallel branches and failure route

2023-06-13 Thread Bogdan-Andrei Iancu

Hi Yury,

Yes, the failure route is per-transaction - it is triggered when the 
whole transaction fails, meaning it got negative replies on all its 
branches. In failure route you see only the "wining" branch (from all 
existing branches), meaning the branch with the lowest reply code.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 5/14/23 4:47 PM, Yury Kirsanov wrote:

Hi,
I'm adding multiple branches to the initial request and then use 
t_relay() to fire them all up to multiple destinations. But it seems 
that I can only set up only one t_on_failure route. How do I 
distinguish between branches in that failure route? Part of the 
branches can respond with 4xx, part - with 5xx and so on and only one 
would respond with 200 OK. I need to process all FAILED branches, not 
caring too much about the successful one. What would be the best way 
to do this? Thanks.


Regards,
Yury.

___
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] Learning how to proxy

2023-06-13 Thread Bogdan-Andrei Iancu

Hi Egil,

$rP $oP are NULL as they take info from the RURI, and as you can see, 
the RURI has no transport param.


Maybe you should get the proto info from the network level, like 
$socket_in(proto), see

https://opensips.org/Documentation/Script-CoreVar-3-2#socket_in

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 5/10/23 12:08 PM, Egil Hasting via Users wrote:

Hello List,

I have recently started dig into the opensips software, and is without 
doubt impressed by its maturity and feature set.
However i have stumbled upon something i find weird (probably due to 
my lack of competence).


I am setting up the opensips as a "transparent" proxy towards 
B2BUA/Registrar


So current configuration is like this:

Video system -> OpenSIPS -> Cisco VCS

simplified cut from opensips configuration

...
record_route();
else if (is_method("REGISTER"))
{
xlog("L_INFO", "$socket_out $socket_in $ru $du $rP $oP $ou $ru \n");
switch ($oP)
{
  case "udp":
    $ru = "sip::5060";
  break;
  case "tcp":
    $ru = "sip::5060;transport=tcp";
  break;
  case "tls":
    $ru = "sips::5061;transport=tls";
  break;
}
if (!t_relay())
{
  send_reply(500, "Server Internal Error 1");
  exit;
}
exit;
}
...

What i see printed is:
$socket_out = tls::5061
$socket_in = tls::5061
$ru = sip:
$du = null
$rP = udp
$oP = udp
$ou = sip:

In the second leg where the Cisco VCS is, it also insist of the 
inbound being UDP - even if UDP is disabled everywhere.
i am particularly interested in understand how it can be flagged as a 
"udp" on both $rP and $oP in that case, when data comes thru the TLS 
socket?


Rgs
Egil Hasting




___
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] Path support workaround

2023-06-13 Thread nutxase via Users
Hi Bogdan

So the ip is the ip of the uac client (internet ip)and not sure how to check 
for any nat issues there? please help :)
not sure exactly sure how it would be down as it is mid registrar looking up 
the location then establishing the call

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Tuesday, June 13th, 2023 at 7:02 AM, Bogdan-Andrei Iancu 
 wrote:

> Hi,
>
> The error you get from OpenSIPS is about its inability to send a message to a 
> certain WSS destination. This may be because:
> 1) the actual destination is wrong - you know the IP, check if it make sense, 
> maybe there are some end-user nat issues
> 2) as WSS is TCP based, the original connection is down and opensips is not 
> able to create a new one from server side.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
>
> https://www.siphub.com
>
> On 6/12/23 7:17 PM, nutxase via Users wrote:
>
>> Hi Guys
>>
>> So i am using a wss client and sending registration via mid_registrar to 
>> asterisk(pjsip) and all works fine except on inbound calls we get a lot of 
>> errors and googling has pointed me to this link 
>> https://issues.asterisk.org/jira/browse/ASTERISK-28211
>> here are the errors i get
>>
>> Jun 12 17:02:01 so-sbc-02 /usr/local/sbin/opensips[23379]: 
>> ERROR:nathelper:msg_send: send() to xx:32900 for proto wss/6 failed
>> Jun 12 17:02:01 so-sbc-02 /usr/local/sbin/opensips[23379]: 
>> ERROR:nathelper:nh_timer: sip msg_send failed!
>>
>> my question is, does anyone have a work around for this? as currently 
>> inbound calls do not work properly :(
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.
>>
>> ___
>> 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] Dispatcher state exchange in an anycast clusterer

2023-06-13 Thread Bogdan-Andrei Iancu

Hi,

It  is up to you, at cfg level, to decide which tag to use for a new 
dialog. And the status of the tag is irrelevant there (from the 
assignment perspective).


And the status of the tags must be managed by you, from outside OpenSIPS 
- opensips itself will do nothing from this perspective (of switching 
the status of the tags) - the only thing it does with the tags is to be 
sure a tag is active on a single node.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 6/12/23 1:37 PM, Denys Pozniak wrote:

Hello!
Thank you for your help!

>2) you can use the same sharing tag for multiple modules, as time as 
from logical perspective, the switching of the tags fits all the 
cases. For dialogs, you may need one tag per node (to remember which 
node created the dialog), so you may not be able to reuse here.
Do I understand correctly that when creating a dialog on a node, an 
active tag will be attached to it.
And if this node falls out of the cluster, then this tag will be 
automatically activated like some other node and all the dialog 
information (variables) will be available on it?


There is also a question about transactions. How will the response be 
handled if the owner of the transaction is not available?



пн, 12 июн. 2023 г. в 10:30, Bogdan-Andrei Iancu >:


Hi Denys,

1) yes

2) you can use the same sharing tag for multiple modules, as time
as from logical perspective, the switching of the tags fits all
the cases. For dialogs, you may need one tag per node (to remember
which node created the dialog), so you may not be able to reuse here.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
   https://www.siphub.com  

On 6/9/23 1:30 PM, Denys Pozniak wrote:

Hello!
Thank you! The mechanism with a single tag for the dispatcher
works as it should.

But I still have a number of questions on related topics:
1)  Should I declare this common dispatcher tag in the parameters
of the clusterer module?
Then, after the start, the tag on the active node will be set by
an external script.

 modparam("clusterer", "sharing_tag", "dispatcher/1=backup")
 modparam("dispatcher", "cluster_sharing_tag", "dispatcher")

2) I also want to replicate transactions and dialogs, so should I
declare own tags for each cluster node?
Or like with a dispatcher do I need one common?

modparam("clusterer", "sharing_tag", "anycast1/1=active")
modparam("clusterer", "sharing_tag", "anycast2/1=backup")
modparam("clusterer", "sharing_tag", "anycast3/1=backup")
modparam("clusterer", "sharing_tag", "anycast4/1=backup")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("tm", "tm_replication_cluster", 1)
modparam("dispatcher", "cluster_sharing_tag", "dispatcher")

вт, 6 июн. 2023 г. в 18:08, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>>:

Hi Denys,

Even better if you have only one active opensips instance -
in this case you can use only one sharing-tag across all
nodes/servers in the dispatcher cluster, tag to point to the
active instance. So, whenever you point the traffic to a
certain opensips instance, be sure to make the tag active on
that instance too.

https://opensips.org/html/docs/modules/3.2.x/clusterer.html#mi_clusterer_shtag_set_active



Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

   https://www.siphub.com  

On 6/6/23 4:11 PM, Denys Pozniak wrote:

Hello!

>So, in the dispatcher cluster you have some active nodes,
but also some stand-by, right ?
All cluster nodes have the same dynamic routing protocol
metric, so only one random node can receive traffic from the
network point of view.
Well, accordingly, only the "active" node can accept replays
to SIP OPTIONS from the dispatcher. And all other nodes see
the dispatcher peers as not alive.
It's more a question of how to make other nodes believe the
status from the "active" node and not influence it.

>And I see you did not set the this cluster_sharing_tag modparam
I have this option set, you probably didn't notice in the
initial thread.
modparam("dispatcher", "cluster_sharing_tag", "anycast1")


вт, 6 июн. 2023 г. в 11:37, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>>:

Hi Denys,

So, in the dispatcher cluster you have some acti

Re: [OpenSIPS-Users] Dispatcher state exchange in an anycast clusterer

2023-06-13 Thread Bogdan-Andrei Iancu

:+1:

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 6/12/23 5:19 PM, Denys Pozniak wrote:
Judging by the documentation, the activation of the tag of a 
non-working node in the context of dialogs should be handled by an 
external system. So it won't happen automatically, right?


  "If node 1 fails, the monitoring system (also responsible for the 
Anycast management and BGP updates) will pick one of the remaining 
node in the anycast group and it will activate the “node_1” tag on it.
   So, this new node will became owner and responsible for the calls 
created on former node 1."


пн, 12 июн. 2023 г. в 13:37, Denys Pozniak >:


Hello!
Thank you for your help!

>2) you can use the same sharing tag for multiple modules, as time
as from logical perspective, the switching of the tags fits all
the cases. For dialogs, you may need one tag per node (to remember
which node created the dialog), so you may not be able to reuse here.
Do I understand correctly that when creating a dialog on a node,
an active tag will be attached to it.
And if this node falls out of the cluster, then this tag will be
automatically activated like some other node and all the dialog
information (variables) will be available on it?

There is also a question about transactions. How will the response
be handled if the owner of the transaction is not available?


пн, 12 июн. 2023 г. в 10:30, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>>:

Hi Denys,

1) yes

2) you can use the same sharing tag for multiple modules, as
time as from logical perspective, the switching of the tags
fits all the cases. For dialogs, you may need one tag per node
(to remember which node created the dialog), so you may not be
able to reuse here.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

   https://www.siphub.com  

On 6/9/23 1:30 PM, Denys Pozniak wrote:

Hello!
Thank you! The mechanism with a single tag for the dispatcher
works as it should.

But I still have a number of questions on related topics:
1)  Should I declare this common dispatcher tag in the
parameters of the clusterer module?
Then, after the start, the tag on the active node will be set
by an external script.

 modparam("clusterer", "sharing_tag", "dispatcher/1=backup")
 modparam("dispatcher", "cluster_sharing_tag", "dispatcher")

2) I also want to replicate transactions and dialogs, so
should I declare own tags for each cluster node?
Or like with a dispatcher do I need one common?

modparam("clusterer", "sharing_tag", "anycast1/1=active")
modparam("clusterer", "sharing_tag", "anycast2/1=backup")
modparam("clusterer", "sharing_tag", "anycast3/1=backup")
modparam("clusterer", "sharing_tag", "anycast4/1=backup")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("tm", "tm_replication_cluster", 1)
modparam("dispatcher", "cluster_sharing_tag", "dispatcher")

вт, 6 июн. 2023 г. в 18:08, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>>:

Hi Denys,

Even better if you have only one active opensips instance
- in this case you can use only one sharing-tag across
all nodes/servers in the dispatcher cluster, tag to point
to the active instance. So, whenever you point the
traffic to a certain opensips instance, be sure to make
the tag active on that instance too.

https://opensips.org/html/docs/modules/3.2.x/clusterer.html#mi_clusterer_shtag_set_active



Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

   https://www.siphub.com  

On 6/6/23 4:11 PM, Denys Pozniak wrote:

Hello!

>So, in the dispatcher cluster you have some active
nodes, but also some stand-by, right ?
All cluster nodes have the same dynamic routing protocol
metric, so only one random node can receive traffic from
the network point of view.
Well, accordingly, only the "active" node can accept
replays to SIP OPTIONS from the dispatcher. And all
other nodes see the dispatcher peers as not alive.
It's more a question of how to make other nodes believe
the status from the "a

Re: [OpenSIPS-Users] Parallel branches and failure route

2023-06-13 Thread Yury Kirsanov
Hi Bogdan,
Thanks a lot for clarification, is there any way to 'catch' other branches?
Or maybe I should open a feature request for that? It's quite important
from the point of view of billing to have these branches processed too.
Thanks!

Best regards,
Yury.

On Tue, Jun 13, 2023 at 5:31 PM Bogdan-Andrei Iancu 
wrote:

> Hi Yury,
>
> Yes, the failure route is per-transaction - it is triggered when the whole
> transaction fails, meaning it got negative replies on all its branches. In
> failure route you see only the "wining" branch (from all existing
> branches), meaning the branch with the lowest reply code.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 5/14/23 4:47 PM, Yury Kirsanov wrote:
>
> Hi,
> I'm adding multiple branches to the initial request and then use t_relay()
> to fire them all up to multiple destinations. But it seems that I can only
> set up only one t_on_failure route. How do I distinguish between branches
> in that failure route? Part of the branches can respond with 4xx, part -
> with 5xx and so on and only one would respond with 200 OK. I need to
> process all FAILED branches, not caring too much about the successful one.
> What would be the best way to do this? Thanks.
>
> Regards,
> Yury.
>
> ___
> 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


Re: [OpenSIPS-Users] Parallel branches and failure route

2023-06-13 Thread Bogdan-Andrei Iancu

Hi,

you can gain access to all replies from all branches via the onreply route.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 6/13/23 1:07 PM, Yury Kirsanov wrote:

Hi Bogdan,
Thanks a lot for clarification, is there any way to 'catch' other 
branches? Or maybe I should open a feature request for that? It's 
quite important from the point of view of billing to have these 
branches processed too. Thanks!


Best regards,
Yury.

On Tue, Jun 13, 2023 at 5:31 PM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Yury,

Yes, the failure route is per-transaction - it is triggered when
the whole transaction fails, meaning it got negative replies on
all its branches. In failure route you see only the "wining"
branch (from all existing branches), meaning the branch with the
lowest reply code.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
   https://www.siphub.com  

On 5/14/23 4:47 PM, Yury Kirsanov wrote:

Hi,
I'm adding multiple branches to the initial request and then use
t_relay() to fire them all up to multiple destinations. But it
seems that I can only set up only one t_on_failure route. How do
I distinguish between branches in that failure route? Part of the
branches can respond with 4xx, part - with 5xx and so on and only
one would respond with 200 OK. I need to process all FAILED
branches, not caring too much about the successful one. What
would be the best way to do this? Thanks.

Regards,
Yury.

___
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] Path support workaround

2023-06-13 Thread Bogdan-Andrei Iancu
OK, so it looks like the target IP is a public valid one. Check with 
netstat if you have any ongoing TCP conns to that IP


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 6/13/23 10:38 AM, nutxase wrote:

Hi Bogdan


So the ip is the ip of the uac client (internet ip)and not sure how to 
check for any nat issues there? please help :)
not sure exactly sure how it would be down as it is mid registrar 
looking up the location then establishing the call



Sent with Proton Mail  secure email.

--- Original Message ---
On Tuesday, June 13th, 2023 at 7:02 AM, Bogdan-Andrei Iancu 
 wrote:



Hi,

The error you get from OpenSIPS is about its inability to send a 
message to a certain WSS destination. This may be because:
1) the actual destination is wrong - you know the IP, check if it 
make sense, maybe there are some end-user nat issues
2) as WSS is TCP based, the original connection is down and opensips 
is not able to create a new one from server side.


Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com
On 6/12/23 7:17 PM, nutxase via Users wrote:

Hi Guys

So i am using a wss client and sending registration via 
mid_registrar to asterisk(pjsip) and all works fine except on 
inbound calls we get a lot of errors and googling has pointed me to 
this link https://issues.asterisk.org/jira/browse/ASTERISK-28211 


here are the errors i get


Jun 12 17:02:01 so-sbc-02 /usr/local/sbin/opensips[23379]: 
ERROR:nathelper:msg_send: send() to xx:32900 for proto wss/6 failed
Jun 12 17:02:01 so-sbc-02 /usr/local/sbin/opensips[23379]: 
ERROR:nathelper:nh_timer: sip msg_send failed!


my question is, does anyone have a work around for this? as 
currently inbound calls do not work properly :(




Sent with Proton Mail  secure email.

___
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] Path support workaround

2023-06-13 Thread nutxase via Users
So in netstat i dont see any connections to my public ip(uac client)
but in the log i see

RROR:tls_wolfssl:_wolfssl_tls_connect: New TLS connection to :443 failed
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8048]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: TLS connect error: -313, received alert 
fatal error
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8048]: 
ERROR:proto_wss:ws_client_handshake: cannot start handshake
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8048]: 
ERROR:proto_wss:ws_connect: cannot complete WebSocket handshake
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8048]: 
ERROR:proto_wss:proto_wss_send: connect failed
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8048]: ERROR:core:msg_send: 
send() to :443 for proto wss/6 failed
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: New TLS connection to xxx:443 failed
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: TLS connect error: -313, received alert 
fatal error
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: 
ERROR:proto_wss:ws_client_handshake: cannot start handshake
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: 
ERROR:proto_wss:ws_connect: cannot complete WebSocket handshake
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: 
ERROR:proto_wss:proto_wss_send: connect failed
Jun 13 13:33:08 so-sbc-02 /usr/local/sbin/opensips[8050]: ERROR:core:msg_send: 
send() to :443 for proto wss/6 failed
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: New TLS connection to xxx:443 failed
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: TLS connect error: -313, received alert 
fatal error
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:ws_client_handshake: cannot start handshake
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:ws_connect: cannot complete WebSocket handshake
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:proto_wss_send: connect failed
Jun 13 13:33:09 so-sbc-02 /usr/local/sbin/opensips[8047]: ERROR:core:msg_send: 
send() to :443 for proto wss/6 failed
Jun 13 13:33:11 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: New TLS connection to :443 failed
Jun 13 13:33:11 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:tls_wolfssl:_wolfssl_tls_connect: TLS connect error: -313, received alert 
fatal error
Jun 13 13:33:11 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:ws_client_handshake: cannot start handshake
Jun 13 13:33:11 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:ws_connect: cannot complete WebSocket handshake
Jun 13 13:33:11 so-sbc-02 /usr/local/sbin/opensips[8047]: 
ERROR:proto_wss:proto_wss_send: connect failedJun 13 13:33:11 so-sbc-02 
/usr/local/sbin/opensips[8047]: ERROR:core:msg_send: send() to :443 for 
proto wss/6 failed

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Tuesday, June 13th, 2023 at 12:41 PM, Bogdan-Andrei Iancu 
 wrote:

> OK, so it looks like the target IP is a public valid one. Check with netstat 
> if you have any ongoing TCP conns to that IP
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
>
> https://www.siphub.com
>
> On 6/13/23 10:38 AM, nutxase wrote:
>
>> Hi Bogdan
>>
>> So the ip is the ip of the uac client (internet ip)and not sure how to check 
>> for any nat issues there? please help :)
>> not sure exactly sure how it would be down as it is mid registrar looking up 
>> the location then establishing the call
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.
>>
>> --- Original Message ---
>> On Tuesday, June 13th, 2023 at 7:02 AM, Bogdan-Andrei Iancu 
>> [](mailto:bog...@opensips.org) wrote:
>>
>>> Hi,
>>>
>>> The error you get from OpenSIPS is about its inability to send a message to 
>>> a certain WSS destination. This may be because:
>>> 1) the actual destination is wrong - you know the IP, check if it make 
>>> sense, maybe there are some end-user nat issues
>>> 2) as WSS is TCP based, the original connection is down and opensips is not 
>>> able to create a new one from server side.
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>> https://www.opensips-solutions.com
>>>
>>> https://www.siphub.com
>>>
>>> On 6/12/23 7:17 PM, nutxase via Users wrote:
>>>
 Hi Guys

 So i am using a wss client and sending registration via mid_registrar to 
 asterisk(pjsip) and all works fine except on inbound calls we get a lot of 
 errors and googling has pointed me to this link 
 https://issues.asterisk.org/jira/browse/ASTERISK-28211
 here are the errors i get

 Jun 12 17:02:01 so-sbc-02 /usr/local/sbin/op

Re: [OpenSIPS-Users] Parallel branches and failure route

2023-06-13 Thread Yury Kirsanov
Thanks, Bogdan,
But what if I need to perform uac_auth in one of the branches? I can't
originate anything from the on_reply route, unfortunately :(

Regards,
Yury.

On Tue, Jun 13, 2023 at 8:44 PM Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> you can gain access to all replies from all branches via the onreply route.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 6/13/23 1:07 PM, Yury Kirsanov wrote:
>
> Hi Bogdan,
> Thanks a lot for clarification, is there any way to 'catch' other
> branches? Or maybe I should open a feature request for that? It's quite
> important from the point of view of billing to have these branches
> processed too. Thanks!
>
> Best regards,
> Yury.
>
> On Tue, Jun 13, 2023 at 5:31 PM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Yury,
>>
>> Yes, the failure route is per-transaction - it is triggered when the
>> whole transaction fails, meaning it got negative replies on all its
>> branches. In failure route you see only the "wining" branch (from all
>> existing branches), meaning the branch with the lowest reply code.
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>>   https://www.siphub.com
>>
>> On 5/14/23 4:47 PM, Yury Kirsanov wrote:
>>
>> Hi,
>> I'm adding multiple branches to the initial request and then use
>> t_relay() to fire them all up to multiple destinations. But it seems that I
>> can only set up only one t_on_failure route. How do I distinguish between
>> branches in that failure route? Part of the branches can respond with 4xx,
>> part - with 5xx and so on and only one would respond with 200 OK. I need to
>> process all FAILED branches, not caring too much about the successful one.
>> What would be the best way to do this? Thanks.
>>
>> Regards,
>> Yury.
>>
>> ___
>> 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


Re: [OpenSIPS-Users] Access "Identity" header after calling stir_shaken_auth() on 3.2.x

2023-06-13 Thread Daniel Zanutti
Hi Bogdan

Yes, that's exactly how I ended. The original problem is I was using 3.2.x
version and this version hasn't out param. I updated just the module to
3.3.x and it worked.

On Tue, Jun 13, 2023 at 3:45 AM Bogdan-Andrei Iancu 
wrote:

> Daniel,
>
> The auth function has the option to return you into a variable the
> identity value . See the `out` param here:
>
> https://opensips.org/docs/modules/3.3.x/stir_shaken.html#func_stir_shaken_auth
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 5/15/23 12:08 AM, Daniel Zanutti wrote:
>
> Hi Brett
>
> Just to respond, no it doesn't. This field is only visible when we are
> authenticating headers, not generating.
>
> At the end, I copied the module from the 3.3.x version, to my 3.2.11
> version. It worked flawlessly.
>
> Thanks
>
> On Fri, Apr 28, 2023 at 12:10 PM Brett Nemeroff 
> wrote:
>
>> Hello Daniel,
>> See if the $identity peudovariable offered by that module suits your
>> need:
>>
>> https://opensips.org/docs/modules/3.2.x/stir_shaken.html#pv_identity
>>
>> -Brett
>>
>>
>> On Fri, Apr 28, 2023 at 9:03 AM Daniel Zanutti 
>> wrote:
>>
>>> Hi
>>>
>>> How can I access the generated Identity header, after calling function
>>> stir_shaken_auth(), on opensips 3.2.x? On 3.3.x there is a new "out"
>>> parameter, is there a way on 3.2.x?
>>>
>>> It's just to store on DB.
>>>
>>> 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
>>
>
> ___
> 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


Re: [OpenSIPS-Users] Call fetch_dlg_value inside a timer route

2023-06-13 Thread Daniel Zanutti
That's a hack! Thanks, i'll try out.

On Tue, Jun 13, 2023 at 3:31 AM Bogdan-Andrei Iancu 
wrote:

> What Alberto said still applies.
>
> The timer route is outside the context of any SIP message, while the
> function you want to use (get_profile_size) is part of the dialog module,
> where most of the functions do requires the context of a SIP dialog. I
> agree get_profile_size() does not need the context and could be more
> flexible.
> So, try this hack of using a intermediary route[], like:
> timer_route[]
>{ route(foo); }
> route[foo]
>{ get_profile_size(); }
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 5/18/23 3:13 PM, Daniel Zanutti wrote:
>
> Hi Alberto
>
> In fact, i need to use: get_profile_size()
>
> I want to count some type of calls. I've done using statistics but not
> very precise.
>
>
> On Wed, May 17, 2023 at 7:48 PM Alberto  wrote:
>
>> This reminded me of something else, maybe it can be used here too:
>> In a event route, before you can use dialog variables, you have to load
>> the dialog context by using func_load_dialog_ctx. Maybe it's the same with
>> timer routes.
>>
>> https://opensips.org/docs/modules/3.2.x/dialog#func_load_dialog_ctx
>>
>> On Wed, 17 May 2023, 21:07 Daniel Zanutti, 
>> wrote:
>>
>>> Hi folks
>>>
>>> Why is it not possible to call *fetch_dlg_value *inside a timer route?
>>> Is there any other alternative to it?
>>>
>>> I wanted to generate some statistics every X seconds.
>>>
>>> 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
>>
>
> ___
> 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


[OpenSIPS-Users] WSS not sending bye

2023-06-13 Thread Pat M via Users
Hi everyone

Please help!!

I have a mobile webrtc client that i am trying to use with opensips, it all 
works fine except when you try hangup from the client it does nothing, does not 
send any bye to opensips and therefore opensips does not send a bye upstream
i am using mid_registrar

but if i register it direct to an asterisk server it works fine

my wss config is very normal including the tls section

loadmodule "proto_wss.so"
modparam("proto_wss", "require_origin", yes)
modparam("proto_wss", "wss_max_msg_chunks", 16)modparam("proto_wss", 
"wss_handshake_timeout", 300)

modparam("tls_mgm", "ca_list", "[sip]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[sip]/etc/opensips/tls/cert.pem")
modparam("tls_mgm", "private_key", "[sip]/etc/opensips/tls/ckey.pem")
modparam("tls_mgm", "require_cert", "[sip]0")
modparam("tls_mgm", "verify_cert", "[sip]0")
modparam("tls_mgm", "tls_library", "wolfssl")

modparam("tls_mgm", "client_domain", "sip1")
modparam("tls_mgm", "ca_list", "[sip1]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[sip1]/etc/opensips/tls/sip1.pem")
modparam("tls_mgm", "private_key", "[sip1]/etc/opensips/tls/sip1key.pem")
modparam("tls_mgm", "require_cert", "[sip1]0")
modparam("tls_mgm", "verify_cert", "[sip1]0")modparam("tls_mgm", 
"match_ip_address", "[sip1]*")

loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 2) /* 1 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 180)
modparam("mid_registrar", "min_expires", 60)
modparam("mid_registrar", "max_expires", 180)
modparam("mid_registrar", "max_contacts", 16)
modparam("mid_registrar", "received_avp", 
"$avp(received)")modparam("mid_registrar", "pn_pnsreg_interval", 140)

mid_registrar_save("location", "p0v");

Thanks Pat

Sent with [Proton Mail](https://proton.me/) secure email.___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call fetch_dlg_value inside a timer route

2023-06-13 Thread Bogdan-Andrei Iancu

https://github.com/OpenSIPS/opensips/commit/a5f85013ea9156410a48614079105a7c5b41fe8e

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 6/13/23 5:39 PM, Daniel Zanutti wrote:

That's a hack! Thanks, i'll try out.

On Tue, Jun 13, 2023 at 3:31 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


What Alberto said still applies.

The timer route is outside the context of any SIP message, while
the function you want to use (get_profile_size) is part of the
dialog module, where most of the functions do requires the context
of a SIP dialog. I agree get_profile_size() does not need the
context and could be more flexible.
So, try this hack of using a intermediary route[], like:
    timer_route[]
   { route(foo); }
    route[foo]
   { get_profile_size(); }

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
   https://www.siphub.com  

On 5/18/23 3:13 PM, Daniel Zanutti wrote:

Hi Alberto

In fact, i need to use: get_profile_size()

I want to count some type of calls. I've done using statistics
but not very precise.


On Wed, May 17, 2023 at 7:48 PM Alberto
mailto:alberto.rina...@gmail.com>> wrote:

This reminded me of something else, maybe it can be used here
too:
In a event route, before you can use dialog variables, you
have to load the dialog context by using
func_load_dialog_ctx. Maybe it's the same with timer routes.

https://opensips.org/docs/modules/3.2.x/dialog#func_load_dialog_ctx


On Wed, 17 May 2023, 21:07 Daniel Zanutti,
mailto:daniel.zanu...@gmail.com>>
wrote:

Hi folks

Why is it not possible to call *fetch_dlg_value *inside a
timer route? Is there any other alternative to it?

I wanted to generate some statistics every X seconds.

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



___
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