Re: [OpenSIPS-Users] Request-Disposition: no-fork

2022-10-10 Thread Bela H
Or is the dialoginfo_set_branch_callee(callee) function the key here?



From: Bela H
Sent: Tuesday, 11 October 2022 08:09
To: Bogdan-Andrei Iancu; OpenSIPS users mailling 
list
Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork

Thanks Bogdan!

However, I am talking about serial forking, call forwarding busy/no answer 
scenario.
Is there a way to avoid that in the cfg without messing up with the to tags?

How do I achieve “proxy to only a single address ("no-fork")”?
According to fork-directive in 
https://www.rfc-editor.org/rfc/rfc3841#section-9.1.

Cheers,
Bela

From: Bogdan-Andrei Iancu
Sent: Tuesday, 11 October 2022 01:49
To: OpenSIPS users mailling list; Bela 
H
Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork

Hi Bela,

What you are trying to do (messing with the TO-tags) is a bad idea, as you will 
be breaking the upstream parallel forking.

If the GW does not support forking, what you can do is to avoid doing parallel 
forking in your cfg (like when routing to users via lookup). You do not need 
any special support.

Best regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/
On 9/29/22 7:10 AM, Bela H wrote:
Hello,

I have call forwarding busy/no answer scenario: A number is from a gateway, B 
and C numbers are our own subs.
The gateway is sending us the INVITE message with “Request-Disposition: 
no-fork” header field.
That means we must use one dialog for the mentioned scenario.
Currently the To tag we are sending to the GW in the first 180 ringing/181 Call 
is being forwarded messages are different to the To tag in the second 180 
ringing and 200 OK (SDP).

Gateway  OpenSips
  INVITE
-->

100 GIVING IT A TRY
<-- -

  180 RINGING
<- ---

181 CALL IS BEING FORWARDED
<- ---

  180 RINGING
<- ---

  200 OK (SDP)
<- ---

What would be the easiest way from OpenSIPS to send the same To tag (it should 
be the same from the first 180 ringing through to the 200 OK) and using one 
dialog for this scenario?

Cheers,
Bela



___

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] Request-Disposition: no-fork

2022-10-10 Thread Bela H
Thanks Bogdan!

However, I am talking about serial forking, call forwarding busy/no answer 
scenario.
Is there a way to avoid that in the cfg without messing up with the to tags?

How do I achieve “proxy to only a single address ("no-fork")”?
According to fork-directive in 
https://www.rfc-editor.org/rfc/rfc3841#section-9.1.

Cheers,
Bela

From: Bogdan-Andrei Iancu
Sent: Tuesday, 11 October 2022 01:49
To: OpenSIPS users mailling list; Bela 
H
Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork

Hi Bela,

What you are trying to do (messing with the TO-tags) is a bad idea, as you will 
be breaking the upstream parallel forking.

If the GW does not support forking, what you can do is to avoid doing parallel 
forking in your cfg (like when routing to users via lookup). You do not need 
any special support.

Best regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/
On 9/29/22 7:10 AM, Bela H wrote:
Hello,

I have call forwarding busy/no answer scenario: A number is from a gateway, B 
and C numbers are our own subs.
The gateway is sending us the INVITE message with “Request-Disposition: 
no-fork” header field.
That means we must use one dialog for the mentioned scenario.
Currently the To tag we are sending to the GW in the first 180 ringing/181 Call 
is being forwarded messages are different to the To tag in the second 180 
ringing and 200 OK (SDP).

Gateway  OpenSips
  INVITE
-->

100 GIVING IT A TRY
<-- -

  180 RINGING
<- ---

181 CALL IS BEING FORWARDED
<- ---

  180 RINGING
<- ---

  200 OK (SDP)
<- ---

What would be the easiest way from OpenSIPS to send the same To tag (it should 
be the same from the first 180 ringing through to the 200 OK) and using one 
dialog for this scenario?

Cheers,
Bela




___

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] [Release] OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases

2022-10-10 Thread Liviu Chircu

Hi, everyone!

The 3.3.2, 3.2.9 and 3.1.12 OpenSIPS minor versions are scheduled for 
release on Wednesday, October 19th -- a week and a half from now.


In preparation for the releases, we are imposing the usual freeze on any 
significant fixes (as complexity) on these stable branches, in order to 
ensure a safe window for testing in the days ahead.


Happy testing,

--
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


Re: [OpenSIPS-Users] early dialog termination

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Ryzhik,

Without a t_relay() it makes not much sense to have an dialog structure 
at all - the dialog module in opensips is actually design for proxied 
calls, not for UAC calls.


IMO, you should keep it a transaction level, by sending replies back 
only. When getting the INVITE, put its call-id into a DB table (to keep 
only the "active" session) together with a lifetime / expiration time. 
When getting a CANCEL, update the table (set lifetime to 0), to know it 
is terminated. And use an simple external script that keeps scanning the 
DB for (1) sending 487 Terminated via MI if the record has 0 lifetime or 
(2) send a 408 Timeout via MI if the lifetime exceeded.
In a similar way you can handle the BYE - send back 200OK for the BYE 
and set 0 in lifetime, to send a 487 canceled back


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 10/10/22 4:33 PM, Ryzhik Ivan wrote:

Hello!
My opensips version is 3.1 with tm,dialog and rtpengine modules.
On incoming INVITE i'm creating an early dialog with 183 replies and 
i'm playing audio to caller with rtpengine, no t_relay() on this step, 
OS is acting as UAS endpoint.

If the caller cancels the invite with a CANCEL message - all works great.
But some users terminate dialog with BYE message.
1) on BYE with to-tag OS can't find dialog with match_dialog(), 
because to-tag presents.

2) if i use load_dialog_ctx($ci) -  it is possible to handle BYE.
3) in early dialog termination with BYE we also need to send final 
response to the INVITE transaction.


Maybe I did something wrong, but I can't handle the final response to 
INVITE in this case.


___
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] Expires value - [ZVP-JQSVP-142]

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Artem,

This is the intended behavior of the module, re-register with the last 
"expires" provided by the server - if the server had a good reason to 
lower the registration time on first register, it will most probably do 
it for the re-register's also. So does not make too much of a sense to 
keep using the initial DB value - or do you have some good reason not to 
update ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/23/22 7:15 PM, Artem Fomenko via Users wrote:


Hello,

I'm Artem and configuring telephony system via OpenSIPS v3.1.9. In 
outgoing REGISTER request the "expires" parameter set according 
"expiry" value in "uac_registrant" DB table. But in all subsequent 
REGISTERs "expires" value takes same as in 200 OK response on previous 
REGISTER request. Is it possible to configure OpenSIPS to use same 
"expiry" value for all subsequent REGISTER requests also?


Regards,

LiveAgent   

*Artem Fomenko*

*Development Team*

+421 2 33 456 826 (EU & Worldwide)

+1-888-257-8754 (USA & Canada)

www.liveagent.com 



*How nice was my reply?*

1 
 
	2 
 
	3 
 
	4 
 
	5 
 
	6 
 
	7 
 
	8 

Re: [OpenSIPS-Users] OpenSIPS Control Panel

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Nitesh,

In SIP, registration is done for receiving calls, it does not impact 
sending calls. So, define the remote server as GW in Dynamic Route and 
simply route the calls to it.  Note that maybe the remote server will 
expect you to use the as FROM hdr (calling identity) the AOR (SIP 
address) you are registering with, so maybe you should be an 
uac_replace_from() in cfg when sending to the GW.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 10/7/22 9:00 PM, Nitesh Divecha wrote:

Hello All,

Anyone using OpenSIPS CP 9.3.2? Need small help!

I got OpenSIPS 3.3.1 running and I can make calls out to the gateway 
(SIP trunk) without any problems.


My provider issued me a DID with user/pass and I was able to configure 
them under "UAC Registrant" and registered to a remote server.


Question is - how can I route calls to "UAC Registrant"? From the 
"Dynamic Routing" menu I can only route calls to Gateway. How can I 
route calls to "UAC Registrant"?


Any suggestions?

Thank you in advance!

Cheers,
Nitesh

___
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] Possible memory leak in PKG

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Arto,

Thanks for the report here. So, the 3.2.7 suffers of a mem leak which 
DOES NOT exist in 3.1.1, mainly this


      109600 : 4858 x [dlg_vals.c: fetch_dlg_value, line 176]

right ?

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 10/5/22 10:16 AM, Arto Kuiri wrote:

Hi,

I think I have stumbled to some kind of memory leak. I made new 
opensips server used same opensips.cfg (changed only ip address) as in 
my older servers and after some time I started to get these to log file:


/usr/sbin/opensips[1145854]: ERROR:core:fm_malloc: not enough free pkg 
memory (2312 bytes left, need 2472), please increase the "-M" command 
line parameter!
/usr/sbin/opensips[1145854]: ERROR:core:receive_msg: no pkg mem left 
for sip_msg


Older servers works fine with much higher load. Old servers are with 
opensips 3.1.1 and new server is 3.2.7 :


opensips -V
version: opensips 3.1.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535

poll method support: poll, epoll, sigio_rt, select.
main.c compiled on  with gcc 9

opensips -V
version: opensips 3.2.7 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535

poll method support: poll, epoll, sigio_rt, select.
main.c compiled on  with gcc 11

I allocated more memory and changed private memory allocator to 
F_MALLOC_DBG


After while I checked what process had highest memory useage and I did:
opensips-cli -x mi mem_pkg_dump 
(PID was "SIP receiver udp")



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


[OpenSIPS-Users] early dialog termination

2022-10-10 Thread Ryzhik Ivan
Hello!
My opensips version is 3.1 with tm,dialog and rtpengine modules.
On incoming INVITE i'm creating an early dialog with 183 replies and i'm
playing audio to caller with rtpengine, no t_relay() on this step, OS is
acting as UAS endpoint.
If the caller cancels the invite with a CANCEL message - all works great.
But some users terminate dialog with BYE message.
1) on BYE with to-tag OS can't find dialog with match_dialog(), because
to-tag presents.
2) if i use load_dialog_ctx($ci) -  it is possible to handle BYE.
3) in early dialog termination with BYE we also need to send final response
to the INVITE transaction.

Maybe I did something wrong, but I can't handle the final response to
INVITE in this case.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Thomas,

Your handling of sequential requests is broken, see here for a correct 
sample:


https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L109

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/30/22 11:07 AM, Thomas Pircher via Users wrote:

Thomas Pircher wrote:

The problem I am seeing is when I initiate a connection from the sipp
client then I see RTP flowing only in one direction (sipp client to sipp
server). I believe this is due to a missing ACK from OpenSIPS to the
sipp server following the 200 OK.


Hi,

I no longer think the rtpproxy is part of the problem. I believe this is
purely an issue with my t_relay configuration.

I did some more tests, and I think the issue is that the ACK from the
sipp client at 10.30.8.203 is discarded by OpenSIPS, and therefore the
OpenSIPS does not send the ACK to the sipp server on the internal
interface.

This would also explain the "404 Not here" response to the BYE at the
end of the connection:

 ┌───┐ ┌─┐ 
┌─┐    ┌───┐
 │sipp client│    │OpenSIPS external│ │OpenSIPS 
internal│    │sipp server│
 │10.30.8.203│    │10.30.8.201  │ 
│10.30.9.10   │    │10.30.90.11│
 └─┬─┘    └┬┘ 
└┬┘    └─┬─┘

   │    INVITE SDP (g711A) │    │ │
│──>│ 
│   │

   │ │    │ │
   │   100 Giving it a try │    │ │
│<──│ 
│   │

   │ │    │ │
   │ │    │    INVITE SDP (g711A) │
   │ │ │──>│
   │ │    │ │
   │ │    │   180 Ringing │
   │ │ │<──│
   │ │    │ │
   │   180 Ringing │    │ │
│<──│ 
│   │

   │ │    │ │
   │ │    │200 OK SDP (g711A 
telephone-event) │

   │ │ │<──│
   │ │    │ │
   │200 OK SDP (g711A telephone-event) 
│    │ │
│<──│ 
│   │

   │ │    │ │
   │   ACK │    │ │
│──>│ 
│   │

   │ │    │ │
   │ │    │200 OK SDP (g711A 
telephone-event) │

   │ │ │<──│
   │ │    │ │
   │200 OK SDP (g711A telephone-event) 
│    │ │
│<──│ 
│   │

   │ │    │ │
   │   ACK │    │ │
│──>│ 
│   │

   │ │    │ │
   │ │    │200 OK SDP (g711A 
telephone-event) │

   │ │ │<──│
   │ │    │ │
   │200 OK SDP (g711A telephone-event) 
│    │ │
│<──│ 
│   │

   │ │    │ │
   │   ACK │    │ │
│──>│ 
│   │

   │ │    │ │
   │ │    │200 OK SDP (g711A 
telephone-event) │

   │ │ │<──│
   │ │    │ │
   │200 OK SDP (g711A telephone-event) 
│    │ │
│<──│ 
│   │

   │ │    │ │
   │   ACK │    │ │
│──>│ 
│   │

   │ │    │ │
   │ │    │200 OK SDP (g711A 
telephone-event) │

   │ │ │<──│
   │ │    │ │
   │   BYE │    │ │
│──>│ 
│   │

   │ │    │ │
   │   404 Not here │ 

Re: [OpenSIPS-Users] Does OpenSIPS support Request-Disposition: no-fork in INVITE message?

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Bela,

As per prev email, there is nothing to be supported by OpenSIPS, just 
don;t do forking in your cfg, nothing more.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/30/22 12:15 AM, Bela H wrote:


Hello,

Does OpenSIPS 3.2.6 version support Request-Disposition: no-fork in 
INVITE message?


Cheers,

Bela


___
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] Request-Disposition: no-fork

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Bela,

What you are trying to do (messing with the TO-tags) is a bad idea, as 
you will be breaking the upstream parallel forking.


If the GW does not support forking, what you can do is to avoid doing 
parallel forking in your cfg (like when routing to users via lookup). 
You do not need any special support.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/29/22 7:10 AM, Bela H wrote:


Hello,

I have call forwarding busy/no answer scenario: A number is from a 
gateway, B and C numbers are our own subs.


The gateway is sending us the INVITE message with 
“Request-Disposition: no-fork” header field.


That means we must use one dialog for the mentioned scenario.

Currently the To tag we are sending to the GW in the first 180 
ringing/181 Call is being forwarded messages are different to the To 
tag in the second 180 ringing and 200 OK (SDP).


Gateway      OpenSips

      INVITE

-->

100 GIVING IT A TRY

<-- -

  180 RINGING

<- ---

181 CALL IS BEING FORWARDED

<- ---

  180 RINGING

<- ---

  200 OK (SDP)

<- ---

What would be the easiest way from OpenSIPS to send the same To tag 
(it should be the same from the first 180 ringing through to the 200 
OK) and using one dialog for this scenario?


Cheers,

Bela


___
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 3.2.8 does not send message with opensips-cli command

2022-10-10 Thread Bogdan-Andrei Iancu

Hi,

On 3.2, are you sure you actually have the ongoing connection? Try 
running the list_tcp_conns MI cmd just before trying to push the MESSAGE 
out. Be sure that the remote point (proto:ip:port) of the connection 
matches the destination of your MESSAGE (so the connection gets re-used).


https://www.opensips.org/Documentation/Interface-CoreMI-3-2#toc4

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/29/22 5:09 PM, jacky z wrote:
Also tried version 3.2.2. The same issue. The existing TCP connection 
can't be found when there is a Message request, either from msilo dump 
or opensips-cli command. A message sent directly is normal when the 
receiver side registers with a living TCP socket. Guess this would 
also affect other behavior where an existing TCP connection needs to 
be found. From the log, the connection ID is zero. Very strange 
behavior. I would like to debug, but not familiar with the source code 
structure. For example how a TCP connection is looked for and which 
file handles this. Guess it is not difficult to fix, hope the Opensips 
team can help. Thank you!


On Tue, Sep 27, 2022 at 10:56 PM jacky z > wrote:


Who can help on this? It is difficult to understand why the live
tcp connection can't be found with opensips 3.2. It works well
with opensips 3.1. Thanks!

On Mon, Sep 26, 2022 at 3:54 PM jacky z mailto:zjack0...@gmail.com>> wrote:

Hi Team,

We use MI command to send messages to a user successfully with
opensips 3.1, but after we upgraded to 3.2.8, the message
can't be sent with opensips-cli command.

We compared the logs and found that when the command was run
on 3.2.8, the tcp connection couldn't be found though we can
confirm there was a tcp connection. Another strange behavior
is that it did not lookup the location table for the ruri and
it seems the message route was not called. On 3.2.8, if we
specify the ruri in the command with the actual ip address and
port we manually found in the location table, the message can
be sent. We also found the msilo module can't send messages on
3.2.8 but it works well on 3.1.

Here is the command we used:

opensips-cli -x mi t_uac_dlg method=MESSAGE
ruri="sip:12...@sip.domain.com:5061;transport=TLS"
headers="From:
sip:6...@sip.domain.com:5061;transport=tls\r\nTo:
sip:12...@sip.domain.com:5061;transport=TLS\r\nContact:
sip:6...@sip.domain.com:5061;transport=tls\r\nContent-Type:
text/plain\r\n" body="this is a message"

Here are the logs on 3.1 and 3.2.8 respectively,

Logs for OPENSIPS 3.2

Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg: SIP Request:
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  method: 

Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  uri:
 
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  version:

Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers:
flags=
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_via_param:
found param type 232,  = ; state=16
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_via: end of
header reached, state=5
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: via
found, flags=
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: this
is the first via
Sep 26 07:21:13 opensips[3477]: DBG:core:_parse_to: end of
header reached, state=9
Sep 26 07:21:13 opensips[3477]: DBG:core:_parse_to:
display={}, ruri={sip:6989229...@sip.domain.com:5061
}
Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: 
[37]; uri=[sip:6989229...@sip.domain.com:5061
]
Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: to
body [sip:6989229...@sip.domain.com:5061#015#012
]
Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: cseq
: <10> 
Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field:
content_length=28
Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: found
end of header
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers:
flags=
Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: flags=78
Sep 26 07:21:13 opensips[3477]: DBG:proto_tls:proto_tls_send:
no open tcp connection found, opening new one, async = 0
Sep 26 07:21:13 opensips[3477]: DBG:core:probe_max_sock_buff:
getsockopt: snd is initially 

Re: [OpenSIPS-Users] Creating branches inside a while loop

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Takeshi,

Aren't you missing the "seturi()" + "append_branch()" in the loop ??

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/28/22 4:26 PM, mayamatakeshi wrote:


On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi > wrote:


Hi,
I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8
of opensips-3.2.

I tested adding branches to an INVITE for a fixed size list of
AORs this way:

            $var(aors) = "sip:us...@test1.com
,sip:us...@test1.com
,sip:us...@test1.com
";

            seturi($(var(aors){s.select,0,,}));

            append_branch();
            seturi($(var(aors){s.select,1,,}));

            append_branch();
            seturi($(var(aors){s.select,2,,}));

            lookup("location", "r")

The above works fine and all 3 destinations resolved by AOR lookup
are called (max of contact per AOR).

However, in case of a a list of unknown size, I tried to use a
while loop like this:
            $var(aors) = "sip:us...@test1.com
,sip:us...@test1.com
,sip:us...@test1.com
";

            $var(idx) = 0;
            $var(aor) = $(var(aors){s.select,$var(idx),,});

            while($var(aor) != null) {
                seturi($var(aor));

                $var(idx) = $var(idx) + 1;
                $var(aor) = $(var(aors){s.select,$var(idx),,});
            }

            lookup("location", "r")

But with the above, only the last destination (lookup of
us...@test1.com ) is called.
I confirmed this is not related to the lookup function because I
tried with fixed destinations like this:

            $var(aors) = "sip:user1@10.0.0.1:5072
,sip:user2@10.0.0.1:5074
,sip:user3@10.0.0.1:5076
";

            $var(idx) = 0;
            $var(aor) = $(var(aors){s.select,$var(idx),,});

            while($var(aor) != null) {
                seturi($var(aor));

                $var(idx) = $var(idx) + 1;
                $var(aor) = $(var(aors){s.select,$var(idx),,});
            }

and the same problem happens: only the last destination
sip:user3@10.0.0.1:5076  is called.

So, is there a way to append a non-fixed number of branches to an
INVITE?

Regards,
Takeshi


Sorry, I think I did something wrong.
I was able to make append_branch to work inside a while loop.
So there is no problem.
Regards,
Takeshi


___
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] Dialplan/Routing

2022-10-10 Thread Bogdan-Andrei Iancu

Hi Nitesh,

The "420 Bad Extension" is generated by the residential cfg when the 
lookup on the caller fails (the caller party is not found as registered 
in OpenSIPS).


Now, I assume you are dialing kind of DID (to be routed to PSTN), so it 
should NOT hit the lookup (which is when calling to local subscribers). 
So you may dial something wrong. As per default residential cfg, the 
dialed number must start with `+` in order to be considered a PSTN 
destination.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/27/22 6:09 PM, Nitesh Divecha wrote:

Hello All,

I'm a newbie with Opensips! Got good knowledge with Asterisk and SIP 
in general.


Trying to figure out how to route calls out on the SIP trunk.

Running following:
"Server": "OpenSIPS (3.3.1 (x86_64/linux))"
OpenSIPS Control Panel 9.3.2
Debian 11

Opensips is configured with residential configuration and I can make 
the following:

1) local SIP to SIP calls (registered SIP endpoints).
2) External DID to Opensips to local SIP endpoint.

But failing to call out from the local SIP endpoint to SIP trunk 
(external). Every time I make a call I get SIP 420 Bad Extension.


I did follow all the instructions regarding Opensips-CP from 
(https://powerpbx.org/content/opensips-v30-debian-v10-mariadb-apache-v1 
) 
to setup SIP trunk, dial plan, dynamic routing and 
edit "opensips_residential.cfg" but failing to send the call out.


Any suggestions?

Thanking in advance.

Cheers,
Nite





___
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] Formating issue for string that contains pv

2022-10-10 Thread Liviu Chircu

On 10.10.2022 12:43, Serdar GUCLUER wrote:


In my situation, i want to format string which contains 
pseudo-variables. These string are stored in db and cached with 
"cache_table" module.


I tried it like that;

$avp(value) = $sql_cached_value(caching_name:column_name:key);
pv_printf($var(formatted_value), 
$sql_cached_value(caching_name:column_name:key));
xlog("L_INFO", "*** Value: $avp(value) | Formatted Value: $var(formatted_value) 
***");


Hi Serdar,

I remember that at some point, there was some support for string 
evaluation added as part of the {s.eval} transformation[1].  
Unfortunately, I don't recall an equivalent function, so you may have to 
play around with the transformation only.


[1]: https://www.opensips.org/Documentation/Script-Tran-3-4#s.eval

Best regards,

--
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com
OpenSIPS Summit 2022 Athens, Sep 27-30 |www.opensips.org/events
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Formating issue for string that contains pv

2022-10-10 Thread Serdar GUCLUER

Hi All,

In my situation, i want to format string which contains 
pseudo-variables. These string are stored in db and cached with 
"cache_table" module.


I tried it like that;

$avp(value) = $sql_cached_value(caching_name:column_name:key);
pv_printf($var(formatted_value), 
$sql_cached_value(caching_name:column_name:key));
xlog("L_INFO", "*** Value: $avp(value) | Formatted Value: $var(formatted_value) 
***");

but noting is changed,

*** Value: r-uri: $ru | Formatted Value:  r-uri: $ru ***

Where am i doing wrong?
Thanks in advance.

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


Re: [OpenSIPS-Users] Connect to AWS RDS database with SSL enabled

2022-10-10 Thread Bogdan-Andrei Iancu

Hi,

That;s a really bad example of how to hide trash beneath the carpet :(

The instructions on how to get a backtrace are simple and clear [1] - 
please consider doing this and helping back the project you are using.


[1] https://www.opensips.org/Documentation/TroubleShooting-Crash

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/27/22 5:12 AM, jacky z wrote:

Hi Ovidiu,

I solved this problem by hardcoding the cert address in the my_con.c 
address. Guess the cert setup in the config file can't be loaded 
correctly when my_con.c calls it.


On Tue, Sep 27, 2022 at 7:34 AM Ovidiu Sas > wrote:


I encountered a crash related to TLS connections and I was wondering
if it's a similar issue.
It seems not, the crash that I encountered happens only on 3.3.

If you installed opensips from a package, you need to install
opensips-dbg package to get the debug symbols.
After that, you can locate the core file on your server and
inspect it with gdb.
Everything should be detailed here:
https://www.opensips.org/Documentation/TroubleShooting-Crash


-ovidiu

On Mon, Sep 26, 2022 at 2:54 AM jacky z mailto:zjack0...@gmail.com>> wrote:
>
> Hi Ovidiu,
>
> The version I am using is 3.2. I am not familiar with the debug
symbols, but guess this can be reproduced easily. With
?tls_domain=dom1 attached after the mysql address, it happens. Can
you simply check if it is the same behavior? If not, I will dig
further by learning how to use the debug symbols. Thanks!
>
> On Mon, Sep 26, 2022 at 12:30 AM Ovidiu Sas
mailto:o...@voipembedded.com>> wrote:
>>
>> Which version of opensips are you using?
>> Can you install the debug symbols and get a backtrace from the
core file?
>> https://www.opensips.org/Documentation/TroubleShooting-Crash

>>
>> Regards,
>> Ovidiu Sas
>>
>> On Sun, Sep 25, 2022 at 6:32 AM jacky z mailto:zjack0...@gmail.com>> wrote:
>> >
>> > Hi Vlad,
>> >
>> > It seems opensips crashed when I set ?tls_domain=dom1 to
enable tls connection to mysql db.  I followed the method in the
manual.
>> >
>> > modparam("usrloc", "db_url",
"mysql://root:1234@localhost/opensips?tls_domain=dom1")
>> >
>> >
>> > Here is the log.
>> >
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:tls_mgm:mod_init: initializing TLS management
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:tls_mgm:init_tls_dom: Processing TLS domain 'dom'
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_mgm:init_tls_dom: no CA dir for tls 'dom' defined,
using default '/etc/pki/CA/'
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_mgm:init_tls_dom: no crl for tls, using none
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_openssl:openssl_init_tls_dom: No EC curve defined
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:tls_openssl:get_ssl_ctx_verify_mode: client verification NOT
activated. Weaker security.
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:tls_mgm:init_tls_dom: Processing TLS domain 'dom1'
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_mgm:init_tls_dom: no CA dir for tls 'dom1' defined,
using default '/etc/pki/CA/'
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_mgm:init_tls_dom: no crl for tls, using none
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
NOTICE:tls_openssl:openssl_init_tls_dom: No EC curve defined
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:tls_openssl:get_ssl_ctx_verify_mode: server verification NOT
activated. Weaker security.
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:proto_tls:mod_init: initializing TLS protocol
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:proto_bin:mod_init: initializing BIN protocol
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
INFO:clusterer:mod_init: Clusterer module - initializing
>> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]:
CRITICAL:core:sig_usr: segfault in attendant (starter) process!
>> > Sep 25 10:14:01 ip-10-100-20-35 kernel: [39023.653243]
opensips[4935]: segfault at 0 ip  sp
7ffececa3d08 error 14 in opensips[558b5bb75000+1c000]
>> > Sep 25 10:14:01 ip-10-100-20-35 kernel: [39023.666503] Code:
Bad RIP value.
>> > Sep 

[OpenSIPS-Users] Expires value - [ZVP-JQSVP-142]

2022-10-10 Thread Artem Fomenko via Users
Hello,

I'm Artem and configuring telephony system via OpenSIPS v3.1.9. In outgoing 
REGISTER request the "expires" parameter set according "expiry" value in 
"uac\_registrant" DB table. But in all subsequent REGISTERs "expires" value 
takes same as in 200 OK response on previous REGISTER request. Is it possible 
to configure OpenSIPS to use same "expiry" value for all subsequent REGISTER 
requests also?

Regards,

![LiveAgent](https://www.qualityunit.com/mail/mail-logo-la.png) **Artem 
Fomenko**

**Development Team**

+421 2 33 456 826 (EU  Worldwide)

+1-888-257-8754 (USA  Canada)

[www.liveagent.com](https://www.liveagent.com/)

  

**How 
nice was my reply?**

  [![1](https://www.qualityunit.com/mail/mail-star-1.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=1)
 [![2](https://www.qualityunit.com/mail/mail-star-2.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=2)
 [![3](https://www.qualityunit.com/mail/mail-star-3.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=3)
 [![4](https://www.qualityunit.com/mail/mail-star-4.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=4)
 [![5](https://www.qualityunit.com/mail/mail-star-5.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=5)
 [![6](https://www.qualityunit.com/mail/mail-star-6.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=6)
 [![7](https://www.qualityunit.com/mail/mail-star-7.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=7)
 [![8](https://www.qualityunit.com/mail/mail-star-8.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=8)
 [![9](https://www.qualityunit.com/mail/mail-star-9.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=9)
 [![10](https://www.qualityunit.com/mail/mail-star-10.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=10)
 **Rate the answer or view the ticket history 
[here](https://support.qualityunit.com/ticket_HGFe1uycDX9XkGp8)**

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


Re: [OpenSIPS-Users] OPENSIPS 3.2.8 msilo can't send offline message on Register

2022-10-10 Thread Bogdan-Andrei Iancu

Hi,

It looks to me you are trying to compare apples with pears :)

In the 3.1 test, the TCP connection was found as already existing, while 
in the 3.2 test no TCP conn was found and it is proceeding to opening a 
new one -> so, yeah, different cases, different logs :)


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/26/22 11:39 AM, jacky z wrote:

Hi Team,

We are testing Opensips 3.2.8 and found it can't send stored offline 
messages on register. Compared with 3.1, it doesn't look for the tcp 
con. Here are the comparisons between the logs of these two versions:


In 3.1, the existing con was looked and found and then the message was 
sent. Please refer to the texts in red.


Sep 26 08:09:56 opensips[11566]: DBG:tm:print_request_uri: 
sip:3293543...@sip.domain.com:5061 

Sep 26 08:09:56 opensips[11566]: DBG:tm:run_local_route: building 
sip_msg from buffer

Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: SIP Request:
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: method:  
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: uri:    
 >

Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: version: 
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: 
flags=
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_via_param: found param 
type 232,  = ; state=16
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_via: end of header 
reached, state=5
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: via found, 
flags=
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: this is the 
first via
Sep 26 08:09:56 opensips[11566]: DBG:core:_parse_to: end of header 
reached, state=9
Sep 26 08:09:56 opensips[11566]: DBG:core:_parse_to: display={}, 
ruri={sip:3293543...@sip.domain.com:5061 
}
Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field:  [38]; 
uri=[sip:3293543...@sip.domain.com:5061 
]
Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: to body 
[sip:3293543...@sip.domain.com:5061#015#012 
]
Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: cseq : 
<10> 

Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: content_length=28
Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: found end of 
header
Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: 
flags=

Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: flags=78
*Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: con found in 
state 0*
*Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: tcp 
connection found (0x7fd4544f8130), acquiring fd*
*Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: c= 
0x7fd4544f8130, n=16, Usock=89*
Sep 26 08:09:56 opensips[11571]: DBG:core:handle_worker: read 
response= 7fd4544f8130, 1, fd -1 from 9 (11566)
Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: after 
receive_fd: c= 0x7fd4544f8130 n=8 fd=118
Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:proto_tls_send: sending 
via fd 118...
Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:tls_update_fd: New fd 
is 118
Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:tls_write: write was 
successful (555 bytes)



In 3.2.8, it seems the tcp connection was not looked for or found. 
There is no tcp_conn_get as shown in the logs of 3.1, but reach the 
conclusion no tcp connection found. It seems something is missing.


Sep 26 08:18:33 opensips[3481]: DBG:tm:run_local_route: building 
sip_msg from buffer

Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: SIP Request:
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: method:  
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: uri:    
 mailto:sip%3a6989229...@sip.domain.com>>

Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: version: 
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: 
flags=
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_via_param: found param 
type 232,  = ; state=16
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_via: end of header 
reached, state=5
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: via found, 
flags=
Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: this is the 
first via
Sep 26 08:18:33 opensips[3481]: DBG:core:_parse_to: end of header 
reached, state=9
Sep 26 08:18:33 opensips[3481]: DBG:core:_parse_to: display={}, 
ruri={sip:6989229...@sip.domain.com 
}
Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field:  [32]; 
uri=[sip:6989229...@sip.domain.com 
]
Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: to body 
[sip:6989229...@sip.domain.com#015#012