Re: [OpenSIPS-Users] openSIPS with an AS that would handle the routing logic

2024-04-20 Thread Vlad Paiu

Hello,

Since OpenSIPS is a SIP server, I would try to leverage it's 
capabilities and communicate over SIP with the AS - that means scripting 
your way through.



On 20.04.2024 11:50, julien.royann...@orange.com wrote:


Hello everyone,

I'm reaching out to get your opinion on using openSIPS with a business 
Application Server (AS) that would handle the routing logic.


At first glance, the SEAS module seems designed for this purpose, but 
it doesn't appear to be a good fit as it seems highly coupled with a 
Sip Servlet implementation using a specific protocol only supported 
for WeSIP.


It might be better to use REST interfaces, a 302 redirect-based 
mechanism, or possibly another module.


Thank you for your insights & advice!

JR

Orange Restricted


Orange Restricted


Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

___
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] How to access to a column of a location database

2024-03-29 Thread Vlad Paiu

Hello,

You can use 
https://opensips.org/html/docs/modules/3.3.x/registrar.html#param_attr_avp 
in order to populate any custom info at save() time and the info will 
automatically be populated for you at lookup() time.



Regards,
Vlad


On 29.03.2024 15:08, guillaume.desgeo...@orange.com wrote:


Hi Bogdan,

Thank you for your answer.

And is it possible to use that lookup("location") function to put the 
“registered socket” field in a variable in order to use it for my script ?


Regards,

  Guillaume

*De :*Bogdan-Andrei Iancu 
*Envoyé :* jeudi 28 mars 2024 11:15
*À :* OpenSIPS users mailling list ; 
DESGEORGE Guillaume INNOV/IT-S 
*Objet :* Re: [OpenSIPS-Users] How to access to a column of a location 
database


*CAUTION*: This email originated outside the company. Do not click on 
any links or open attachments unless you are expecting them from the 
sender.


*ATTENTION*: Cet e-mail provient de l'extérieur de l'entreprise. Ne 
cliquez pas sur les liens ou n'ouvrez pas les pièces jointes à moins 
de connaitre l'expéditeur.




Hi Guillaume,

The registered contact (and the additional info) is fetched via the 
lookup("location") function. It also sets the registered socket for 
the routing the current request.


Regards,

Bogdan-Andrei Iancu
  
OpenSIPS Founder and Developer

   https://www.opensips-solutions.com
   https://www.siphub.com

On 22.03.2024 10:57, guillaume.desgeo...@orange.com wrote:

Hi everybody,

In my routing logic of my “opensips.cfg” file, I’m trying to
access the “socket” field of the location table of registered
contacts.

I have the registering informations correctly written in MySQL
location table but can’t find a function to access it.

I’d like to have a function which I give the registered username
and can give me back the associated socket.

Is the lookup () function the good one ? I didn’t understand how
to use it that way.

Thanks for your help,

   Guillaume

Orange Restricted

Orange Restricted




Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc

pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu 
ce message par erreur, veuillez le signaler

a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,

Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

  


This message and its attachments may contain confidential or privileged 
information that may be protected by law;

they should not be distributed, used or copied without authorisation.

If you have received this email in error, please notify the sender and 
delete this message and its attachments.

As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.

Thank you.



___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

___
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] Stir Shaken: Failed to load certificate

2022-11-21 Thread Vlad Patrascu

Hi Ryan,

You have to provide to the stir_shaken_auth() function the actual 
content of the certificate file and not just the path. The same goes for 
the private key.


Regards,

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

On 21.11.2022 14:02, ryan embgrets wrote:

Greetings

I am trying to generate an Identity header by using the stir_shaken 
module of the opensips.


But I am encountering the below error each time upon call.

Nov 21 11:15:20 local /usr/sbin/opensips[5051]: 
ERROR:stir_shaken:w_stir_verify: Failed to load certificate
Nov 21 11:15:20 local /usr/sbin/opensips[5051]: 
ERROR:stir_shaken:load_cert: Failed to parse certificate


#Module section.
loadmodule "stir_shaken.so"

route{

      $var(cert) = "/etc/opensips/certs.pem";
       $var(privKey) = "/etc/opensips/key.pem";
      stir_shaken_auth("A", "",$var(cert), $var(privKey), 
"https://domain.org/cert.pem";);

}

Though the cert looks valid, has proper permission for the opensips to 
access them and cross checked with openssl for the verification.


Any pointer on what might be causing this?

Ryan

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


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


Re: [OpenSIPS-Users] Load a DB Table to hash with MI control

2022-10-17 Thread Vlad Paiu

Hello,

Check out the sql_cacher [1] module.

[1] https://opensips.org/html/docs/modules/2.4.x/sql_cacher.html


Regards,
Vlad
On 17.10.2022 10:36, Antonis Psaras wrote:


Dear all

I am looking to implement a functionality similar to htable module 
were I will have a db table with some key values which will be loaded 
during service start and will expire every x sec or forced to be 
reloaded by MI. Using OpenSIPs 2.4


Any suggestion?

Best regards

*Antonis Psaras*


___
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] Check the User-Agent for registered user

2022-10-15 Thread Vlad Paiu

Hello,

At registration time you could save the User Agent in the attributes per 
registration [1] and at INVITE time you can check that in branch_route 
and make your decision there.


[1] 
https://opensips.org/html/docs/modules/3.2.x/registrar.html#param_attr_avp



Regards,
Vlad
On 14.10.2022 17:02, Callum Guy wrote:

Hi All,

I'm working on a project that requires me to evaluate the user agent 
of a registered contact before making a decision on a current 
registration attempt.


Is there a method to do this natively? If not, what is the best approach?

I haven't found anything yet, the current options i'm evaluating are to:

1. Use mi_script module to allow me to pull the contact record 
via ul_show_contact

2. Use rest_get to pull this data via a web service

Neither is ideal for my requirements but both would do the job, I'm 
hoping someone in the community has a cleaner solution before I start!


Best regards,

Callum



*^0333 332   | x-on.co.uk <https://www.x-on.co.uk>  | 
_**_^<https://www.linkedin.com/company/x-on> 
<https://www.facebook.com/XonTel> <https://twitter.com/xonuk> **^  | 
Coronavirus 
<https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm> **^  
| Practice Index Reviews <https://practiceindex.co.uk/gp/x-on> *


*Our new office address: 22 Riduna Park, Melton IP12 1QT.*

/THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade 
marks of the Comms Council UK, used under licence - 
https://commscouncil.uk/awards/


X-on is a trading name of Storacall Technology Ltd a limited company 
registered in England and Wales.
Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, 
Hampshire, England RG25 2AD. Company Registration No. 2578478.
The information in this e-mail is confidential and for use by the 
addressee(s) only. If you are not the intended recipient, please 
notify X-on immediately on +44(0)333 332  and delete the
message from your computer. If you are not a named addressee you must 
not use, disclose, disseminate, distribute, copy, print or reply to 
this email. Views or opinions expressed by an individual
within this email may not necessarily reflect the views of X-on or its 
associated companies. Although X-on routinely screens for viruses, 
addressees should scan this email and any attachments
for viruses. X-on makes no representation or warranty as to the 
absence of viruses in this email or any attachments.



___
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] Connect to AWS RDS database with SSL enabled

2022-09-19 Thread Vlad Patrascu

Hi Jacky,

I cant think of any workaround unfortunately.

Regards,

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

On 17.09.2022 18:46, jacky z wrote:

Hi  Vlad,

Is there any workaround to disable the client cert? Thanks!

On Wed, Sep 14, 2022 at 9:16 PM Vlad Patrascu  wrote:

Hi Jacky,

OpenSIPS will always require you to configure a client certificate
for TLS client domains and will also present that certificate when
connecting. But normally, a TLS server can simply choose not to
verify the client certificate. I don't have any experience with
AWS RDS though but it seems odd to not accept a connection only
because the client did present a certificate.

Regards,

-- 
    Vlad Patrascu

OpenSIPS Core Developer
http://www.opensips-solutions.com

On 14.09.2022 05:42, jacky z wrote:

Hi Bogdan-Andrei,

I checked the mariadb documentation and found mariadb has two
options to set ssl connection: two-way TSL and one-way TSL. It
seems AWS RDS only supports one-way TSL, that is, TSL is used
without a client cert. Does OPENSIPS support such one-way TSL to
connect a database? Thanks!

On Wed, Sep 14, 2022 at 12:06 AM jacky z  wrote:

Hi Bogdan-Andrei,

I have set the "certificate" and "private_key" in my script,
as I explained in method 1. However, AWS RDS doesn't support
a client cert. Please refer to

https://stackoverflow.com/questions/53760104/how-to-configure-x509-client-certificate-based-authentication-to-connect-to-aws

Is there any workaround to use the public cert list provided
by AWS? Anyone has successfully used RDS with SSL
connections? Thanks!

On Tue, Sep 13, 2022 at 9:54 PM Bogdan-Andrei Iancu
 wrote:

Set the certificate and key you have in the tls_mgm
module, for the "certificate" and "private_key" parameters.

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/13/22 2:57 PM, jacky z wrote:

Hi Bogdan-Andrei,

I tried two methods.

Method 1:

#enabled TLS connection:
modparam("db_mysql", "use_tls", 1)

#setup a client domain:
modparam("tls_mgm", "client_domain", "dom1")
modparam("tls_mgm", "match_ip_address", "[dom1]*")
modparam("tls_mgm", "match_sip_domain", "[dom1]*")
modparam("tls_mgm","certificate",
"[dom1]/etc/ssl/certs/rootCACert.pem")
modparam("tls_mgm","private_key",
"[dom1]/etc/ssl/private/rootCAKey.pem")
modparam("tls_mgm","ca_list",
"[dom1]/etc/ssl/certs/rootCACert.pem")
modparam("tls_mgm","tls_method", "[dom1]SSLv23")
modparam("tls_mgm","verify_cert", "[dom1]0")
modparam("tls_mgm","require_cert", "[dom1]0")
# set db_url
modparam("usrloc", "db_url",
"mysql://root:1234@/opensips?tls_domain=dom1")
...

I couldn't figure out how to use global-bundle.pem AWS
provided with this method. No luck to get a connection
with RDS. If I don't use ssl, opensips can connect to
RDS without encryption.

Method 2:

I tried

modparam("usrloc", "db_url",

"mysql://root:1234@/opensips?ssl=true&ssl_ca_certs=/etc/ssl/certs/global-bundle.pem")

to include the AWS cert. Still no luck.

Thanks!

On Tue, Sep 13, 2022 at 4:52 PM Bogdan-Andrei Iancu
 wrote:

Hi,

sorry for my silly question, but how do you connect
from the OpenSIPS side ??

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/13/22 10:41 AM, jacky z wrote:

Hi Team,

We hope to connect to aws RDS database with ssl
encryption. We have setup a client domain according
to OPENSIPS documents. However, AWS RDS does not
 

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

2022-09-14 Thread Vlad Patrascu

Hi Jacky,

OpenSIPS will always require you to configure a client certificate for 
TLS client domains and will also present that certificate when 
connecting. But normally, a TLS server can simply choose not to verify 
the client certificate. I don't have any experience with AWS RDS though 
but it seems odd to not accept a connection only because the client did 
present a certificate.


Regards,

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

On 14.09.2022 05:42, jacky z wrote:

Hi Bogdan-Andrei,

I checked the mariadb documentation and found mariadb has two options 
to set ssl connection: two-way TSL and one-way TSL. It seems AWS RDS 
only supports one-way TSL, that is, TSL is used without a client cert. 
Does OPENSIPS support such one-way TSL to connect a database? Thanks!


On Wed, Sep 14, 2022 at 12:06 AM jacky z  wrote:

Hi Bogdan-Andrei,

I have set the "certificate" and "private_key" in my script, as I
explained in method 1. However, AWS RDS doesn't support a client
cert. Please refer to

https://stackoverflow.com/questions/53760104/how-to-configure-x509-client-certificate-based-authentication-to-connect-to-aws

Is there any workaround to use the public cert list provided by
AWS? Anyone has successfully used RDS with SSL connections? Thanks!

On Tue, Sep 13, 2022 at 9:54 PM Bogdan-Andrei Iancu
 wrote:

Set the certificate and key you have in the tls_mgm module,
for the "certificate" and "private_key" parameters.

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/13/22 2:57 PM, jacky z wrote:

Hi Bogdan-Andrei,

I tried two methods.

Method 1:

#enabled TLS connection:
modparam("db_mysql", "use_tls", 1)

#setup a client domain:
modparam("tls_mgm", "client_domain", "dom1")
modparam("tls_mgm", "match_ip_address", "[dom1]*")
modparam("tls_mgm", "match_sip_domain", "[dom1]*")
modparam("tls_mgm","certificate",
"[dom1]/etc/ssl/certs/rootCACert.pem")
modparam("tls_mgm","private_key",
"[dom1]/etc/ssl/private/rootCAKey.pem")
modparam("tls_mgm","ca_list",
"[dom1]/etc/ssl/certs/rootCACert.pem")
modparam("tls_mgm","tls_method", "[dom1]SSLv23")
modparam("tls_mgm","verify_cert", "[dom1]0")
modparam("tls_mgm","require_cert", "[dom1]0")
# set db_url
modparam("usrloc", "db_url",
"mysql://root:1234@/opensips?tls_domain=dom1")
...

I couldn't figure out how to use global-bundle.pem AWS
provided with this method. No luck to get a connection with
RDS. If I don't use ssl, opensips can connect to RDS without
encryption.

Method 2:

I tried

modparam("usrloc", "db_url",

"mysql://root:1234@/opensips?ssl=true&ssl_ca_certs=/etc/ssl/certs/global-bundle.pem")

to include the AWS cert. Still no luck.

Thanks!

On Tue, Sep 13, 2022 at 4:52 PM Bogdan-Andrei Iancu
 wrote:

Hi,

sorry for my silly question, but how do you connect from
the OpenSIPS side ??

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/13/22 10:41 AM, jacky z wrote:

Hi Team,

We hope to connect to aws RDS database with ssl
encryption. We have setup a client domain according to
OPENSIPS documents. However, AWS RDS does not support
client cert as someone has confirmed with AWS

https://stackoverflow.com/questions/53760104/how-to-configure-x509-client-certificate-based-authentication-to-connect-to-aws

Is there any way to use the cert provided by AWS to
connect? AWS provides a global-bundle.pem

(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
for such a connection, but we don't know how to include
it in the config file.

Thanks

Jacky z

___
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] About obstacles to implement the matched Id in event

2022-08-18 Thread Vlad Patrascu

Hi Li,

In 2.4 I think the only way is to use the same cachedb_local storage for 
everything you need to pass around.


Regards,

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

On 18.08.2022 16:59, Li Cai wrote:

Hi Vlad,

Thank you very much for the suggestion. Sorry that I didn't mention our 
OpenSIPs version, we're with 2.4 which doesn't provide exported pseudo 
variables. Can I ask if there is similar way to do so in V2.4?


Thanks,
Li

-Original Message-
From: Users  On Behalf Of 
users-requ...@lists.opensips.org
Sent: August 17, 2022 3:29 AM
To: users@lists.opensips.org
Subject: Users Digest, Vol 169, Issue 25


WARNING: External Email: Exercise Caution

Send Users mailing list submissions to
 users@lists.opensips.org

To subscribe or unsubscribe via the World Wide Web, visit
 
https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7Cli.cai%40comtech.com%7C502ac1e5f328416b934908da80223535%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637963181666956869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eN7ZRHTe3r03mOVKSiQdmxv8EEwIm7QS957iAccxudA%3D&reserved=0
or, via email, send a message with subject or body 'help' to
 users-requ...@lists.opensips.org

You can reach the person managing the list at
 users-ow...@lists.opensips.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

1. Re: About obstacles to implement the matched Id in event
   header of NOTIFY(REFER) (Vlad Patrascu)
2. Re: Bug on TLS Management Interface (Bogdan-Andrei Iancu)


--

Message: 1
Date: Tue, 16 Aug 2022 22:19:10 +0300
From: Vlad Patrascu 
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] About obstacles to implement the matched
 Id in event header of NOTIFY(REFER)
Message-ID: <91e7202d-ac0f-9ab3-252e-49640130a...@opensips.org>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi Li,

For passing around data between the b2b request route and local_route, in the 
context of an ongoing B2B session, you can use the $b2b_logic.ctx variable[1]. 
That would take care of transferring the Cseq from step 1 to step 2 and the id 
from step 3 to step 4.

As for your cseq map, you can use the cachedb_local module, and maybe the 
$b2b_logic.key variable alongside Cseq2 for building a proper key.

[1] 
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Fdocs%2Fmodules%2F3.3.x%2Fb2b_logic.html%23b2b_logic.key&data=05%7C01%7Cli.cai%40comtech.com%7C502ac1e5f328416b934908da80223535%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637963181666956869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6QxyCjy0NEZoKBkpyy2VYKakriwsEg6xrt%2FSV%2BisERk%3D&reserved=0

Regards,

--
Vlad Patrascu
OpenSIPS Core Developer
https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7Cli.cai%40comtech.com%7C502ac1e5f328416b934908da80223535%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637963181666956869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dA%2Fa%2BWYy3xqc9qAGN3koDHWwBn5rWC1gRxG6PM5OebM%3D&reserved=0

On 22.07.2022 23:02, Li Cai wrote:

Hi experts,

I'm working on the implementation for '2.4.6 Multiple REFER Requests
in a Dialog' of RFC3515 in a B2B SIP Proxy. Right now, I got stuck
with two problems in the solution. Please see the paragraph from RFC-

A REFER creates an implicit subscription sharing the dialog

identifiers in the REFER request.  If more than one REFER is issued

in the same dialog (a second attempt at transferring a call for

example), the dialog identifiers do not provide enough information to

associate the resulting NOTIFYs with the proper REFER.

Thus, for the second and subsequent REFER requests a UA receives in
a

given dialog, it MUST include an id parameter[2] in the Event
header

field of each NOTIFY containing the sequence number (the number
from

the CSeq header field value) of the REFER this NOTIFY is associated

with. This id parameter MAY be included in NOTIFYs to the first

REFER a UA receives in a given dialog.  A SUBSCRIBE sent to refresh

or terminate this subscription MUST contain this id parameter.

Different from the definition in RFC, the NOTIFY forwarded by the
proxy contains the same Id in Event header as the other side. Please
see the below chart -

B2BProxy

|

 <- REFER 2 (Cseq=2) |

Re: [OpenSIPS-Users] About obstacles to implement the matched Id in event header of NOTIFY(REFER)

2022-08-16 Thread Vlad Patrascu

Hi Li,

For passing around data between the b2b request route and local_route, 
in the context of an ongoing B2B session, you can use the $b2b_logic.ctx 
variable[1]. That would take care of transferring the Cseq from step 1 
to step 2 and the id from step 3 to step 4.


As for your cseq map, you can use the cachedb_local module, and maybe 
the $b2b_logic.key variable alongside Cseq2 for building a proper key.


[1] https://opensips.org/docs/modules/3.3.x/b2b_logic.html#b2b_logic.key

Regards,

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

On 22.07.2022 23:02, Li Cai wrote:


Hi experts,

I’m working on the implementation for ‘2.4.6 Multiple REFER Requests 
in a Dialog’ of RFC3515 in a B2B SIP Proxy. Right now, I got stuck 
with two problems in the solution. Please see the paragraph from RFC-


   A REFER creates an implicit subscription sharing the dialog

identifiers in the REFER request.  If more than one REFER is issued

   in the same dialog (a second attempt at transferring a call for

example), the dialog identifiers do not provide enough information to

associate the resulting NOTIFYs with the proper REFER.

   Thus, for the second and subsequent REFER requests a UA receives in a

   given dialog, it MUST include an id parameter[2] in the Event header

   field of each NOTIFY containing the sequence number (the number from

   the CSeq header field value) of the REFER this NOTIFY is associated

   with. This id parameter MAY be included in NOTIFYs to the first

   REFER a UA receives in a given dialog.  A SUBSCRIBE sent to refresh

   or terminate this subscription MUST contain this id parameter.

Different from the definition in RFC, the NOTIFY forwarded by the 
proxy contains the same Id in Event header as the other side. Please 
see the below chart –


   B2BProxy

   |

<- REFER 2 (Cseq=2) |  <-REFER 1 
 (Cseq=1003)


   . . .  | . . .

->NOTIFY 1 (event:*id=2*) |  ->NOTIFY 2 (_event*:id=2*)_

The current problem is, the above NOTIFY on the right side should 
_include ‘id=1003’ instead of ‘id=2’_.


The solution I’m trying is as in the following flow –

  1. get CSeq 1 of REFER 1 in route[b2b_request]{}  ->

  2. get CSeq 2 of REFER 2 in local_route{},  then save 
the pair(key=CSeq2, value=CSeq1) in a map set->


  3. get Id  from NOTIFY 1 event in route[b2b_request]{}  ->

  4. use Id  as key then get matched CSeq1 from the map 
set, use remove_hf() and append_hf() to modify the event header in 
local_route{}


My two questions are:

 1. To transfer Cseq 1 from step1 to step2, I tried a variable in the
AVP type but it didn’t work. The script variable can work but it
doesn’t fit because the processing is based on per request.  Can I
ask if you have any suggest on how to transfer the value from
route[b2b_request]{} to local_route{}?
 2. In the step2, I tried to create and operate a JSON map set to save
the CSeq pairs. But the JSON data didn’t work for me.

    My source :

$json(csList) = ””;   # 
Initialize the data set, not sure if it’s correct


$json(csList/”$cs”) = “$avp(csNum)”;

    The error I got:

ERROR:core:do_assign: setting PV failed

ERROR:core:do_assign: error at /usr/local//et/opensips/opensips.cfg:531

Thank you very much for the help! Any your suggests are very welcomed.

Thanks,

Li

NOTICE TO RECIPIENT: This email, including attachments, may contain 
information which is confidential, proprietary, attorney-client 
privileged and / or controlled under U.S. export laws and regulations 
and may be restricted from disclosure by applicable State and Federal 
law. Nothing in this email shall create any legal binding agreement 
between the parties unless expressly stated herein and provided by an 
authorized representative of Comtech Telecommunications Corp. or its 
subsidiaries. If you are not the intended recipient of this message, 
be advised that any dissemination, distribution, or use of the 
contents of this message is strictly prohibited. If you received this 
message in error, please notify us immediately by return email and 
permanently delete all copies of the original email and any attached 
documentation from any computer or other media.


___
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] [Blog] MSRP Gateway

2022-06-09 Thread Vlad Patrascu

Hi all,

OpenSIPS 3.3 introduces a new MSRP gateway module, which translate 
between Page Mode (SIP MESSAGE method) and Session Mode (MSRP) 
Messaging. Read more about this in the following blog post:


https://blog.opensips.org/2022/06/09/msrp-gateway/

Enjoy,

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


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


Re: [OpenSIPS-Users] Stir Shaken Verification issue

2022-05-02 Thread Vlad Patrascu

Hi Devang,

The URL in the info param has nothing to do with the verification itself.

I suspect you are somehow not using the proper certificate and/or CA, as 
the certificate generated by the script you mentioned should not be self 
signed, as the error indicates.


Regards,

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

On 25.04.2022 15:47, Devang Dhandhalya via Users wrote:

Hello All
I am testing STIR/SHAKEN calls using two servers.
calls originating to the first server adding identity header and when 
sending calls to the second server for verification service at the 
time of verification service i am getting below error .
error :437 , Unsupported Credential , Verification Fails with Return 
code :-8 INFO:stir_shaken:verify_callback: certificate validation 
failed: self signed certificate INFO:stir_shaken:w_stir_verify: 
Invalid certificate
OpenSIPS Version : 3.2.2 I generate certificate using domain which 
mapped with those 2 server : 
https://github.com/OpenSIPIt/OpenSIPIt_00/blob/master/STIR_SHAKEN/Certgen/gencert.sh 
<https://github.com/OpenSIPIt/OpenSIPIt_00/blob/master/STIR_SHAKEN/Certgen/gencert.sh>
When the same server generates an identity header and verifies it at 
that time not getting an issue call is working fine but when the 
identity header generated by server 1 and going to verify it by server 
2 we get this above error.
Is it related to the URL which is in the info param ? When I open that 
URL in the browser I am able to see the certificate.

Please suggest a solution for this issue.
Regards
Devang Dhandhalya

*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely 
those of the originator and do not necessarily represent those of the 
Company or its sister concerns. Any liability (in negligence, contract 
or otherwise) arising from any third party taking any action, or 
refraining from taking any action on the basis of any of the 
information contained in this email is hereby excluded.


*Confidentiality*
This communication (including any attachment/s) is intended only for 
the use of the addressee(s) and contains information that is 
PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, 
distribution, or copying of this communication is prohibited. Please 
inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any attachments, may not be free of 
viruses, trojans, similar or new contaminants/malware, interceptions 
or interference, and may not be compatible with your systems. You 
shall carry out virus/malware scanning on your own before opening any 
attachment to this e-mail. The sender of this e-mail and Company 
including its sister concerns shall not be liable for any damage that 
may incur to you as a result of viruses, incompleteness of this 
message, a delay in receipt of this message or any other computer 
problems.


___
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] is_from_gw() DNS Names

2022-03-01 Thread Vlad Patrascu

Hi Mark,

We are aware of this limitation with wolfssl, and do plan to address it 
somehow but we have not found a straight-forward solution yet. Keep an 
eye on the feature request Ovidiu mentioned.


Regards,

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

On 28.02.2022 10:50, Mark Farmer wrote:

Thanks Ovidiu, that is great information.

I am using wolfssl as that seems to be the way to go these days.
I wonder given the rising popularity of Direct Routing if it would be 
possible/sensible to have wolfsssl populate the $tls_peer_subject_cn 
variable in the future?


Mark.





On Fri, 25 Feb 2022 at 17:32, Ovidiu Sas  wrote:

With MS, you can authenticate based on $tls_peer_subject_cn. This
works ok with openssl but not with wolfssl. When wolfssl is using
session tickets to establish new connections, the $tls_peer_subject_cn
is not populated.
Another alternative is to perform a lookup for each request received
over a tls connection using the ip.resolve transformation and enable
dbs_cache to help a little bit. It's messy but it works.

-ovidiu

On Fri, Feb 25, 2022 at 6:51 AM Mark Farmer  wrote:
>
> Thanks Bogdan
>
> It's no secret really, I was just speaking generically.
> They are the MS Direct Routing domains, EG
sip.pstnhub.microsoft.com <http://sip.pstnhub.microsoft.com>
>
> Mark.
>
>
>
> On Tue, 22 Feb 2022 at 12:50, Bogdan-Andrei Iancu
 wrote:
>>
>> Hi Mark,
>>
>> You say the DNS is publishing only one IP for the domain, but
one may change ? If you want, you can PM me the actual domain to
see how the DNS records looks like.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>> https://www.opensips-solutions.com
>> OpenSIPS eBootcamp
>> https://www.opensips.org/Training/Bootcamp
>>
>> On 2/22/22 12:31 PM, Mark Farmer wrote:
>>
>> Hi Bogdan
>>
>> The GW's have 2 CNAME records which I have no control over. DR
has entries like subdomain.example.com:5061
<http://subdomain.example.com:5061>
>> I suspect the issue arises when the CNAMES swap around
resulting in a mismatch.
>>
>> Currently I am using this to identify the source of the message
which is probably not the best in terms of security.
>>
>> $avp(fd) = "subdomain.example.com <http://subdomain.example.com>";
>> if($(ct.fields(uri){s.index, $avp(fd)}) != NULL)
>>
>> Perhaps there is a better way?
>>
>> Best regards
>> Mark.
>>
>>
>>
>> On Tue, 22 Feb 2022 at 08:56, Bogdan-Andrei Iancu
 wrote:
>>>
>>> Hi Mark,
>>>
>>> If a gw is defined via FQDN, that will by DNS resolved (NAPTR,
SRV, A records) when DB data is (re)loaded by DR module, and used
later for such checks. All found IPs (from DNS) will be stored on
the GW.
>>>
>>> How do you specify the GW address in DB and what kind of DNS
records do you have for it ?
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>> https://www.opensips-solutions.com
>>> OpenSIPS eBootcamp
>>> https://www.opensips.org/Training/Bootcamp
>>>
>>> On 2/18/22 6:04 PM, Mark Farmer wrote:
>>>
>>> Hi everyone
>>>
>>> I am using is_from_gw() to match against a group of gateways
specified by DNS names which resolve to multiple IP addresses but
it seems to be failing to match.
>>>
>>> Is this supported functionality or do I need to do something
else in this case?
>>>
>>> Thanks and regards
>>> Mark.
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>> Mark Farmer
>> farm...@gmail.com
>>
>>
>
>
> --
> Mark Farmer
> farm...@gmail.com
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
VoIP Embedded, Inc.

http://www.voipembedded.com

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



--
Mark Farmer
farm...@gmail.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] Managing the implicit subscription and its NOTIFYs within B2BUA REFER handling

2022-01-28 Thread Vlad Patrascu

Hi Jeff,

You can use proxy commands for different traffic flows but keep in mind 
that once you trigger a B2B session in the main request route (with the 
b2b_init_request() function), you will only see the rest of the B2B 
related traffic in the dedicated routes. In those routes it is 
recommended to not use proxy-like signaling functions.


Regards,

Vlad

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

On 28.01.2022 17:30, Jeff Pyle wrote:
Great.  Is it still recommended to keep a particular OpenSIPS instance 
either all proxy commands or all B2B commands?  Or, do we have some 
flexibility to mix them since B2B commands live in the script now?



- Jeff


On Wed, Jan 26, 2022 at 9:50 AM Vlad Patrascu  wrote:

Hi Jeff,

Sending NOTIFYs is supported by using the "n" flag for the
b2b_bridge() [1] function. Just note that some mechanisms from RFC
3515 2.4.4
<https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4> are
not implemented though, such as the ability to terminate the
subscription prematurely by unsubscribing or refreshing the
subscription.

[1]
https://opensips.org/docs/modules/3.2.x/b2b_logic.html#func_b2b_bridge

Regards,

-- 
Vlad Patrascu

OpenSIPS Core Developer
http://www.opensips-solutions.com

On 24.01.2022 17:38, Jeff Pyle wrote:

OpenSIPS 3.2 supports some slick in-script B2B functions,
documented here [1] with an example for handling REFER.  Does
this approach include support for the subscription and the
subsequent NOTIFYs required by RFC 3515 2.4.4 [2]
<https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4>?

I have a need to write some REFER handling functions into an
existing OpenSIPS SBC stack, and I need to send accurate NOTIFYs
back to the REFER-er. Terminating the subscription with the first
NOTIFY isn't good enough, sadly.  I'm hoping this is the right
way to do it.

  [1]
https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2#toc10
  [2] https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4


- Jeff


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

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


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


Re: [OpenSIPS-Users] Managing the implicit subscription and its NOTIFYs within B2BUA REFER handling

2022-01-26 Thread Vlad Patrascu

Hi Jeff,

Sending NOTIFYs is supported by using the "n" flag for the b2b_bridge() 
[1] function. Just note that some mechanisms from RFC 3515 2.4.4 
<https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4> are not 
implemented though, such as the ability to terminate the subscription 
prematurely by unsubscribing or refreshing the subscription.


[1] https://opensips.org/docs/modules/3.2.x/b2b_logic.html#func_b2b_bridge

Regards,

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

On 24.01.2022 17:38, Jeff Pyle wrote:
OpenSIPS 3.2 supports some slick in-script B2B functions, documented 
here [1] < [1] 
https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2#toc10> with 
an example for handling REFER.  Does this approach include support for 
the subscription and the subsequent NOTIFYs required by RFC 3515 2.4.4 
[2] <https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4>?


I have a need to write some REFER handling functions into an existing 
OpenSIPS SBC stack, and I need to send accurate NOTIFYs back to the 
REFER-er.  Terminating the subscription with the first NOTIFY isn't 
good enough, sadly.  I'm hoping this is the right way to do it.


  [1] https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2#toc10 
<https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2#toc10>
  [2] https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4 
<https://datatracker.ietf.org/doc/html/rfc3515#section-2.4.4>



- Jeff


___
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] Python and avp

2022-01-18 Thread Vlad Patrascu

Hi Alberto,

You should be able to call any opensips script function from the python 
code, including pv_printf() as suggested in #1893, by using the 
/call_function()/ method [1]. This has been made possible from 3.1 
onwards, but indirectly, by porting all opensips core functions to the 
same calling interface as module functions.


[1] https://opensips.org/docs/modules/3.2.x/python.html#overview

Regards,

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

On 17.01.2022 20:14, Alberto wrote:

Hi,

I'm using opensips 3.4 and I'm looking to set avp variables from a 
python script, looking at 
https://github.com/OpenSIPS/opensips/issues/1893 
<https://github.com/OpenSIPS/opensips/issues/1893> seems this feature 
was available from after 3.0.

Is there any documentation on how to do it?

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


Re: [OpenSIPS-Users] Compiliing issue OpenSIPS 3.2.4 - WolfSSL on Debian 11

2022-01-18 Thread Vlad Patrascu

Hi Eugen,

You probably just need to update the wolfssl git submodule, do:

make clean

git submodule update --init

Regards,

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

On 18.01.2022 15:50, Eugen Prieb via Users wrote:

Hello,

i have a problem with compiling OpenSIPS 3.2.4 on Debian 11. Issue is 
on WolfSSL compiling...


make[1]: Entering directory '/usr/src/opensips/modules/tls_wolfssl'
Compiling wolfssl.c
wolfssl.c: In function ‘oss_mutex_cb’:
wolfssl.c:140:7: error: ‘WOLFSSL_USER_MUTEX_INIT’ undeclared (first 
use in this function)

  140 |  case WOLFSSL_USER_MUTEX_INIT:
  |   ^~~
wolfssl.c:140:7: note: each undeclared identifier is reported only 
once for each function it appears in
wolfssl.c:141:4: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

  141 |   m->mutex = lock_alloc();
  |    ^~
wolfssl.c:142:9: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

  142 |   if (!m->mutex || !lock_init(m->mutex)) {
  | ^~
wolfssl.c:142:32: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has 
no member named ‘mutex’

  142 |   if (!m->mutex || !lock_init(m->mutex)) {
  |    ^~
wolfssl.c:147:7: error: ‘WOLFSSL_USER_MUTEX_FREE’ undeclared (first 
use in this function)

  147 |  case WOLFSSL_USER_MUTEX_FREE:
  |   ^~~
In file included from wolfssl.c:34:
wolfssl.c:149:17: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has 
no member named ‘mutex’

  149 |   lock_dealloc(m->mutex);
  | ^~
../../mem/shm_mem.h:513:38: note: in definition of macro ‘shm_free’
  513 | #define shm_free( _ptr ) _shm_free( (_ptr), \
  |  ^~~~
wolfssl.c:149:3: note: in expansion of macro ‘lock_dealloc’
  149 |   lock_dealloc(m->mutex);
  |   ^~~~
wolfssl.c:150:4: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

  150 |   m->mutex = NULL;
  |    ^~
wolfssl.c:152:7: error: ‘WOLFSSL_USER_MUTEX_LOCK’ undeclared (first 
use in this function)

  152 |  case WOLFSSL_USER_MUTEX_LOCK:
  |   ^~~
In file included from ../../mem/shm_mem.h:50,
 from wolfssl.c:34:
wolfssl.c:153:13: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has 
no member named ‘mutex’

  153 |   lock_get(m->mutex);
  | ^~
../../mem/../lock_ops.h:93:34: note: in definition of macro ‘lock_get’
   93 |  #define lock_get(lock) get_lock(lock)
  |  ^~~~
wolfssl.c:155:7: error: ‘WOLFSSL_USER_MUTEX_UNLOCK’ undeclared (first 
use in this function)

  155 |  case WOLFSSL_USER_MUTEX_UNLOCK:
  |   ^
In file included from ../../mem/shm_mem.h:50,
 from wolfssl.c:34:
wolfssl.c:156:17: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has 
no member named ‘mutex’

  156 |   lock_release(m->mutex);
  | ^~
../../mem/../lock_ops.h:90:41: note: in definition of macro 
‘lock_release’

   90 | #define lock_release(lock) release_lock(lock)
  | ^~~~
wolfssl.c: In function ‘mod_init’:
wolfssl.c:172:2: warning: implicit declaration of function 
‘wolfSSL_SetUserMutexCb’; did you mean ‘wolfSSL_SetHsDoneCb’? 
[-Wimplicit-function-declaration]

  172 |  wolfSSL_SetUserMutexCb(oss_mutex_cb);
  |  ^~
  |  wolfSSL_SetHsDoneCb
make[1]: *** [../../Makefile.rules:28: wolfssl.o] Error 1
make[1]: Leaving directory '/usr/src/opensips/modules/tls_wolfssl'
make: *** [Makefile:197: modules] Error 2-

maili

--
Eugen P.


___
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] STIR/SHAKEN E.164 strict mode module parameter not working .

2021-11-23 Thread Vlad Patrascu

Hello Devang,

The cache_fetch() functions returns -2 when the key is not found so it's 
normal when getting the certificate the first time.


STIR/SHAKEN requires that the certificates have the TnAuthList 
extension. You can check out some examples on how to generate such 
certificates in this document [1] at Appendix A or this script [2].


[1] 
https://cstga.ca/wp-content/uploads/2020/07/ATIS-180.v002_SHAKEN-Governance-Model.pdf


[2] 
https://github.com/OpenSIPIt/OpenSIPIt_00/blob/master/STIR_SHAKEN/Certgen/gencert.sh


Regards,

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

On 22.11.2021 14:41, Devang Dhandhalya wrote:

Hello Vlad

Authentication service works fine. Now I am getting an error in the 
stir_shaken_verify function , after fetching a certificate, I am 
getting below error . I generated private keys and X509 certificates 
using prime256v1" EC.
After fetching the certificate I am getting var(found) = -2 can you 
please tell me about this too .


OpenSIPS Logs :
*
*
*var(found) = [-2]
INFO:stir_shaken:validate_certificate: The certificate is missing the 
TnAuthList extension

INFO:stir_shaken:w_stir_verify: Invalid certificate
return code : [-8] stir_shaken_verify() failed:437, Unsupported Credential
*
below opensips script snippet :

$var(found) = cache_fetch("local",$identity(x5u),$var(cert));


if (!$var(found) || !stir_shaken_check_cert("$var(cert)")) {
rest_get("$identity(x5u)",$var(cert),$var(ctype), $var(http_rc));
                        if ($rc<0 ) {
                                send_reply(436, "Bad Identity Info");
                                exit;
                        }
cache_store("local", $identity(x5u),"$var(cert)");
                }


$var(rc_verify)= stir_shaken_verify($var(cert), 
$var(err_sip_code),$var(err_sip_reason),"$var(orig)","$var(dest)");

                if ($var(rc_verify) < 0) {

                        send_reply( 
$var(err_sip_code),$var(err_sip_reason));

                        exit;
                }

Kindly inform me why I am getting this error . Please suggest a 
solution to this .



Regards
Devang Dhandhalya


On Fri, Nov 19, 2021 at 3:16 PM Devang Dhandhalya 
mailto:devang.dhandha...@ecosmob.com>> 
wrote:


Hello Vlad

Thanks for your response . Authentication service works .

Regards ,
Devang Dhandhalya

On Wed, Nov 17, 2021 at 8:57 PM Devang Dhandhalya
mailto:devang.dhandha...@ecosmob.com>> wrote:

hello all


Above E.164 Error still getting .Right now I'm getting the below error .
Can anyone tell me why I am getting this error ? as far as i know this
error for x5u parameter in stir_shaken_auth function , this issue coming
for certificate path or certificate file format .


I check the certificate file with .der and .cer format also .

Here is the code snippet used .


$var(rc_auth)=stir_shaken_auth("A",
"GWID-123456","$var(cert)",
"$var(pkey)","http://localhost/certificate.pem
<http://localhost/certificate.pem>","$var(orig)","$var(dest)");

Below Error i am getting .


ERROR:stir_shaken:add_identity_hf: Failed to convert from DER to 
internal format

ERROR:stir_shaken:w_stir_auth: Failed to add Identity header

STIR_SHAKEN AUTHENTICATION SERVICE  return code : -1

Kindly let me know if there is something wrong that I could be
doing. Many Thanks Devang Dhandhalya


On Wed, Nov 17, 2021 at 11:37 AM Devang Dhandhalya
mailto:devang.dhandha...@ecosmob.com>> wrote:

Hi All

I configured the e164 strict mode module parameter as 0
(disabled) . but still i am getting errors related to its
e164 format .While if orig/dest number is not in e164
format then also opensips have to accept it but it is not
accepting .  I have a user like extension123 for this
function I have to perform authentication service . if i
have a user extension123 is it possible to perform
authenticate service for this kind of user ?

I think this is a bug for the e164 strict mode  module
parameter . I am getting the below error .

opensips version : 3.2.2

ERROR :
 ERROR:stir_shaken:check_passport_phonenum: number is not
in E.164 format: extension123
 ERROR:stir_shaken:w_stir_auth: failed to validate
Originator number (extension123)


loadmodule "stir_shaken.so"
modparam("stir_shaken", "auth_date_freshness", 300)
modparam("stir_shaken", "verify_date_freshness", 300)
modpar

Re: [OpenSIPS-Users] TLS Handshake fail issue

2021-11-18 Thread Vlad Patrascu

Hi Devang,

The tls_mgm module configuration looks OK. Have you also tried to 
connect with openssl s_client to the TLS endpoint?


Regards,

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

On 17.11.2021 10:33, Devang Dhandhalya wrote:

Hello Bogdan

 I Just casually write , My intention was not rude or anything else , 
still it's my bad if any one feeling hurts .


as you say the party you are trying to connect to (1.2.3.4:40945 
<http://1.2.3.4:40945/>) is not accepting your connection. i check 
that but can you please tell me what type of thing i have to check . 
means from opensips side or blink user configuration i have add tls 
certificate also in user configuration .


In the opensips module parameter any configuration wrong for TLS 
service ?


Many Thanks
Devang

*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely 
those of the originator and do not necessarily represent those of the 
Company or its sister concerns. Any liability (in negligence, contract 
or otherwise) arising from any third party taking any action, or 
refraining from taking any action on the basis of any of the 
information contained in this email is hereby excluded.


*Confidentiality*
This communication (including any attachment/s) is intended only for 
the use of the addressee(s) and contains information that is 
PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, 
distribution, or copying of this communication is prohibited. Please 
inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any attachments, may not be free of 
viruses, trojans, similar or new contaminants/malware, interceptions 
or interference, and may not be compatible with your systems. You 
shall carry out virus/malware scanning on your own before opening any 
attachment to this e-mail. The sender of this e-mail and Company 
including its sister concerns shall not be liable for any damage that 
may incur to you as a result of viruses, incompleteness of this 
message, a delay in receipt of this message or any other computer 
problems.


___
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] STIR/SHAKEN E.164 strict mode module parameter not working .

2021-11-18 Thread Vlad Patrascu

Hi Devang,

The error:

ERROR:stir_shaken:add_identity_hf: Failed to convert from DER to internal format

may be a bit misleading as the private key and certificate must be 
provided in PEM format to the stir_shaken_auth() function. The DER 
format that the error refers to is used only internally, for an 
intermediary step. On the other hand, you may get the same error if the 
private key is not generated as an "prime256v1" EC key.


Regarding the e164_strict_mode module parameter, the orig/dest number 
should still be in E.164 format, except the leading '+' sign, which is 
not required when the parameter is turned off. The parameter is also 
related to the type of URI required (tel URI / sip URI with the 
"user=phone" parameter).


Regards,

Vlad

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

On 17.11.2021 17:27, Devang Dhandhalya wrote:

hello all


Above E.164 Error still getting .Right now I'm getting the below error .
Can anyone tell me why I am getting this error ? as far as i know this
error for x5u parameter in stir_shaken_auth function , this issue coming
for certificate path or certificate file format .


I check the certificate file with .der and .cer format also .

Here is the code snippet used .


$var(rc_auth)=stir_shaken_auth("A", "GWID-123456","$var(cert)", 
"$var(pkey)","http://localhost/certificate.pem 
<http://localhost/certificate.pem>","$var(orig)","$var(dest)");


Below Error i am getting .


ERROR:stir_shaken:add_identity_hf: Failed to convert from DER to internal format

ERROR:stir_shaken:w_stir_auth: Failed to add Identity header

STIR_SHAKEN AUTHENTICATION SERVICE  return code : -1

Kindly let me know if there is something wrong that I could be doing. 
Many Thanks Devang Dhandhalya



On Wed, Nov 17, 2021 at 11:37 AM Devang Dhandhalya 
mailto:devang.dhandha...@ecosmob.com>> 
wrote:


Hi All

I configured the e164 strict mode module parameter as 0 (disabled)
. but still i am getting errors related to its e164 format .While
if orig/dest number is not in e164 format then also opensips have
to accept it but it is not accepting .  I have a user like
extension123 for this function I have to perform authentication
service . if i have a user extension123 is it possible to perform
authenticate service for this kind of user ?

I think this is a bug for the e164 strict mode  module parameter .
I am getting the below error .

opensips version : 3.2.2

ERROR :
 ERROR:stir_shaken:check_passport_phonenum: number is not in E.164
format: extension123
 ERROR:stir_shaken:w_stir_auth: failed to validate Originator
number (extension123)


loadmodule "stir_shaken.so"
modparam("stir_shaken", "auth_date_freshness", 300)
modparam("stir_shaken", "verify_date_freshness", 300)
modparam("stir_shaken", "require_date_hdr", 0)
modparam("stir_shaken", "e164_strict_mode", 0)

$var(orig) = $fU;
$var(dest) = $tU
 $var(rc_auth)=stir_shaken_auth("A", "GWID-123456","$var(cert)",
"$var(pkey)","http://localhost/certificate.pem
<http://localhost/certificate.pem>","$var(orig)","$var(dest)");

Please suggest a solution to this .

Many Thanks
Devang


*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely 
those of the originator and do not necessarily represent those of the 
Company or its sister concerns. Any liability (in negligence, contract 
or otherwise) arising from any third party taking any action, or 
refraining from taking any action on the basis of any of the 
information contained in this email is hereby excluded.


*Confidentiality*
This communication (including any attachment/s) is intended only for 
the use of the addressee(s) and contains information that is 
PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, 
distribution, or copying of this communication is prohibited. Please 
inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any attachments, may not be free of 
viruses, trojans, similar or new contaminants/malware, interceptions 
or interference, and may not be compatible with your systems. You 
shall carry out virus/malware scanning on your own before opening any 
attachment to this e-mail. The sender of this e-mail and Company 
including its sister concerns shall not be liable for any damage that 
may incur to you as a result of viruses, incompleteness of this 
message, a delay in receipt of this message or any other computer 
problems.


___
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.2.3 TLS issue

2021-11-18 Thread Vlad Patrascu

Hi Gregory,

It is difficult to draw any conclusions without a backtrace so I'm 
hoping you'll be able to get the proper core dumps again in order to 
investigate this further.


Regards,

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

On 12.11.2021 14:44, Gregory Massel wrote:


Sorry, I do have the core files, however, my /usr/sbin/opensips is now 
3.2.2 and the core dumps were taken against 3.2.3.


I should have thought to get the backtrace before downgrading.

This is a production server, however, I will try and schedule some 
downtime and then restore 3.2.3 to generate the backtrace and will try 
out the nightly release.


--Greg



___
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.2.0 TLS MGM module does not load 3.1.0 domain configuration

2021-08-12 Thread Vlad Patrascu

Hi Adrian,

The wolfSSL implementation does not support a TLS method range, such as 
"TLSv1-", so that could be one of the causes. What seems strange is that 
there is no warning message: "WARNING:tls_wolfssl:tls_get_method: 
wolfSSL does not support method range specification" which should be 
thrown in such cases.


Regards,

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

On 12.08.2021 20:12, Adrian Georgescu wrote:

Hi,

I am using the latest 3.2.0 build with the old TLS configuration, with the aim 
to try out Wolf SSL stack.

But while the config check passed, the server does not start with the old 
configuration:

loadmodule “tls_mgm.so"
loadmodule “tls_wolfssl.so"
modparam("tls_mgm", "client_tls_domain_avp", "tls_client_domain")
modparam("tls_mgm", "tls_library", "auto”)

modparam("tls_mgm", "server_domain","ag-projects-server")
modparam("tls_mgm", "match_ip_address", "[ag-projects-server]*")
modparam("tls_mgm", "match_sip_domain", "[ag-projects-server]ag-projects.com")
modparam("tls_mgm", "tls_method",   "[ag-projects-server]TLSv1-")
modparam("tls_mgm", "certificate",  
"[ag-projects-server]/etc/opensips/tls/ag-projects.crt")
modparam("tls_mgm", "private_key",  
"[ag-projects-server]/etc/opensips/tls/ag-projects.key")
modparam("tls_mgm", "ca_list",  
"[ag-projects-server]/etc/opensips/tls/ca-list.pem")
modparam("tls_mgm", "ca_dir",   "[ag-projects-server]/etc/ssl/certs")
modparam("tls_mgm", "verify_cert",  "[ag-projects-server]1")
modparam("tls_mgm", "require_cert", "[ag-projects-server]0")

modparam("tls_mgm", "client_domain","ag-projects-client")
modparam("tls_mgm", "match_ip_address", "[ag-projects-client]*")
modparam("tls_mgm", "match_sip_domain", "[ag-projects-client]ag-projects.com")
modparam("tls_mgm", "tls_method",   "[ag-projects-client]TLSv1-")
modparam("tls_mgm", "certificate",  
"[ag-projects-client]/etc/opensips/tls/ag-projects.crt")
modparam("tls_mgm", "private_key",  
"[ag-projects-client]/etc/opensips/tls/ag-projects.key")
modparam("tls_mgm", "ca_list",  
"[ag-projects-client]/etc/opensips/tls/ca-list.pem")
modparam("tls_mgm", "ca_dir",   "[ag-projects-client]/etc/ssl/certs")
modparam("tls_mgm", "verify_cert",  "[ag-projects-client]1")
modparam("tls_mgm", "require_cert", "[ag-projects-client]0”)


Aug 12 18:51:14 live01 opensips[6455]: Aug 12 18:51:14 [6455] 
DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm
Aug 12 18:51:14 live01 opensips[6455]: Aug 12 18:51:14 [6455] 
DBG:core:set_mod_param_regex: found  in module tls_mgm 
[/usr/lib/x86_64-linux-gnu/opensips/modules/]
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:core:solve_module_dependencies: solving dependency tls_mgm -> module 
tls_wolfssl
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:core:solve_module_dependencies: solving dependency tls_mgm -> module 
tls_openssl
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:core:solve_module_dependencies: module tls_mgm soft-depends on module 
tls_openssl, and it was not loaded -- continuing
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:core:solve_module_dependencies: solving dependency proto_tls -> module 
tls_mgm
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:core:init_mod: initializing module tls_mgm
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
INFO:tls_mgm:mod_init: initializing TLS management
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:tls_mgm:load_info: 0 rows found in tls_mgm
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:tls_mgm:load_info: 0 records found in tls_mgm
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
INFO:tls_mgm:init_tls_dom: Processing TLS domain 'ag-projects-server'
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:tls_mgm:init_tls_dom: no DH params file for tls domain 'ag-projects-server' 
defined, using default '(null)'
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
DBG:tls_mgm:init_tls_dom: cipher list null ... setting default
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
NOTICE:tls_mgm:init_tls_dom: no crl for tls, using none
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
ERROR:tls_mgm:init_tls_domains: Failed to init TLS domain 'ag-projects-server'
Aug 12 18:51:15 live01 opensips[6455]: Aug 12 18:51:15 [6455] 
ERROR:core:init_mod: failed to initialize module tls_mgm

Any ideas what am I doing wrong?

Adrian



___
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] Removing ISUP part from sip dialog

2021-07-28 Thread Vlad Patrascu

Hi Alexey,

The remove_body_part() function should work for any method and replies 
as well. So are you saying that you have actually tried the function and 
it has no effect ?


Regards,

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

On 28.07.2021 18:15, Alexey Hamstr wrote:

good day.
Could anybody advise me if it is possible to remove ISUP part from 
whole SIP dialogue
Now I have only found that there is no problem to remove it from the 
common methods

like
        if (is_method("INVITE") ) {
                remove_body_part("application/isup");
        }
but i see ISUP part in the 180 or 186 messages or in the BYE method

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


[OpenSIPS-Users] [BLOG] OpenSIPS 3.2 and the supported SSL/TLS libraries

2021-06-03 Thread Vlad Patrascu

Hello everyone,

Check out this article [1] about your options regarding SSL/TLS 
libraries in OpenSIPS 3.2. Do not hesitate to try the new wolfSSL-based 
TLS implementation in OpenSIPS!


[1] 
https://blog.opensips.org/2021/06/03/opensips-3-2-and-the-supported-ssl-tls-libraries/


Cheers,

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


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


Re: [OpenSIPS-Users] Usage of TLS require_cert and verify_cert settings

2021-04-28 Thread Vlad Patrascu

Hi Adrian,

It is not possible to change those parameters on the fly. But I think 
you can implement your scenarios by setting a domain with 
require_cert=0, verify_cert=0 and using the is_peer_verified() script 
function to check the connections from the remote server.


Regards,

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

On 22.04.2021 17:15, Adrian Georgescu wrote:

Hello,

I have a question.

I have the following TLS scenarios:

1) A local user for a domain I own, connects to my server using TLS. 
If the domain is local, I will authenticate the user against my 
database and I do not care if the user has a certificate
2) A remote server, connects to my server using TLS and pretends that 
is domainX.com <http://domainX.com>. In such case, the only way to 
verify that this is true is by requiring a certificate and verify it


So there is a logic split between when to require and how to verify a 
certificate depending on the fact that we deal with a local user or a 
foreign domain.


I would like to know if is possible to set require_cert and 
verify_cert on the fly, while routing packets, instead of configuring 
them statically per domain.


Regards,
Adrian





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


Re: [OpenSIPS-Users] $b2b_logic.entity(id) in [reply_route] B2B module opensips 3.2

2021-04-28 Thread Vlad Patrascu

HI Xaled,

The variable should normally be available in b2b_logic's reply route. Do 
you get the same result for the 200 OK reply or other replies? Also, is 
the other information about the entity available 
($b2b_logic.entity(callid), $b2b_logic.entity(key)) ?


Regards,

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

On 27.04.2021 23:28, xa...@web.de wrote:

Hi,

I'm not getting the $b2b_logic.entity(id) in B2B [reply_route]. The log shows 

Is this variable not available in the B2B [reply_route]?

route[b2b_announce_response] {

 if ($rs != 500)
 {
 xlog("B2B REPLY: [$rs $rm] from entity: $b2b_logic.entity(id)\n");
 b2b_handle_reply();
 exit;
 }

B2B REPLY: [183 INVITE] from entity: 

Thanks,
Xaled


___
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] [Blog] Clustering Engine Improvements in OpenSIPS 3.2

2021-04-22 Thread Vlad Patrascu

Hi all,

Take a look at the latest blog post [1] that presents the new Clustering 
support improvements brought by the upcoming OpenSIPS 3.2 release.


[1] 
https://blog.opensips.org/2021/04/22/clustering-engine-improvements-in-opensips-3-2/


Enjoy!

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


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


Re: [OpenSIPS-Users] Generate CANCEL on 180

2021-04-21 Thread Vlad Paiu

Hello,

In 3.1, create_dialog [1] supports passing it the 'E' flag which will 
lead to the call termination if a dialog race condition occurs.


The dialog will be ended after race_condition_timeout [2] seconds.

Some of the most frequent race conditions are documented in RFC 5407 
[3], and the dialog module currently supports terminating the call in 
case races 3.1.2 and 3.1.3 from the RFC occur.


[1] 
https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_create_dialog 
<https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_create_dialog>


[2] 
https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout 
<https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout>


[3] https://tools.ietf.org/html/rfc5407 
<https://tools.ietf.org/html/rfc5407>


On 21.04.2021 15:52, Antonis Psaras wrote:

Hello Vlad

I am using 2.4 so race_condition_timeout is not available but I can upgrade if 
required.

Actually is not very clear to me what that parameter does. Can you explain a 
bit more?

Regards


Antonis Psaras / Managing Director
   


-Original Message-
From: Users  On Behalf Of Vlad Paiu
Sent: Τετάρτη, 21 Απριλίου 2021 15:45
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Hello,

Try using the race_condition_timeout dialog param along with the 'E'
flag when creating the dialog.

https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout
<https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout>

Best Regards,
Vlad
On 21.04.2021 12:46, Antonis Psaras wrote:

Hello Bogdan

The flow is the following

INVITE
Trying (instantly)
(after 2sec)
183
(after 3sec)
180
(here I do the process but during that I receive)
200 (instantly)
(here the CANCEL is sent)
CANCEL

And the call is keep going, hence the CANCEL was ignored by the carrier by the 
carrier because the call was answered.

Regards


Antonis Psaras

-Original Message-
From: Bogdan-Andrei Iancu 
Sent: Τετάρτη, 21 Απριλίου 2021 12:32
To: apsa...@microbase.gr; OpenSIPS users mailling list

Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Hi Antonis,

What exactly does not work ? sending the CANCEL out? or the callee "refuses" to 
cancel and sends a 200 OK ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
 https://www.opensips-solutions.com
OpenSIPS Bootcamp 2021 online
 https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 4/20/21 11:13 PM, Antonis Psaras wrote:

I did the following

if (t_check_status("180"))
{
t_cancel_branch();
  drop;
}

But there is an issue.

When 180 is followed by 200 instantly, the CANCEL is not working as expected.

When I add a delay on Answer ie 1sec then CANCEL works.

Any suggestion?

Antonis Psaras

-Original Message-
From: Users  On Behalf Of Kingsley
Tart
Sent: Τρίτη, 20 Απριλίου 2021 20:10
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Firstly, I'm new to OpenSIPS so treat my comments accordingly.

But, can you do something in an onreply route?

eg, in a test setup I have, when I get an INVITE I do this:

create_dialog("pPB");
t_on_reply("doodle");

(I can't remember whether the dialog is needed for this)

and then I have this:

onreply_route[doodle] {
# expect $T_reply_code to likely first be 100
# then 180 or 183 for a progressing call
# 200 when call is answered
# or failure code (eg 4xx) or whatever
if (t_check_status("^1[0-9][0-9]$")) {
switch ($T_reply_code) {
case 180: $acc_extra(t_ringing) = $Ts; break;
case 183: $acc_extra(t_progress) = $Ts; break;
}
} else if (t_check_status("^2[0-9][0-9]$")) {
$acc_extra(t_answer) = $Ts;
} else {
xlog("Something else\n");
}
}

so when a 180 is received, it calls the above route function. Could you send a 
CANCEL from there?

Cheers,
Kingsley.

On Tue, 2021-04-20 at 16:55 +0300, Antonis Psaras wrote:

Dear all

I am trying to create a service which will generate missed calls. In
order to be more accurate, I want to CANCEL the request when 180 is
received.

The scenario is the following

Asterisk Invite -> OpenSIPs -> Carrier

Carrier 183 -> OpenSIPs -> Asterisk

Carrier 180 -> OpenSIPs

OpenSIPs Cancel -> Carrier


Is that possible to be done from script without external app?

Regards

___

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] Generate CANCEL on 180

2021-04-21 Thread Vlad Paiu

Hello,

Try using the race_condition_timeout dialog param along with the 'E' 
flag when creating the dialog.


https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout 
<https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout>


Best Regards,
Vlad
On 21.04.2021 12:46, Antonis Psaras wrote:

Hello Bogdan

The flow is the following

INVITE
Trying (instantly)
(after 2sec)
183
(after 3sec)
180
(here I do the process but during that I receive)
200 (instantly)
(here the CANCEL is sent)
CANCEL

And the call is keep going, hence the CANCEL was ignored by the carrier by the 
carrier because the call was answered.

Regards


Antonis Psaras

-Original Message-
From: Bogdan-Andrei Iancu 
Sent: Τετάρτη, 21 Απριλίου 2021 12:32
To: apsa...@microbase.gr; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Hi Antonis,

What exactly does not work ? sending the CANCEL out? or the callee "refuses" to 
cancel and sends a 200 OK ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Bootcamp 2021 online
https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 4/20/21 11:13 PM, Antonis Psaras wrote:

I did the following

if (t_check_status("180"))
{
t_cancel_branch();
 drop;
}

But there is an issue.

When 180 is followed by 200 instantly, the CANCEL is not working as expected.

When I add a delay on Answer ie 1sec then CANCEL works.

Any suggestion?

Antonis Psaras

-Original Message-
From: Users  On Behalf Of Kingsley
Tart
Sent: Τρίτη, 20 Απριλίου 2021 20:10
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Firstly, I'm new to OpenSIPS so treat my comments accordingly.

But, can you do something in an onreply route?

eg, in a test setup I have, when I get an INVITE I do this:

create_dialog("pPB");
t_on_reply("doodle");

(I can't remember whether the dialog is needed for this)

and then I have this:

onreply_route[doodle] {
# expect $T_reply_code to likely first be 100
# then 180 or 183 for a progressing call
# 200 when call is answered
# or failure code (eg 4xx) or whatever
if (t_check_status("^1[0-9][0-9]$")) {
switch ($T_reply_code) {
case 180: $acc_extra(t_ringing) = $Ts; break;
case 183: $acc_extra(t_progress) = $Ts; break;
}
} else if (t_check_status("^2[0-9][0-9]$")) {
$acc_extra(t_answer) = $Ts;
} else {
xlog("Something else\n");
}
}

so when a 180 is received, it calls the above route function. Could you send a 
CANCEL from there?

Cheers,
Kingsley.

On Tue, 2021-04-20 at 16:55 +0300, Antonis Psaras wrote:

Dear all

I am trying to create a service which will generate missed calls. In
order to be more accurate, I want to CANCEL the request when 180 is
received.

The scenario is the following

Asterisk Invite -> OpenSIPs -> Carrier

Carrier 183 -> OpenSIPs -> Asterisk

Carrier 180 -> OpenSIPs

OpenSIPs Cancel -> Carrier

   
Is that possible to be done from script without external app?
   
Regards
   
___

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


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


Re: [OpenSIPS-Users] use of scenario_id in b2b_init_request

2021-04-09 Thread Vlad Patrascu

Hi Xaled,

The scenario ID is just a transparent identifier for the current B2B 
session. You may use it to identify which session belongs to which of 
your B2B scenarios. You can see this value in the output of b2b_list MI 
function and also you can retrieve it in the script with 
$b2b_logic.scenario (this may be useful if you use a single B2B request 
route, as in the example here: [1]).


Another purpose of the "scenario_id" parameter of b2b_init_request() is 
to be able to choose the internal topology hiding scenario, by providing 
the special value "top hiding".


[1] 
https://opensips.org/docs/modules/3.2.x/b2b_logic.html#b2b_logic.scenario


Regards,

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

On 09.04.2021 18:49, xa...@web.de wrote:

Hi,

I'm trying to understand the B2B module in 3.2 and don't quite get the meaning 
of scenario_id in b2b_init_request function.

There are multiple examples that use different values in scenario_id
https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2

b2b_init_request("prepaid"); or b2b_init_request("refer"); but the values "prepaid" or 
"refer" not used to differentiate anything within route[b2b_logic_request] or anywhere else in documentation.

I get the meaning of req_route parameter of b2b_init_request function to 
address different B2b logic using different routes, but what does the 
scenario_id used for?

Thanks,
Xaled



___
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] [BLOG] Apache Kafka Producer in OpenSIPS 3.2

2021-03-04 Thread Vlad Patrascu

Hi everyone,

Check out our latest blog [1] that shows how you can publish data/events 
to Apache Kafka! Besides, the post also touches on the improvements made 
to the event failover capabilities in OpenSIPS.


Enjoy this new integration feature in OpenSIPS 3.2!

[1] 
https://blog.opensips.org/2021/03/04/apache-kafka-producer-in-opensips-3-2/


Cheers,

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


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


[OpenSIPS-Users] [BLOG] Exploring SSL/TLS libraries for OpenSIPS 3.2

2021-02-11 Thread Vlad Patrascu

Hello everyone,

Check out this new blog post [1] that recounts our process of searching 
for and choosing a SSL/TLS library to use in OpenSIPS 3.2, as an 
alternative to the problematic OpenSSL.


[1] 
https://blog.opensips.org/2021/02/11/exploring-ssl-tls-libraries-for-opensips-3-2/


Cheers,

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


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


Re: [OpenSIPS-Users] www_challenge qop type failed with AAA

2021-01-05 Thread Vlad Patrascu

Hi Michael,

Regarding the qop issue, you should pass for that parameter a string 
value of "auth", "auth-int", or both separated by ','.


Regards,

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

On 05.01.2021 19:50, Michael Vale via Users wrote:

Hi,

I’m attempting to do auth with AAA,

I was met with an error of no Cisco vendor and no SIP-URI-Host Attribute which 
I added to the dictionaries.

Now www_challenge thinks either “0” or “1” is an invalid qop type.  



 ERROR:auth:fixup_qop: Bad qop type
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: ERROR:core:fix_cmd: Fixup 
failed for param [2]
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: ERROR:core:fix_actions: Failed to 
fix command 
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: ERROR:core:fix_actions: 
fixing failed (code=-1) at /etc/opensips/opensips.cfg:216
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: ERROR:core:main: failed to 
fix configuration with err code -1
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: INFO:core:cleanup: cleanup
Jan 06 04:42:14 unispy /usr/sbin/opensips[29711]: NOTICE:core:main: Exiting
Jan 06 04:42:14 unispy opensips[29709]: INFO:core:daemonize: pre-daemon proce

  if (!aaa_www_authorize("")) {
 www_challenge("", "1");
  };


Could someone please shed some light on the subject?

Also it would be nice if there was another approach to handling the 
SIP-URI-Host and Cisco issue or at least some confirmation that my approach was 
the best way to deal with it.


Regards,

Michael.
___
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] too many parameters for command

2020-12-04 Thread Vlad Patrascu

Hi Elaine,

Unfortunately the documentation is actually misleading and the function 
accepts only one extra argument for passing to python.


Regards,

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

On 04.12.2020 11:30, Elaine Huang wrote:

Hi,

I wrote a python function that takes 3 parameters (excluding msg):


class MyClass:
  …
  my_f(self, msg, param1, param2, param3):
    …
  …


While the python module readme suggests it can accept extra args (more 
than 1), opensips fail to start with error: too many parameters for 
command 


my config code:
python_exec("my_f", param1, param2, param3)


It can start if I change it to:
python_exec("my_f", param1)


Any idea why?


OpenSIPS version: 3.1



Kind Regards,
Elaine


___
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] Clear local cache collection without OpenSIPS 3.1 restart

2020-11-20 Thread Vlad Patrascu
I did forget to escape the "*" character in the example I gave, so this 
should work:


opensips-cli -x mi cache_remove_chunk "*" other

Regards,

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

On 20.11.2020 15:25, Mark Allen wrote:

thanks Vlad - I've tried it but I get

ERROR: command 'cache_remove_chunk' returned: -32602: Invalid params

On Fri, 20 Nov 2020 at 13:21, Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


Hi Mark,

The command you should run is:

opensips-cli -x mi cache_remove_chunk * other

I will also update the docs as the example is outdated so thanks
for pointing it out!

Regards,

-- 
Vlad Patrascu

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

On 20.11.2020 13:47, Mark Allen wrote:

I have local cache collections setup in my script:

loadmodule "cachedb_local.so"
    modparam("cachedb_local", "cache_collections", "general; other;")
    modparam("cachedb_local", "cachedb_url",
"local:general:///general")
    modparam("cachedb_local", "cachedb_url", "local:other:///other")

I want to be able to use opensips-cli to clear the contents of
the "other" collection from the command line or a script without
needing to restart OpenSIPS or losing the contents of the
"general" cache collection. I've looked at the cachedb_local
documentation for exported MI functions but I don't understand
how this translates into a valid opensips-cli command.

Any help gratefully received!   :D


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

___
Users mailing list
Users@lists.opensips.org <mailto: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] Clear local cache collection without OpenSIPS 3.1 restart

2020-11-20 Thread Vlad Patrascu

Hi Mark,

The command you should run is:

opensips-cli -x mi cache_remove_chunk * other

I will also update the docs as the example is outdated so thanks for 
pointing it out!


Regards,

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

On 20.11.2020 13:47, Mark Allen wrote:

I have local cache collections setup in my script:

loadmodule "cachedb_local.so"
    modparam("cachedb_local", "cache_collections", "general; other;")
    modparam("cachedb_local", "cachedb_url", "local:general:///general")
    modparam("cachedb_local", "cachedb_url", "local:other:///other")

I want to be able to use opensips-cli to clear the contents of the 
"other" collection from the command line or a script without needing 
to restart OpenSIPS or losing the contents of the "general" cache 
collection. I've looked at the cachedb_local documentation for 
exported MI functions but I don't understand how this translates into 
a valid opensips-cli command.


Any help gratefully received!   :D


___
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] Teams TLS Error

2020-11-17 Thread Vlad Patrascu

I guess this error, which is indeed not worded very well, threw you off:

ERROR:tls_mgm:tlsp_set_certificate: TLS domain [my.domain.com 
<http://my.domain.com>] not defined in '[my.domain.com 
<http://my.domain.com>]/usr/local/etc/opensips/tls/my_domain_com.pem'


What it actually means is that the TLS domain "my.domain.com" (the 
tls_mgm module's record/structure, ) is not defined. Refer to this [1] 
section in docs for a better explanation on the the concept of "TLS 
domains" in tls_mgm. The term "TLS domain" might be a little loose and 
generate confusion sometimes.


So what you should do is add this in your config:

modparam("tls_mgm", "server_domain", "my.domain.com")

By the way, you can use any arbitrary identifier for the domain part in 
the tls_mgm parameters, eg. :


modparam("tls_mgm", "server_domain", "mydom")

modparam("tls_mgm","certificate", 
"[mydom]/usr/local/etc/opensips/tls/myCert.pem")


...

[1] https://opensips.org/docs/modules/3.1.x/tls_mgm.html#idp2972192

Regards,

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

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


Re: [OpenSIPS-Users] dialog module mi dlg_list not working as expected?

2020-11-16 Thread Vlad Patrascu

Hi Mark,

This is indeed a bug in the MI output for dlg_list when passing callid 
and/or from_tag params. I have pushed a fix, thanks for reporting!


Regards,

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

On 16.11.2020 15:05, M S wrote:

Hi,
I think something is not working as expected with dialog:
I check this callid and it exists:
[root@sbc2 ~]# opensips-cli -x mi dlg_list | grep 
209eaf197691d8a937eb9d514104679c
            "callid": 
"209eaf197691d8a937eb9d514104679c@192.168.20.190:5060 
<http://209eaf197691d8a937eb9d514104679c@192.168.20.190:5060>",


Then I try it like 
https://opensips.org/html/docs/modules/3.1.x/dialog.html#mi_dlg_list :
[root@sbc2 ~]# opensips-cli -x mi dlg_list 
209eaf197691d8a937eb9d514104679c@192.168.20.190:5060 
<http://209eaf197691d8a937eb9d514104679c@192.168.20.190:5060>
ERROR: command 'dlg_list' returned: -32602: Invalid params (Command 
only supports named parameters)


and if I go by my guess:
[root@sbc2 ~]# opensips-cli -x mi dlg_list 
callid=209eaf197691d8a937eb9d514104679c@192.168.20.190:5060 
<http://209eaf197691d8a937eb9d514104679c@192.168.20.190:5060>

ERROR: command 'dlg_list' returned: -32000: Server error

something broken?

Mark

___
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] Teams TLS Error

2020-11-16 Thread Vlad Patrascu

Hi Mark,

Can you post the actual errors that you get in the OpenSIPS logs, if 
that is the case?


Regards,

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

On 16.11.2020 11:04, Mark Farmer wrote:

Good morning all

Can anyone clarify whether the TLS domain in SAN is supported or not 
please?


Many thanks
Mark.


On Fri, 13 Nov 2020 at 15:59, Kevin Vines <mailto:kevin.vi...@gmail.com>> wrote:


You got me there... the doc states

OpenSIPS offers SIP service for multiple
219 domains, e.g.atlanta.com  <http://atlanta.com>  andbiloxi.com  
<http://biloxi.com>. Altough both domains
220 will be hosted on a single SIP proxy, the SIP proxy needs 2
221 certificates: One foratlanta.com  <http://atlanta.com>  and one 
forbiloxi.com  <http://biloxi.com>. For
222 incoming TLS connections

If you need one cert per domain, maybe it implies that you need to
have the domain as the CN instead of a SAN?

Kevin

*From:* farm...@gmail.com <mailto:farm...@gmail.com>
*Sent:* November 13, 2020 10:43 a.m.
*To:* users@lists.opensips.org <mailto:users@lists.opensips.org>
*Reply to:* users@lists.opensips.org <mailto:users@lists.opensips.org>
*Subject:* Re: [OpenSIPS-Users] Teams TLS Error


OK so now I have this:

modparam("tls_mgm","certificate", "[my.domain.name
<http://my.domain.name>]/usr/local/etc/opensips/tls/myCert.pem
<http://myCert.pem>")
modparam("tls_mgm","private_key", "[my.domain.name
<http://my.domain.name>]/usr/local/etc/opensips/tls/myKey.key
<http://myKey.key>")
modparam("tls_mgm","ca_dir", "/etc/ssl/certs")
modparam("tls_mgm","verify_cert", "[my.domain.name
<http://my.domain.name>]1")
modparam("tls_mgm","require_cert", "[my.domain.name
<http://my.domain.name>]1")
modparam("tls_mgm","tls_method", "[my.domain.name
<http://my.domain.name>]TLSv1_2")
modparam("tls_mgm", "match_sip_domain", "my.domain.name
<http://my.domain.name>")

But now it claims that my.domain.name <http://my.domain.name> is
not defined in myCert.pem <http://myCert.pem>
I know it is - it is in a SAN within the certificate.

Any suggestions?
Many thanks
Mark.


On Fri, 13 Nov 2020 at 15:12, Kevin Vines mailto:kevin.vi...@gmail.com>> wrote:

Hi Mark,

Based on some googling it looks like you need to specify the
domain eg:

modparam("tls_mgm","verify_cert", "[domain.com
<http://domain.com>]1")

https://fossies.org/linux/opensips/modules/tls_mgm/README

Kevin

*From:* farm...@gmail.com <mailto:farm...@gmail.com>
*Sent:* November 13, 2020 9:49 a.m.
*To:* users@lists.opensips.org <mailto:users@lists.opensips.org>
*Reply to:* users@lists.opensips.org
<mailto:users@lists.opensips.org>
*Subject:* [OpenSIPS-Users] Teams TLS Error


Hi everyone

OpenSIPS 3.1.0

I am following the OpenSIPS as Teams SBC guide and have added
the TLS config:

modparam("tls_mgm","verify_cert", "1")
modparam("tls_mgm","require_cert", "1")
modparam("tls_mgm","tls_method", "TLSv1_2")
modparam("tls_mgm","certificate",
"/usr/local/etc/opensips/tls/myCert.pem <http://myCert.pem>")
modparam("tls_mgm","private_key",
"/usr/local/etc/opensips/tls/myKey.key <http://myKey.key>")
modparam("tls_mgm", "ca_dir", "/etc/ssl/certs")

But I am seeing a TLS domain error:

Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS
domain name
Nov 13 14:36:50 [175314] Traceback (last included file at the
bottom):
Nov 13 14:36:50 [175314]  0.
/usr/local//etc/opensips/opensips.cfg <http://opensips.cfg>
Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in
/usr/local//etc/opensips/opensips.cfg:191
<http://opensips.cfg:191>:19-20: Parameter  not
found in module  - can't set
Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert",
"[dom4]1")
Nov 13 14:36:50 [175314]
Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1")
Nov 13 14:36:50 [175314] ^~
Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert"

Re: [OpenSIPS-Users] how to call ul_dump?brief using jsonrpc

2020-11-11 Thread Vlad Patrascu

Hi Babak,

This is a bit of a mistake in the documentation, as the parameter's name 
is "brief", but as value it actually expects an integer. As such the 
jsonrpc request should be:


'{"jsonrpc":"2.0","method":"ul_dump","params":{"brief":1},"id":10}'

or:

'{"jsonrpc":"2.0","method":"ul_dump","params":[1],"id":10}'

Regards,

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

On 11.11.2020 15:08, Babak Yakhchali wrote:

Hi
I'm using opensips 3.1.
What json should be sent as body to http mi which results like 
ul_dump?brief

I tried this curl command but it is not working
curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' \
--header 'Content-Type: application/json' \
--data-raw 
'{"jsonrpc":"2.0","method":"ul_dump","id":10,*"params":["brief"]*}'

I get
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"}

this works but it is not brief :)
 curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' 
--header 'Content-Tya-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10}'


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


Re: [OpenSIPS-Users] Can't register using TLS - version 3.1

2020-10-20 Thread Vlad Patrascu

Hello,

It seems that you haven't properly configured a TLS server domain. What 
is your tls_mgm module configuration?


Regards,

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

On 20.10.2020 11:37, z...@communitake.com wrote:


Hi All

What ever configurations I’m trying, I always get the following error

Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
DBG:proto_tls:tls_conn_init: Creating a whole new ssl connection


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
DBG:proto_tls:tls_conn_init: looking up TLS server domain 
[172.30.0.8:5061]


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
ERROR:proto_tls:tls_conn_init: no TLS server domain found


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
ERROR:core:handle_io: failed to do proto 3 specific init for conn 
0x7ff49831a488


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
DBG:core:tcpconn_release: releasing con 0x7ff49831a488, state -3, 
fd=-1, id=181457494


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1390] 
DBG:core:tcpconn_release: extra_data (nil)


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1399] 
DBG:core:handle_tcp_worker: response= 7ff49831a488, -3 from tcp worker 
0 (0)


Oct 20 07:38:07 zivtest opensips: Oct 20 07:38:07 [1399] 
DBG:core:tcpconn_destroy: destroying connection 0x7ff49831a488, flags 001c



___
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.1 - raise_event() crashes OpenSIPS with segmentation fault

2020-07-28 Thread Vlad Patrascu

Hi Mark,

thanks for the report! I have pushed a fix for the crash.

I've also updated the documentation to be more clear about how 
raise_event() should be used and the changes from 3.0. Basically, you 
don't have to necessarily pass both AVP parameters in 3.1, but if you 
want to pass only the attribute values for the event you should do:


raise_event("E_WFC_REGISTERED", , $avp(values));

That is because the event attribute values can now only be passed 
through the corresponding parameter(which is the last one). The way you 
did it initially was equivalent to passing only the event attribute 
names which in 3.1 results in an event with no attributes at all. This 
in turn was unfortunately causing a crash.


Regards,

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

On 28.07.2020 17:42, Mark Allen wrote:

[SOLVED]

Hi Stas - good call! It's a change in behaviour from 3.0.

In 3.0 documentation says...

    The next two parameters should be AVPs and they are optional. If 
only one is present, it should contain the values attached to the event.


In 3.1 it removes mention of the behaviour if only one AVP is present, 
but it's not obvious and perhaps it could be documented in the 
https://www.opensips.org/Documentation/Migration-3-0-0-to-3-1-0 guide? 
Also, perhaps 3.1 should handle it better if parameter is missing 
rather than giving a segfault (something for 3.2?)


Once again I'm indebted to you for your help

thanks very much & all the best

Mark




On Tue, 28 Jul 2020 at 15:22, Stas Kobzar <mailto:staskob...@gmail.com>> wrote:


Hi Allen,

Did you try with two parameters: name, value?

*$avp(keys) = "registered";*
       $avp(values) = "true";
        xlog("Raised E_WFC_REGISTERED $avp(values)");
        raise_event("E_WFC_REGISTERED", *$avp(keys)*, $avp(values));

I know they are said to be optional in the documentation but
probably it is optional for two. Either no params or if you pass
parameters, you have to pass both.


On Tue, Jul 28, 2020 at 9:59 AM Mark Allen mailto:m...@allenclan.co.uk>> wrote:

We're upgrading from 3.0 to 3.1. Everything seems ok except we
get a weird error. We subscribe a dynamic event...

    startup_route {
      subscribe_event("E_WFC_REGISTERED", "udp:127.0.0.1:
<http://127.0.0.1:>");
    }

which we can see works from /var/log/syslog...
    event_datagram:mod_init: initializing module ...
    core:evi_publish_event: Registered event  8b 46 08 48 85 c0 74
0b 48 83 78 18 00 0f 84 a5 02 00 00 e8 34
    INFO:core:handle_sigs: child process 10525 exited by a
signal 11
    INFO:core:handle_sigs: core was generated
    INFO:core:handle_sigs: terminating due to SIGCHLD

If I comment out the raise_event() line - OpenSIPS seems fine
and doesn't crash when passing through this code.



Running gdb to get core file backtrace we see...

Core was generated by `/usr/sbin/opensips -P
/run/opensips/opensips.pid -f /etc/opensips/opensips.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  evi_build_payload (params=0x0, method=0x7f931f5b6f08,
id=id@entry=0, extra_param_k=extra_param_k@entry=0x0,
    extra_param_v=extra_param_v@entry=0x0) at
evi/evi_transport.c:159
159             if (params->first && !params->first->name.s) {
(gdb) bt full
#0  evi_build_payload (params=0x0, method=0x7f931f5b6f08,
id=id@entry=0, extra_param_k=extra_param_k@entry=0x0,
    extra_param_v=extra_param_v@entry=0x0) at
evi/evi_transport.c:159
        param = 
        param_obj = 0x0
        tmp = 
        ret_obj = 0x7f9323135fe0
        payload = 0x0
        __FUNCTION__ = "evi_build_payload"
#1  0x7f931b7d934f in datagram_raise (msg=,
ev_name=, sock=0x7f931f5c54c8,
params=)
    at event_datagram.c:315
        ret = 
        buf = 
        __FUNCTION__ = "datagram_raise"
#2  0x55cef82148fb in evi_raise_event_msg
(msg=msg@entry=0x7f9323134890, id=id@entry=20,
params=params@entry=0x0)
    at evi/event_interface.c:208
        subs = 0x7f931f5c55a8
        prev = 
        now = 1595943308
        flags = 1073741838
        pflags = 0
        ret = 0
        __FUNCTION__ = "evi_raise_event_msg"
#3  0x55cef8216afb in evi_raise_script_event
(msg=0x7f9323134890, id=20, _a=, _v=)
    at evi/event_interface.c:430
        vals = 
        attrs = 
        v_avp = 
  

Re: [OpenSIPS-Users] How should we represent empty parameters in MI Datagram JSON

2020-07-08 Thread Vlad Patrascu

Hi Adrian,

In the cases (like 'pua_publish') where there are multiple optional 
parameters that cannot be simply identified by position in the array, 
the 'params' member in the JSON-RPC request should be an Object with 
named parameters.


As such, you should have:

"params": {

    "presentity_uri": "sip:system@192.168.2.132",

    "expires": 3600,

    [...]

}

Regards,

On 06.07.2020 22:47, Adrian Fretwell wrote:


Hello,

What is the correct way to specify empty parameters in an MI call 
using JSON?


For example this call to pua_publish has two unused parameters; ETag 
and extra_headers, in the old way they were represented by a dot, but 
if I try that now I get an invalid etag message:


Pua_publish:


 
 
    - body type if body of a type different from 
default event content-type or .
 - ETag that publish should match or . if no 
ETag

 - extra headers to be added to the request or .
   - may not be present in case of update for expire

Example:

:pua_publish:fifo_reply
sip:system@192.168.2.132
3600
presence
application/pidf+xml
.
.
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'... etc.


Would someone point me in the right direction please.


Kind regards,

Adrian Fretwell
Sibthorpe
Nottinghamshire
UK.


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


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

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


Re: [OpenSIPS-Users] cluster/cassandra cache

2020-06-15 Thread Vlad Patrascu

Hi Slava,

Can you open a ticket on Github for this? And also include there the 
Cassandra version and other relevant information (as per the issue 
template).


Regards,

On 09.06.2020 23:57, Slava Bendersky via Users wrote:

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


Re: [OpenSIPS-Users] Stir_shaken signature length

2020-04-14 Thread Vlad Patrascu

Hi,

Please check the fix on the latest master branch on github and let me 
know if everything is ok.


Regards,

Vlad Patrascu

On 10.04.2020 12:28, Alexandru Tripon wrote:

Hi,

I tried to populate the Identity header with the stir_shaken module.
The header is populated but when I try to verify the signature using 
an external tool it fails because of the length.

I have the folowing Identity generated by Opensips:
`
eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiL2hvbWUvdHJpYWwvTHVjcnUvQ29kZS9zdGlyU2hha2VuL215cHVia2V5LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODY1MDMxODcsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.MEYCIQCjIx6w8IeilqHq0jbc6uwIB9v1RDmecoep0gRJJC4EmQIhANH1MO9jwRtqH6jgFH12XqROFv-nUroEgzsRAaMJtAsR;info=\u003c/home/trial/Lucru/Code/stirShaken/mypubkey.pem\u003e;ppt=\"shaken\"
`
the lenght of encoded signature(in base64) is 96 and in the decoded 
one is 72.
In the RFC for ES256 
algorithm(https://tools.ietf.org/html/rfc7518#section-3.4) the length 
of the decoded signature is 64.

Am I missing something here?

Thanks,
Alexandru Tripon

___
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] Stir_shaken signature length

2020-04-13 Thread Vlad Patrascu

Hi Frederico,

I'm not really sure I understand your question of "how" to generate the 
signature. Are you refering to how the scripting should look like or 
something else ? But anyway, it is not possible with OpenSIPS 2.4.7 as 
the stir_shaken module is available starting with OpenSIPS 3.1.


Regards,

Vlad Patrascu

On 13.04.2020 18:13, Saint Michael wrote:
I am trying to do the same. The question I need to ask here is: how do 
you generate the signature from the certificate, the caller ID and the 
destination number?
I have the API working in staging mode, but now I need to really sign 
a call and send it forward with Opensips 2.4.7


Federico

On Mon, Apr 13, 2020 at 11:03 AM Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


Hi Alexandru,

OpenSIPS is using the signature in DER encoded format (as it is
directly generated by openssl) but indeed it is not the proper
format as per RFC 7518. Thanks for the report, I am working on a fix.

Regards,

Vlad Patrascu

On 10.04.2020 12:28, Alexandru Tripon wrote:

Hi,

I tried to populate the Identity header with the stir_shaken module.
The header is populated but when I try to verify the signature
using an external tool it fails because of the length.
I have the folowing Identity generated by Opensips:
`

eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiL2hvbWUvdHJpYWwvTHVjcnUvQ29kZS9zdGlyU2hha2VuL215cHVia2V5LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODY1MDMxODcsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.MEYCIQCjIx6w8IeilqHq0jbc6uwIB9v1RDmecoep0gRJJC4EmQIhANH1MO9jwRtqH6jgFH12XqROFv-nUroEgzsRAaMJtAsR;info=\u003c/home/trial/Lucru/Code/stirShaken/mypubkey.pem\u003e;ppt=\"shaken\"
`
the lenght of encoded signature(in base64) is 96 and in the
decoded one is 72.
In the RFC for ES256
algorithm(https://tools.ietf.org/html/rfc7518#section-3.4) the
length of the decoded signature is 64.
Am I missing something here?

Thanks,
Alexandru Tripon

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

___
Users mailing list
Users@lists.opensips.org <mailto: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] Stir_shaken signature length

2020-04-13 Thread Vlad Patrascu

Hi Alexandru,

OpenSIPS is using the signature in DER encoded format (as it is directly 
generated by openssl) but indeed it is not the proper format as per RFC 
7518. Thanks for the report, I am working on a fix.


Regards,

Vlad Patrascu

On 10.04.2020 12:28, Alexandru Tripon wrote:

Hi,

I tried to populate the Identity header with the stir_shaken module.
The header is populated but when I try to verify the signature using 
an external tool it fails because of the length.

I have the folowing Identity generated by Opensips:
`
eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiL2hvbWUvdHJpYWwvTHVjcnUvQ29kZS9zdGlyU2hha2VuL215cHVia2V5LnBlbSJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODY1MDMxODcsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.MEYCIQCjIx6w8IeilqHq0jbc6uwIB9v1RDmecoep0gRJJC4EmQIhANH1MO9jwRtqH6jgFH12XqROFv-nUroEgzsRAaMJtAsR;info=\u003c/home/trial/Lucru/Code/stirShaken/mypubkey.pem\u003e;ppt=\"shaken\"
`
the lenght of encoded signature(in base64) is 96 and in the decoded 
one is 72.
In the RFC for ES256 
algorithm(https://tools.ietf.org/html/rfc7518#section-3.4) the length 
of the decoded signature is 64.

Am I missing something here?

Thanks,
Alexandru Tripon

___
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] Real-Time Rating and Cost Based Routing in OpenSIPS 3.1

2020-04-10 Thread Vlad Paiu

Hello,

Currently the module can only be used for a basic postpaid type of rating.

Regards, Vlad

On 09.04.2020 19:47, Mehdi Shirazi wrote:

Hi
Thanks for new features.
Is it possible(or planed) to use this module for basic prepaid billing ?

Regards
M.Shirazi

>While there are numerous external rating and billing engines available 
>in the wild, having a quick and easy way of putting a price for a call, 
>without relying on external applications, can be a valuable asset to have.


>https://blog.opensips.org/2020/04/07/real-time-rating-and-cost-based-routing-in-opensips-3-1/
  
<https://blog.opensips.org/2020/04/07/real-time-rating-and-cost-based-routing-in-opensips-3-1/>

>Thank you Vlad Paiu for the valuable contribution and post !

>Best Regards,

>Bogdan-Andrei Iancu



___
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] lua_exec in local_route

2020-02-21 Thread Vlad Patrascu

Hi Johan,

There is no workaround unfortunately so indeed you should open a feature 
request for this.


Regards,

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

On 2/21/20 12:48 PM, johan wrote:

Hello,

when I use lua_exec in local_route, I have below error:

Feb 21 10:31:26 hendrix opensips[26811]: Not starting opensips: invalid
configuration file!
Feb 21 10:31:26 hendrix opensips[26811]: Feb 21 10:31:26 [26823]
Traceback (last included file at the bottom):
Feb 21 10:31:26 hendrix opensips[26811]: Feb 21 10:31:26 [26823] 0.
/data/opensips/etc/opensips/opensips.cfg
Feb 21 10:31:26 hendrix opensips[26811]: Feb 21 10:31:26 [26823]
CRITICAL:core:yyerror: parse error in
/data/opensips/etc/opensips/opensips.cfg:1165:23-24: Command 
cannot be used in the block


Context: when I receive an sms in ucs2, proto_smpp returns the message
in utf16 big endian.  I need to to convert this to utf8. You find the 
body in local_route as the message is created by tm. Therefore I 
thought to do the decoding using lua.



so I assume that lua_exec is there forbidden. If this is true, should 
I open a feature request to add this functionality or is there a 
workaround ?



BR, 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] opensips lua

2020-01-14 Thread Vlad Patrascu
You get the newline from the print() function in the python script that 
you call. I've tested with your script and for example this fixed it:


print(testing(),end="")

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

On 1/14/20 3:32 PM, volga629 via Users wrote:

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

this repository

https://github.com/VoIP-SAAS/opensips-smpp-lua

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
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


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


Re: [OpenSIPS-Users] opensips lua

2020-01-14 Thread Vlad Patrascu
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
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 lua

2020-01-13 Thread Vlad Patrascu

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
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] Dialog profiles replication issues

2020-01-08 Thread Vlad Patrascu

Hi Sammy,

I have pushed the fix for the crash, please check the latest commits.

Regards,

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

On 1/7/20 10:40 PM, SamyGo wrote:

Hi Vlad,
Update: it wasn't the issue with dialog module or bin_proto. When I 
used avp_db_query() inside async() that led to script processing to 
halt, I've removed the async() and its working fine now, however the 
crash for adding a new profile variable is still there and needs 
resolution.


Best Regards,
Sammy


On Tue, Jan 7, 2020 at 11:38 AM SamyGo <mailto:govoi...@gmail.com>> wrote:


Thanks Vald,
The problem I'm facing with profile sharing is strange, when I
make a call the whole flow freeze in that route with dialog
profile operations i.e get/set. I can wait for as many as 15+
seconds and nothing happens. CANCEL the call and resend INVITE and
it completes the route in normal way. Which is beyond my
understanding as why each alternate call is able to process the
route.

Here is the core dump trace: https://pastebin.com/XqiaMWnV

Best regards,
Sammy


On Tue, Jan 7, 2020 at 10:03 AM Vlad Patrascu mailto:vl...@opensips.org>> wrote:

Hi Sammy,

The behavior you described when replicating profiles is not
actually a loop but instead the normal operation. Dialog
profile counters are periodically broadcasted by all nodes in
the cluster to all other nodes. Also, an update is also
broadcasted when a counter decreases. As such there indeed
should not be any direct correlation between the number of SIP
invites and binary packets (containing profile counters) sent.
But if the SIP traffic contains BYEs or if you end dialogs you
might see a surge of binary packets.

As for the crash, can you post a full backtrace from gdb?

Regards,

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

On 1/6/20 1:05 PM, Bogdan-Andrei Iancu wrote:

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

On 1/6/20 4:21 AM, SamyGo wrote:

Hi Bogdan,
Thanks for taking time out, here are the related config params.

listen=bin:OPENSIPS_IP:6677

### dialog module for profiles/limits
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "profiles_with_value",

"userConcurrent/b;userInbound/b;userOutbound/b;userInternational/b;userTotalCalls/b;inboundDomain/b;outboundDomain/b;globalDomain/b;prefixx
/b;countryPrefix/b")
modparam("dialog", "profile_replication_cluster", 1)
modparam("dialog", "replicate_profiles_timer", 3000)
modparam("dialog", "replicate_profiles_check", 10)

### Clustering Module
loadmodule "clusterer.so"
modparam("clusterer", "db_mode", 1)
modparam("clusterer", "my_node_id", 3)
modparam("clusterer", "sharing_tag", "gw1/1=active")
modparam("clusterer", "node_timeout", 20)
modparam("clusterer",
"db_url","DB_MODULE://DB_USER:DB_PASS@DB_HOST/DB_NAME")

Routing logic:
https://pastebin.com/6whjkhCs

Related Logs are here.
https://pastebin.com/a9a3iDQh

 Wireshark graph showing storm of binary packets when SIP
invite initiates the related route.

*BONUS CRASH: *When in a cluster I add a new
profile_with_value , say someVariable/b and restart the
first box with this variable, the other boxes in cluster
crash by saying something along the lines of "unexpected
someVariable received"

I'm trying to get hold of the core files and as soon as
possible will share that here.


Regards,.
Sammy.





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

___
Users mailing list
Users@lists.opensips.org <mailto: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] Dialog profiles replication issues

2020-01-07 Thread Vlad Patrascu

Hi Sammy,

The behavior you described when replicating profiles is not actually a 
loop but instead the normal operation. Dialog profile counters are 
periodically broadcasted by all nodes in the cluster to all other nodes. 
Also, an update is also broadcasted when a counter decreases. As such 
there indeed should not be any direct correlation between the number of 
SIP invites and binary packets (containing profile counters) sent. But 
if the SIP traffic contains BYEs or if you end dialogs you might see a 
surge of binary packets.


As for the crash, can you post a full backtrace from gdb?

Regards,

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

On 1/6/20 1:05 PM, Bogdan-Andrei Iancu wrote:

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

On 1/6/20 4:21 AM, SamyGo wrote:

Hi Bogdan,
Thanks for taking time out, here are the related config params.

listen=bin:OPENSIPS_IP:6677

### dialog module for profiles/limits
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "profiles_with_value", 
"userConcurrent/b;userInbound/b;userOutbound/b;userInternational/b;userTotalCalls/b;inboundDomain/b;outboundDomain/b;globalDomain/b;prefixx

/b;countryPrefix/b")
modparam("dialog", "profile_replication_cluster", 1)
modparam("dialog", "replicate_profiles_timer", 3000)
modparam("dialog", "replicate_profiles_check", 10)

### Clustering Module
loadmodule "clusterer.so"
modparam("clusterer", "db_mode", 1)
modparam("clusterer", "my_node_id", 3)
modparam("clusterer", "sharing_tag", "gw1/1=active")
modparam("clusterer", "node_timeout", 20)
modparam("clusterer", 
"db_url","DB_MODULE://DB_USER:DB_PASS@DB_HOST/DB_NAME")


Routing logic:
https://pastebin.com/6whjkhCs

Related Logs are here.
https://pastebin.com/a9a3iDQh

 Wireshark graph showing storm of binary packets when SIP invite 
initiates the related route.


*BONUS CRASH: *When in a cluster I add a new profile_with_value , say 
someVariable/b and restart the first box with this variable, the 
other boxes in cluster crash by saying something along the lines of 
"unexpected someVariable received"


I'm trying to get hold of the core files and as soon as possible will 
share that here.



Regards,.
Sammy.





___
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] Set AVP variables from Python script ?

2019-11-27 Thread Vlad Patrascu

Hi Alexandro,

Unfortunately, you cannot do this in Python, but as you've noticed you 
can use Lua or Perl.


Starting from OpenSIPS 3.1 though, it will be possible to call OpenSIPS 
core script functions from Python, so 'pv_printf()' would facilitate 
writing AVPs from Python.


Regards,

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

On 11/26/19 11:43 PM, Alexandro Conde wrote:


Hi all,

Is there a way to set a AVP variable from a Python script ?

I need to authenticate the endpoints with the username & password 
stored and managed on other system DB, I already have an API that can 
return the user information, so it will be great  to create a Python 
script that consume the API and return the username & password on a 
AVP variable to do the Authorization using the pv_www_authorize command.


I prefer to program that on Python but if it's not possible it can be 
on LUA or Perl Right? (AVP_set & OpenSIPS::AVP)


Thanks in Advance !

--

*Alexandro Conde Mtz.*
Voip Specialist & Developer
aco...@perfectpitchtech.com <mailto:aco...@perfectpitchtech.com> 
Facebook <https://www.facebook.com/perfectpitchtech> Twitter 
<https://twitter.com/PerfectPitchTM>

https://perfectpitchtech.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] 3.x LTS

2019-11-08 Thread Vlad Patrascu

Hi Mark,

Indeed 3.0 is not LTS, the next LTS version will be 3.1.

Regards,

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

On 11/8/19 12:03 PM, Mark Farmer wrote:
According to the versions page only 2.4.6 is currently LTS if I 
understood correctly :)


https://www.opensips.org/About/AvailableVersions


On Fri, 8 Nov 2019 at 09:46, Giovanni Maruzzelli <mailto:gmar...@gmail.com>> wrote:


3.0 IS LTS (if I understood correctly)



On Fri, Nov 8, 2019 at 10:26 AM Mark Farmer mailto:farm...@gmail.com>> wrote:

Good morning

I have some upcoming projects for which I will be using
OpenSIPS and I would really like to use features from 3.x but
I need to stick to LTS releases.

Is there any kind of timeline for the next LTS release please?

Best regards
Mark.

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



-- 
Sincerely,


Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18

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



--
Mark Farmer
farm...@gmail.com <mailto:farm...@gmail.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] segfault in dialog.so

2019-11-08 Thread Vlad Patrascu

Hello,

Can you open a ticket on Github and also extract a full backtrace of the 
crash?


Regards,

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

On 11/7/19 10:19 AM, Антон Ершов wrote:

Hello friends,
I already wrote about this problem and there was no answer.
http://lists.opensips.org/pipermail/users/2019-October/041771.html
I still want to process call profiles in event_route, but opensips 
falls into error at the same time.


opensips -V
version: opensips 3.0.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.
git revision: 3d2bd5318
main.c compiled on 02:53:35 Nov  7 2019 with gcc 4.8.5

my event_route

event_route[E_DLG_STATE_CHANGED] {
    xlog("L_INFO", "[$param(callid)] - new state dialog changed 
$param(new_state) old state $param(old_state) \n");


    cache_raw_query("redis:group3", "HGET callid 
$param(callid)","$avp(reknum)");

    if ($avp(reknum) != NULL) {
        xlog("L_INFO", "[$param(callid)] - get reknum $avp(reknum) \n");

if ( get_dialogs_by_profile("reknumber", $avp(reknum), 
$avp(dlg_jsons), $avp(callcount)) ) {
   xlog("L_INFO", "[$param(callid)] - advertising number  $avp(reknum) 
has $avp(callcount) other calls \n");

} else {
   xlog("L_INFO", "[$param(callid)] - this profile does not have 
active dialogs \n");

   $avp(callcount) = 0;
}

switch($param(new_state)) {
   case 4:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount 
$avp(reknum) $avp(callcount) \n");

if ($avp(reknum) != "" && $avp(callcount) != "") {
   cache_raw_query("redis:group3","HSET callcount $avp(reknum) 
$avp(callcount)");

   cache_raw_query("redis:group3","EXPIRE callconut 360");
   xlog("L_INFO", "[$param(callid)] - call established. Now on number 
$avp(reknum) $avp(callcount) calls \n");

}
break;
   case 5:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount 
$avp(reknum) $avp(callcount) \n");

if ($avp(reknum) != "" && $avp(callcount) != "") {
   cache_raw_query("redis:group3","HSET callcount $avp(reknum) 
$avp(callcount)");

   cache_raw_query("redis:group3","EXPIRE callcount 360");
   xlog("L_INFO", "[$param(callid)] - call end. Now on number 
$avp(reknum) $avp(callcount) calls \n");

   cache_raw_query("redis:group3","HDEL callid $param(callid)");
}
break;
}
    } else {
        xlog("L_INFO", "[$param(callid)] - reknum vareable is NULL");
        exit;
    }
}

when we try to get a profile of an already dead dialog opensips falls.
please tell me is it possible to implement what I want or is it worth 
looking for another solution?



___
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] opensipsctl fifo get_statistics - dialogs stats synced?

2019-10-21 Thread Vlad Patrascu
The term "processed" should be read more generically in this context to 
include to act of receiving the replicated dialog and preparing it to 
become active at any time.


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

On 10/21/2019 02:57 PM, solarmon wrote:

 Hi Vlad,

That was my understanding too, but why would processed_dialogs be 
incrementing on the standby (State=0) node?


On Mon, 21 Oct 2019 at 12:51, Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


Hi solarmon,

'failed_dialogs' and 'processed_dialogs' represent the total
number of failed/processed dialogs on that OpenSIPS instance since
startup. If one of the nodes has been running and handling traffic
for a longer time, it's normal for the stats to be different. On
the other hand 'active_dialogs' should indeed be always in sync.

Regards,

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

On 10/21/2019 01:07 PM, solarmon wrote:

Hi,

Are dialogs stats meant to be totally synced between to openSIPS
nodes in a cluster - i.e. when using clusterer?

I am monitoring/graphing the active_dialogs, failed_dialogs and
processed_dialogs for each node, using 'opensipsctl fifo
get_statistics' and they are not fully synced:
*Node 1:*
active_dialogs = 6
failed_dialogs = 175
processed_dialogs = 605

*Node 2:*
active_dialogs = 6
failed_dialogs = 0
processed_dialogs = 430

It seems active_dialogs is synced, but failed_dialogs and
processed_dialogs are not.

processed_dialogs figures are increasing on both, but they are
not synced.

Please can somebody explain and/or confirm this behaviour.

Thanks



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


___
Users mailing list
Users@lists.opensips.org <mailto: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] opensipsctl fifo get_statistics - dialogs stats synced?

2019-10-21 Thread Vlad Patrascu

Hi solarmon,

'failed_dialogs' and 'processed_dialogs' represent the total number of 
failed/processed dialogs on that OpenSIPS instance since startup. If one 
of the nodes has been running and handling traffic for a longer time, 
it's normal for the stats to be different. On the other hand 
'active_dialogs' should indeed be always in sync.


Regards,

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

On 10/21/2019 01:07 PM, solarmon wrote:

Hi,

Are dialogs stats meant to be totally synced between to openSIPS nodes 
in a cluster - i.e. when using clusterer?


I am monitoring/graphing the active_dialogs, failed_dialogs and 
processed_dialogs for each node, using 'opensipsctl fifo 
get_statistics' and they are not fully synced:

*Node 1:*
active_dialogs = 6
failed_dialogs = 175
processed_dialogs = 605

*Node 2:*
active_dialogs = 6
failed_dialogs = 0
processed_dialogs = 430

It seems active_dialogs is synced, but failed_dialogs and 
processed_dialogs are not.


processed_dialogs figures are increasing on both, but they are not synced.

Please can somebody explain and/or confirm this behaviour.

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


Re: [OpenSIPS-Users] need some help using opensips 3.0 cluster module .

2019-09-06 Thread Vlad Patrascu

Hi Sasmita,

The functions that allow you the send custom messages in the cluster at 
script level are still there in opensips 3.0, so yes, you can implement 
something similar to that blog post.


Regards,

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

On 09/06/2019 11:25 AM, Sasmita Panda wrote:

Ok . Thank you .

I got a document for geo distributed clustering which uses redis as 
cache . This uses opensips 2.4 . I had tested this architecture also . 
This is working fine .
https://saevolgo.blogspot.com/2018/01/opensips-geo-distributed-clustering.html 



Can I use this kind of scripting with opensips 3.0 to use redis cache ?

If not , then to use redis I have to use opensips2.4 with clustering . 
Am I right ?



*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Fri, Sep 6, 2019 at 1:31 PM Giovanni Maruzzelli <mailto:gmar...@gmail.com>> wrote:


it cannot work
documentation say that explicitly

"Currently, the metadata information may be published to NoSQL
databases which support key/multi-value column-like associations.
Example known backends to support these abstractions at the time
of writing are MongoDB and Cassandra."

https://opensips.org/html/docs/modules/3.0.x/usrloc.html



On Fri, Sep 6, 2019 at 9:53 AM Sasmita Panda mailto:spa...@3clogic.com>> wrote:

Hi All ,

I have tested opensips 3.0 federated cachedb cluster with
mongo db as cache db .

But in my company we are using redis as cache db.

loadmodule "cachedb_redis.so"
loadmodule "db_cachedb.so"
modparam("cachedb_redis",
"cachedb_url","redis:group1://192.168.0.213:6379/
<http://192.168.0.213:6379/>")
modparam("db_cachedb","cachedb_url","redis:group1://192.168.0.213:6379/
<http://192.168.0.213:6379/>")
modparam("usrloc", "cachedb_url",
"redis:group1://192.168.0.213:6379/ <http://192.168.0.213:6379/>")

In place of mongodb I have replace redis . But its not working
. I am not getting any data the redis cache . Please help me .

*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Mon, Sep 2, 2019 at 1:07 PM Sasmita Panda
mailto:spa...@3clogic.com>> wrote:


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


-- Forwarded message -
From: *Giovanni Maruzzelli* mailto:gmar...@gmail.com>>
Date: Mon, Sep 2, 2019 at 12:40 PM
Subject: Re: [OpenSIPS-Users] need some help using
opensips 3.0 cluster module .
To: OpenSIPS users mailling list mailto:users@lists.opensips.org>>


Sasmita, how possibly you can do that?
How you then associate a machine with an id?
Would you create a new database field for the MAC of the
machine?

-giovanni




On Mon, Sep 2, 2019 at 8:54 AM Sasmita Panda
mailto:spa...@3clogic.com>> wrote:

Hi All ,

In clustering , every opensips node has its own node id .

modparam("clusterer", "my_node_id", 2)

I want to read this value from from the DB . Is this
possible or not ? If yes , how will I do this ?

Please do help me .



*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Aug 8, 2019 at 12:44 PM Sasmita Panda
mailto:spa...@3clogic.com>> wrote:

Thank you so much for the explanation  .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Wed, Aug 7, 2019 at 6:46 PM Liviu Chircu
mailto:li...@opensips.org>>
wrote:

Sasmita,

Dialog replication is not meant to work on
such a cluster. Since dialogs
retain more
state than registration, they are more
sensitive to the IP of the
current node.

If you want high-availability for dialogs, the
basic unit of deployment
sh

Re: [OpenSIPS-Users] OpenSIPS 2.4 HA Seed Node Dialog Sync

2019-08-29 Thread Vlad Patrascu

Hi Pasan,

Indeed, it can help to have the DB as an alternative for restart 
persistency in case it can not be achieved through cluster syncing. But 
this is not _required_ and the concept of "seed" node is not linked to 
the DB. Rather, this is more of a consequence of the fact that the seed 
does not automatically perform a sync itself. Nevertheless, it can be 
forced to sync by running an MI command.


Regards,

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

On 08/29/2019 01:41 PM, Pasan Meemaduma via Users wrote:

Hi Steve,

you need a db backend to have restart persistence. From what I 
understood seed node require a db backend to restore data that require 
restart persistence.



On Wednesday, 28 August 2019, 9:25:27 am SGT, Steve Sharad Kumar 
 wrote:



Hi,

We have 2 openSIPS instances in HA and one instance is seed node with 
seed flag in the DB. So each time backup node reboots and it always 
syncs the dialog from seed node. But how we can make a seed node to 
sync the dialog from other backup node is seed node reboots?


I tried to make both nodes seed but primary node (seed) never syncs 
the dialog. So i execute the dialog sync command using keepalived 
everytime seed node reboots. Is there any other way to make seed node 
sync too please.


Any help will be appreciated.

Steve Sharad Kumar
___
Users mailing list
Users@lists.opensips.org <mailto: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 2.4 HA Seed Node Dialog Sync

2019-08-28 Thread Vlad Patrascu

Hi,

If you are using a 2.4 build newer than 8 July, you can set the the 
following modparam to configure the seed node to also try to find a sync 
donor within a given interval:


...
modparam("clusterer", "seed_fallback_interval", 5)
...

Otherwise, this improvement is not included in the latest 2.4.6 release, 
and the only option is triggering the sync MI command.


Regards,

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

On 08/27/2019 11:41 PM, Steve Sharad Kumar wrote:

Hi,

We have 2 openSIPS instances in HA and one instance is seed node with 
seed flag in the DB. So each time backup node reboots and it always 
syncs the dialog from seed node. But how we can make a seed node to 
sync the dialog from other backup node is seed node reboots?


I tried to make both nodes seed but primary node (seed) never syncs 
the dialog. So i execute the dialog sync command using keepalived 
everytime seed node reboots. Is there any other way to make seed node 
sync too please.


Any help will be appreciated.

Steve Sharad Kumar


___
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] Function add_isup_part() parsing error in opensips 3.0

2019-07-18 Thread Vlad Patrascu

It's on 3.1 and 3.0.

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

On 07/18/2019 09:52 AM, sagar malam wrote:

Hi Vlad,

Thanks for fix.Is it pushed to 3.0 ? or it will be released with 3.1 ?

On Wed, Jul 17, 2019 at 8:41 PM Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


Hi Sagar,

This is a bug introduced when porting the script functions
interface to 3.0. I've just pushed a fix, thanks for reporting!

    Regards,

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

On 07/17/2019 05:05 PM, sagar malam wrote:

Hello,

Can anyone please help me on this ?

On Tue, Jul 16, 2019 at 3:22 PM sagar malam mailto:sagarma...@gmail.com>> wrote:

Hello,
I am using *add_isup_part([isup_msg_type][,extra_headers])*
function from request and failure route to local route  in
*Opensips 3.0* version script but I am getting parsing error
as below . I AM NOT GETTING THIS ERROR IN OPENSIPS 2.x.
Please help me on this issue.

Usage :

        if(!isflagset(11) && $avp(tsi_types)=="SIP-I" ) {
                $ru  = $ru + ";user=phone";
               xlog("L_INFO","Adding isup part ");

if(add_isup_part("Initial address")) {
                        setflag(11);
                }

        } else {
                xlog("L_INFO","Removing isup part ");
remove_body_part("application/sdp","revert");
        }

--
Error :
Jul 15 10:46:35 sbcsbc opensips: CRITICAL:core:yyerror: parse
error in /usr/local//etc/opensips/opensips.cfg:1282:28-29:
*Command  cannot be used in the block#012*
Jul 15 10:46:35 sbcsbc opensips:        xlog("L_INFO","Adding
isup part ");
Jul 15 10:46:35 sbcsbc opensips:
Jul 15 10:46:35 sbcsbc opensips:
#011#011if(add_isup_part("Initial address")) {
Jul 15 10:46:35 sbcsbc opensips: #011#011^~
Jul 15 10:46:35 sbcsbc opensips: #011      #011setflag(11);
Jul 15 10:46:35 sbcsbc opensips: #011#011}
Jul 15 10:46:35 sbcsbc opensips:
ERROR:core:parse_opensips_cfg: bad config file (1 errors)
Jul 15 10:46:35 sbcsbc opensips: ERROR:core:main: failed to
parse config file (null)
Jul 15 10:46:35 sbcsbc opensips: NOTICE:core:main: Exiting

--


-- 
Thanks,


Sagar



-- 
Thanks,


Sagar


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


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



--
Thanks,

Sagar


___
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] Function add_isup_part() parsing error in opensips 3.0

2019-07-17 Thread Vlad Patrascu

Hi Sagar,

This is a bug introduced when porting the script functions interface to 
3.0. I've just pushed a fix, thanks for reporting!


Regards,

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

On 07/17/2019 05:05 PM, sagar malam wrote:

Hello,

Can anyone please help me on this ?

On Tue, Jul 16, 2019 at 3:22 PM sagar malam <mailto:sagarma...@gmail.com>> wrote:


Hello,
I am using *add_isup_part([isup_msg_type][,extra_headers])*
function from request and failure route to local route  in
*Opensips 3.0* version script but I am getting parsing error as
below . I AM NOT GETTING THIS ERROR IN OPENSIPS 2.x. Please help
me on this issue.

Usage :

        if(!isflagset(11) && $avp(tsi_types)=="SIP-I" ) {
                $ru  = $ru + ";user=phone";
               xlog("L_INFO","Adding isup part ");

                if(add_isup_part("Initial address")) {
                        setflag(11);
                }

        } else {
                xlog("L_INFO","Removing isup part ");
remove_body_part("application/sdp","revert");
        }

--
Error :
Jul 15 10:46:35 sbcsbc opensips: CRITICAL:core:yyerror: parse
error in /usr/local//etc/opensips/opensips.cfg:1282:28-29:
*Command  cannot be used in the block#012*
Jul 15 10:46:35 sbcsbc opensips:  xlog("L_INFO","Adding isup part ");
Jul 15 10:46:35 sbcsbc opensips:
Jul 15 10:46:35 sbcsbc opensips: #011#011if(add_isup_part("Initial
address")) {
Jul 15 10:46:35 sbcsbc opensips: #011#011^~
Jul 15 10:46:35 sbcsbc opensips: #011  #011setflag(11);
Jul 15 10:46:35 sbcsbc opensips: #011#011}
Jul 15 10:46:35 sbcsbc opensips: ERROR:core:parse_opensips_cfg:
bad config file (1 errors)
Jul 15 10:46:35 sbcsbc opensips: ERROR:core:main: failed to parse
config file (null)
Jul 15 10:46:35 sbcsbc opensips: NOTICE:core:main: Exiting

--


-- 
Thanks,


Sagar



--
Thanks,

Sagar


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


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


Re: [OpenSIPS-Users] need some help using opensips 3.0 cluster module .

2019-07-09 Thread Vlad Patrascu

Hi,

I would advise to directly rely on the usrloc module for configuring 
distributed user location, instead of manually scripting this using the 
clusterer script functions.


You can read more about this here:

- usrloc module documentation [1]

- federated user location tutorial [2] - this is for 2.4 but aside from 
syntax changes, the config should be quite similar.


[1] 
https://opensips.org/html/docs/modules/3.0.x/usrloc.html#distributed-sip-user-location


[2] 
https://opensips.org/Documentation/Tutorials-Distributed-User-Location-Federation


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

On 07/09/2019 02:08 PM, Sasmita Panda wrote:

Hi ,


I have followed the below link while configuring opensips 2.4

https://saevolgo.blogspot.com/2018/01/opensips-geo-distributed-clustering.html 



Is there any document which I can follow for opensips 3.0 also . 
Please let me know or provide any sample config file if possible .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Tue, Jul 9, 2019 at 4:27 PM Sasmita Panda <mailto:spa...@3clogic.com>> wrote:


Hi Vlad ,

I got that and modified . Thanks for your reply .

But I am facing some other problem now . Wherever I have written 
xlog to print some user defined logs these logs are not getting
printed .  I think I am doing some other mistakes in the config
also .

Can I get a sample config with cluster module enable for opensips
3.0 ? Earlier I have tested with 2.4 and it was working fine . But
lots of things changed in 3.0 and so I am stuck .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Tue, Jul 9, 2019 at 4:05 PM Vlad Patrascu mailto:vl...@opensips.org>> wrote:

Hi Sasmita,

The actual name of the parameter, as stated in the docs for
E_CLUSTERER_REQ_RECEIVED, is "msg". So you should access it by
/$param(msg)/.

Regards,

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

On 07/08/2019 02:29 PM, Sasmita Panda wrote:

event_route[E_CLUSTERER_REQ_RECEIVED]{
        $avp(state) = $(param(rcv_msg){s.select,0,:});
        $avp(user) = $(param(rcv_msg){s.select,1,:});
        $avp(proxy) = $(param(rcv_msg){s.select,2,:});
xlog("L_INFO","[CLUSTER-TALK] {MSG:$avp(rcv_msg)} Sender
Proxy:$avp(proxy) SRC_ID:$avp(source_id) User: $avp(user)
State: $avp(state) ClusterId: $param(cluster_id)\n")
        if($avp(state) =~ "REGOFFLINE") {
cache_raw_query("redis:group1","HDEL REGONLINE $avp(user)");
        }else if($avp(state) =~ "REGONLINE") {
cache_raw_query("redis:group1","HSET $avp(state) $avp(user)
$avp(proxy)");
        }else if($avp(state) =~ "WHEREIS") {
                route(QUERY_LOCAL_CACHE);
        }else if($avp(state) =~ "HACKER"){
                $avp(useragent) = $avp(user);
                $avp(hacker_ip) = $avp(proxy);
                xlog("L_INFO","[CLUSTER-TALK] HACKER IP
DETECTED BY CLUSTER ADDING $avp(hacker_ip) & User-Agent:
$(avp(useragent){s.b64decode}) Into Watch-List\n");

cache_raw_query("redis:group1","HSET HACKER_USERAGENT_LIST
$avp(useragent) $avp(hacker_ip)");
cache_raw_query("redis:group1","HSET HACKER_IP_LIST
$avp(hacker_ip) $avp(useragent)");
        }

        exit;
}

This is giving warning in opensips 3.0  as below .
*WARNING:event_route:event_route_param_get: Parameter
 not found for event *
**
*             Due to this the data is not getting saved in
the subsequent node in the cluster .  How I will fix this ? *
*
*
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Jul 4, 2019 at 5:35 PM Sasmita Panda
mailto:spa...@3clogic.com>> wrote:

Thank you for your quick response . I resolved it .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Jul 4, 2019 at 5:12 PM Liviu Chircu
mailto:li...@opensips.org>> wrote:

Hey Sasmita,

I had a similar problem yesterday. In 3.0,
fetch_event_params() was removed, and you are
simply supposed to access your params via:

  $param(cluster_id), $param(src_id), $param(

Re: [OpenSIPS-Users] need some help using opensips 3.0 cluster module .

2019-07-09 Thread Vlad Patrascu

Hi Sasmita,

The actual name of the parameter, as stated in the docs for 
E_CLUSTERER_REQ_RECEIVED, is "msg". So you should access it by 
/$param(msg)/.


Regards,

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

On 07/08/2019 02:29 PM, Sasmita Panda wrote:

event_route[E_CLUSTERER_REQ_RECEIVED]{
        $avp(state) = $(param(rcv_msg){s.select,0,:});
        $avp(user) = $(param(rcv_msg){s.select,1,:});
        $avp(proxy) = $(param(rcv_msg){s.select,2,:});
xlog("L_INFO","[CLUSTER-TALK] {MSG:$avp(rcv_msg)} Sender 
Proxy:$avp(proxy) SRC_ID:$avp(source_id) User: $avp(user) State: 
$avp(state) ClusterId: $param(cluster_id)\n")

        if($avp(state) =~ "REGOFFLINE") {
                cache_raw_query("redis:group1","HDEL REGONLINE 
$avp(user)");

        }else if($avp(state) =~ "REGONLINE") {
                cache_raw_query("redis:group1","HSET $avp(state) 
$avp(user) $avp(proxy)");

        }else if($avp(state) =~ "WHEREIS") {
                route(QUERY_LOCAL_CACHE);
        }else if($avp(state) =~ "HACKER"){
                $avp(useragent) = $avp(user);
                $avp(hacker_ip) = $avp(proxy);
                xlog("L_INFO","[CLUSTER-TALK] HACKER IP DETECTED BY 
CLUSTER ADDING $avp(hacker_ip) & User-Agent: 
$(avp(useragent){s.b64decode}) Into Watch-List\n");


                cache_raw_query("redis:group1","HSET 
HACKER_USERAGENT_LIST $avp(useragent) $avp(hacker_ip)");
                cache_raw_query("redis:group1","HSET HACKER_IP_LIST 
$avp(hacker_ip) $avp(useragent)");

        }

        exit;
}

This is giving warning in opensips 3.0  as below .
*WARNING:event_route:event_route_param_get: Parameter  not 
found for event *

**
*             Due to this the data is not getting saved in the 
subsequent node in the cluster .  How I will fix this ? *

*
*
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Jul 4, 2019 at 5:35 PM Sasmita Panda <mailto:spa...@3clogic.com>> wrote:


Thank you for your quick response . I resolved it .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Jul 4, 2019 at 5:12 PM Liviu Chircu mailto:li...@opensips.org>> wrote:

Hey Sasmita,

I had a similar problem yesterday.  In 3.0,
fetch_event_params() was removed, and you are
simply supposed to access your params via:

  $param(cluster_id), $param(src_id), $param(rcv_msg) and
$param(rcv_tag)

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

On 04.07.2019 14:22, Sasmita Panda wrote:

Hi All ,

Previously I have used cluster module with opensips 2.4 and
that was working fine . Now I want to upgrade to opensips 3.0
. And there are lots of parameter get changed in opensips 3.0 .

Is there any documentation for cluster module in 3.0 . I need
an example for config file which I can use with opensips 3.0 .

Now I am facing problem in bellow lines .

event_route[E_CLUSTERER_RPL_RECEIVED]{

fetch_event_params("$avp(cluster_id);$avp(src_id);$avp(rcv_msg);$avp(rcv_tag)");
        $avp(state) = $(avp(rcv_msg){s.select,0,:});
        $avp(user) = $(avp(rcv_msg){s.select,1,:});
        $avp(proxy) = $(avp(rcv_msg){s.select,2,:});
        xlog("L_INFO","[CLUSTER-TALK] Replying
Proxy:$avp(proxy) User: $avp(user) State: $avp(state)
ClusterId: $avp(cluster_id) TAG: $avp(rcv_tag) \n");
}

fetch_event_params  this is not present in opensips 3.0 . How
I will convert this so that it will support in opensips 3.0.
Please do help me .




*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/

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

___
Users mailing list
Users@lists.opensips.org <mailto: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] How to add ISUP part to 403 via send_reply function?

2019-06-13 Thread Vlad Patrascu

Hi Oleg,

Unfortunately, at the moment there is no way to do this, as the 
/add_isup_part()/ function appends an ISUP body to the SIP message 
exposed in the current script route. So the only option is to add the 
ISUP body to a received reply, not a locally generated one.


Also, it's not an easy/quick feature to implement, but if you don't find 
a way around it and think it would be useful, please open a feature 
request on Github.


Regards,

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

On 06/12/2019 07:42 PM, Олег Подгуйко via Users wrote:
My opensips works as state-full-proxy. At the one side it works via 
SIP-I, at another side via SIP. Everything is ok.
In one of my business-cases I get some INVITE with ISUP body with 
certain parameters from SIP-I side I need to send 403 with ISUP body 
including ISUP reason.

To do this I try to use function:  send_reply("403","Some reason").

It looks like

# Encapsulate a REL
add_isup_part("REL");
$isup_param(Cause Indicators | Cause value) = 21;
send_reply("403","The reason is 21");
xlog("L_WARN","The call was rejected with 21");
exit;

But actually 403 is sending without any ISUP body.

Is it possible to do such action?


--
Oleg Podguyko


___
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] dialog-dlg-repl capability State=not synced in a 2-node cluster, but dialog-prof-repl State=Ok

2019-06-07 Thread Vlad Patrascu

Hi Hari,

I notice that you use 'db_mode' 0 and set the 
'current_info'/'neighbor_info' modparams. In this case, there is no need 
to provision anything else in the DB, the nodes will automatically 
discover the topology. Usually this is useful when you want nodes 
dynamically joining the cluster.


But the problem you're facing is probably caused by not setting any node 
in the cluster with the "seed" flag. You can read more about this here 
[1]. If everything is configured correctly, setting 
'dialog_replication_cluster' should be enough in order to replicate dialogs.


[1] https://opensips.org/html/docs/modules/3.0.x/clusterer.html#capabilities

Regards,

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


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


Re: [OpenSIPS-Users] cluster dialog synchronization - 200Ok/180Ringing ?

2019-05-07 Thread Vlad Patrascu
Yes it is . But even if the dialog specific data would have been 
replicated sooner, transactions are not replicated. As such, when the 
backup node takes over it cannot make sense of the 200 OK anyway.


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

On 05/07/2019 05:06 PM, Konrad Malewski wrote:


so if there is like 60 sec after 180ringing and 200ok - during that 
time this dialog is vulnerable to failover ?


On Tue, May 7, 2019 at 3:59 PM Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


Hi Konrad,

The dialog is replicated after the 200 OK is received.

Regards,

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

<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.opensips-2Dsolutions.com&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_A&r=Q2-P3NgorS0ZH4_aMeg5NL1og3Rsx6yNgM-aaPfa8xzzIkVlEcHJTs2jlyabbp9e&m=Fj_nyRYH9UHn3Dx85pRDIF29KpGk8e8xgDGDS9NQfe0&s=bj9ef4taHUsG059fUfifgY1l66gNZXwXrF5Oj5x83-Y&e=>

On 05/07/2019 04:43 PM, Konrad Malewski wrote:

Hello,

I have a question regarding dialog synchronization in opensips
cluster.

Does dialog synchronization happen after initial transaction is
complete or before ? (When backup is able to take over failed
active node?)

I am asking because it may be a lot of time after 180Ringing
before 200Ok arrives.

thanks,
-- 
Konrad Malewski



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

<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opensips.org_cgi-2Dbin_mailman_listinfo_users&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_A&r=Q2-P3NgorS0ZH4_aMeg5NL1og3Rsx6yNgM-aaPfa8xzzIkVlEcHJTs2jlyabbp9e&m=Fj_nyRYH9UHn3Dx85pRDIF29KpGk8e8xgDGDS9NQfe0&s=zNjisP_DWAX5QHdaLvr5SOM8oZ1MfdElR_5vfGOJ4ls&e=>


___
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>

https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opensips.org_cgi-2Dbin_mailman_listinfo_users&d=DwIGaQ&c=q3cDpHe1hF8lXU5EFjNM_A&r=Q2-P3NgorS0ZH4_aMeg5NL1og3Rsx6yNgM-aaPfa8xzzIkVlEcHJTs2jlyabbp9e&m=Fj_nyRYH9UHn3Dx85pRDIF29KpGk8e8xgDGDS9NQfe0&s=zNjisP_DWAX5QHdaLvr5SOM8oZ1MfdElR_5vfGOJ4ls&e=



--
--
Konrad Malewski


___
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] cluster dialog synchronization - 200Ok/180Ringing ?

2019-05-07 Thread Vlad Patrascu

Hi Konrad,

The dialog is replicated after the 200 OK is received.

Regards,

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

On 05/07/2019 04:43 PM, Konrad Malewski wrote:

Hello,

I have a question regarding dialog synchronization in opensips cluster.

Does dialog synchronization happen after initial transaction is 
complete or before ? (When backup is able to take over failed active 
node?)


I am asking because it may be a lot of time after 180Ringing before 
200Ok arrives.


thanks,
--
Konrad Malewski


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


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


Re: [OpenSIPS-Users] b2b top hiding with opensips 3.0.0-beta gives "Wrong Scenary ID"

2019-04-23 Thread Vlad Patrascu

Hi,

Thanks for the report, this was a bug and I've pushed the fix for it, it 
should be fine now.


Regards,

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

On 04/23/2019 01:54 PM, Konrad Malewski wrote:

Hello,

I switched to opensips3 and b2b internal scenario stopped working:

Apr 23 10:33:29 [55] ERROR:b2b_logic:fixup_b2b_logic: Wrong Scenary 
ID. No scenario with this ID [�Ͷ�s]

Apr 23 10:33:29 [55] ERROR:core:fix_cmd: Fixup failed for param [1]
Apr 23 10:33:29 [55] ERROR:core:fix_actions: Failed to fix command 

Apr 23 10:33:29 [55] ERROR:core:fix_actions: fixing failed (code=-1) 
at /etc/opensips/opensips.cfg:185
Apr 23 10:33:29 [55] ERROR:core:main: failed to fix configuration with 
err code -1


Line 185 of configuration contains only
 -> b2b_init_request("top hiding");

did scenario name changed ?

--
--
Konrad Malewski


___
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] how to migrate statistics to 3.x ?

2019-04-12 Thread Vlad Patrascu
The opensipsctl tool does not work anymore with the get_statistics 
command and will be dropped soon anyway. Please try the new opensips-cli 
tool.


Regards,

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

On 04/11/2019 12:54 PM, Konrad Malewski wrote:

Hello,

I am using 3.0.0-dev version and I am having problem with opensipsctl 
command for statistics:


$opensipsctl fifo get_statistics load-all
{
   "jsonrpc": "2.0",
   "id": "a7cbfd4e",
   "error": {
      "message": "Invalid params",
      "code": -32602
   }
}

$opensipsctl fifo get_statistics load:
{
   "jsonrpc": "2.0",
   "id": "177e12c6",
   "error": {
      "message": "Invalid params",
      "code": -32602
   }
}

the log says: ERROR:core:get_mi_array_param: Parameter: statistics is 
not an array.


What is the new syntax ?

--
--
Konrad Malewski


___
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] sip-i ?

2019-03-26 Thread Vlad Patrascu

Hi Sean,

You can set a custom value for any ISUP parameter that appears in the 
specification. In your case, you can do:


$isup_param(User Service Information) = "0x8090A2"

Regards,

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

On 03/26/2019 04:22 PM, Sean Watkins wrote:

Hi Bogan

I got some more success yesterday with it --  I'll post my configs
after, for a SIP-I to SIP gateway.

Where I'm stuck now - there seems to be some differences between ANSI
+ ITU. I've got the invite coming into Opensips, then I'm successfully
adding the SDP info for ISUP. (Whomever came up with this... crazy!)

The far end carrier always drops the calls 483 Incomplete address.

Working with the vendor the carrier, they suspect its in the User
service information -

They want something like this:
 User Service Information
 Mandatory Parameter: User service information (29)
 Pointer to Parameter: 3
 Parameter Length: 3
 User service information (-> Q.931
Bearer_capability): 8090a2
 1...  = Extension indicator: last octet
 .00.  = Coding standard: ITU-T
standardized coding (0x0)
 ...0  = Information transfer capability:
Speech (0x00)
 1...  = Extension indicator: last octet
 .00.  = Transfer mode: Circuit mode (0x0)
 ...1  = Information transfer rate: 64 kbit/s (0x10)
 1...  = Extension indicator: last octet
 .01.  = Layer identification: Layer 1
identifier (0x1)
 ...0 0010 = User information layer 1 protocol:
Recommendation G.711 u-law (0x02)


Is there any way to customize this in OpenSIPS?

Sean

Sean



On Tue, Mar 26, 2019 at 1:28 AM Bogdan-Andrei Iancu  wrote:

Hi Sean,

Where have you got stuck ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Summit 2019
https://www.opensips.org/events/Summit-2019Amsterdam/

On 03/22/2019 10:47 PM, Sean Watkins wrote:

Hi

Are there any SIP-I experts on here that are willing todo some consulting?

I need to get a SIP-I to SIP gateway working... I've got partial call
connectivity working, but I don't seem to know what I'm doing..

Don't get all the ins and outs of reply etc..

Sean

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


--
--
Sean Watkins
403-629-6152

___
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] clusterer.so settings in 2.4.x

2019-03-15 Thread Vlad Patrascu

Yes, that is correct.

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

On 03/15/2019 12:32 PM, Alexey Kazantsev via Users wrote:

Hi Vlad, thank you for the reply.

So I have to configure it in this way:

# main node, which is active if everything's OK
modparam("clusterer", 
"current_info","cluster_id=1,url=bin:10.45.144.77:,flags=seed")
modparam("clusterer", 
"neighbor_info","cluster_id=1,node_id=2,url=bin:10.45.144.79:")

# backup node, which is standby and will work in case of node1 failure
modparam("clusterer", 
"current_info","cluster_id=1,url=bin:10.45.144.79:")
modparam("clusterer", 
"neighbor_info","cluster_id=1,node_id=1,url=bin:10.45.144.77:")


Is it correct?
So, node with BIN IP 10.45.144.77 will be a seed, a source of ready cluster 
info/data.

---
BR, Alexey
http://alexeyka.zantsev.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] clusterer.so settings in 2.4.x

2019-03-15 Thread Vlad Patrascu

Hi Alexey,

For your clustering scenario you should use the seed flag only in one of 
the nodes' configs.


Regards,

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

On 03/15/2019 11:13 AM, Alexey Kazantsev via Users wrote:

Hi list!

I have a working active-backup cluster of two OpenSIPS 2.4.5 nodes.
(listening on virtual IP being moved by Keepalived,
and Redis instances for RTPEngines).

I configured clusterer module without DB support.
I'm a little bit confused if I have to use 'flags=seed' only in one
config or in both nodes's configs?

As for now, it is so:

# OpenSIPS1
modparam("clusterer", 
"current_info","cluster_id=1,url=bin:10.145.213.63:,flags=seed")
modparam("clusterer", 
"neighbor_info","cluster_id=1,node_id=2,url=bin:10.145.213.155:")

# OpenSIPS2
modparam("clusterer", "current_info", 
"cluster_id=1,url=bin:10.145.213.155:,flags=seed")
modparam("clusterer", "neighbor_info", 
"cluster_id=1,node_id=1,url=bin:10.145.213.63:")


https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/
https://opensips.org/html/docs/modules/2.4.x/clusterer.html

---
BR, Alexey
http://alexeyka.zantsev.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] opensips 2.4.4: bug in tls_mgm

2019-03-07 Thread Vlad Patrascu

Hi Johan,

The issue is probably caused by the fact that OpenSIPS tries to 
initialize a 'default' client and server domain and the certificate file 
is inexistent at the default path 
('/usr/local/opensips//etc/opensips/tls/cert.pem'). So even if you 
define your "sv_dom" custom server domain, OpenSIPS still tries to 
create default domains for fallback purposes. When you omit the 
'[sv_dom]' prefix for the domain settings in your second test, you 
overwrite the default ones (with a valid path for the certificate this 
time).


In conclusion, either specify your custom domain _and_ default domains 
separately (set the modparams multiple times) or make sure the 
certificate is found at the default path. Also, note that it's not 
necessary to define a custom server domain if you only intend to use a 
single one, as the default will match any socket.


Regards,

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

On 02/17/2019 01:35 PM, johan de clercq wrote:


Hi,

I believe that I have found a bug in tls_mgm:

Using opensips default certificates:

/usr/local/opensips/etc/opensips/tls# ls -lu

total 24

-rw-r--r-- 1 root staff 2049 Feb 17 12:13 ca.conf

-rw-r--r-- 1 root staff 1048 Feb 17 12:13 README

-rw-r--r-- 1 root staff 1127 Feb 17 12:13 request.conf

drwxr-sr-x 4 root staff 4096 Feb 17 12:16 rootCA

drwxr-sr-x 2 root staff 4096 Feb 17 12:13 user

-rw-r--r-- 1 root staff  591 Feb 17 12:13 user.conf

/usr/local/opensips/etc/opensips/tls/rootCA# ls

cacert.pem  certs  index.txt  private serial

Tls params:

loadmodule "tls_mgm.so"

modparam("tls_mgm", "server_domain", "sv_dom=5.135.140.139:5061")

modparam("tls_mgm", "require_cert", "[sv_dom]0")

modparam("tls_mgm", "verify_cert", "[sv_dom]0")

modparam("tls_mgm", "tls_method", "[sv_dom]SSLv23")

modparam("tls_mgm", "certificate", 
"[sv_dom]/usr/local/opensips/etc/opensips/tls/rootCA/cacert.pem")


modparam("tls_mgm", "private_key", 
"[sv_dom]/usr/local/opensips/etc/opensips/tls/rootCA/private/cakey.pem")


modparam("tls_mgm", "ca_list", 
"[sv_dom]/usr/local/opensips/etc/opensips/tls/rootCA/cacert.pem")


 PROTO_TLS module

loadmodule "proto_tls.so"

modparam("proto_tls", "trace_destination", "hep_dest")

modparam("proto_tls", "trace_on", 1)

I removed the passphrase:

mv etc/tls/rootCA/private/cakey.pem 
etc/tls/rootCA/private/cakey.pem.protected


openssl rsa -in etc/tls/rootCA/private/cakey.pem.protected -out 
etc/tls/rootCA/private/cakey.pem


and then tried to run opensips from cmdline : ./opensips -f 
/usr/local/opensips/etc/opensips/opensips.cfg


syslog output:

Feb 17 12:22:01 ns3012072 ./opensips[28673]: 
ERROR:tls_mgm:load_certificate: unable to load certificate file 
'/usr/local/opensips//etc/opensips/tls/cert.pem'


Feb 17 12:22:01 ns3012072 ./opensips[28673]: 
ERROR:tls_mgm:init_tls_domains: Failed to init TLS domain 'default'


Feb 17 12:22:01 ns3012072 ./opensips[28673]: ERROR:core:init_mod: 
failed to initialize module tls_mgm


Feb 17 12:22:01 ns3012072 ./opensips[28673]: ERROR:core:main: error 
while initializing modules


Feb 17 12:22:01 ns3012072 ./opensips[28673]: CRITICAL:core:sig_usr: 
segfault in attendant (starter) process!


Feb 17 12:22:01 ns3012072 kernel: [ 4024.678398] opensips[28673]: 
segfault at 7fcb76dbf850 ip 7fcb76546f69 sp 7ffe803ac150 error 
4 in libcrypto.so.1.1[7fcb763df000+265000]


Next I tried with:

loadmodule "tls_mgm.so"

#modparam("tls_mgm", "server_domain", "sv_dom=5.135.140.139:5061")

modparam("tls_mgm", "require_cert", "0")

modparam("tls_mgm", "verify_cert", "0")

modparam("tls_mgm", "tls_method", "SSLv23")

modparam("tls_mgm", "certificate", 
"/usr/local/opensips/etc/opensips/tls/rootCA/cacert.pem")


modparam("tls_mgm", "private_key", 
"/usr/local/opensips/etc/opensips/tls/rootCA/private/cakey.pem")


modparam("tls_mgm", "ca_list", 
"/usr/local/opensips/etc/opensips/tls/rootCA/cacert.pem")


 PROTO_TLS module

loadmodule "proto_tls.so"

modparam("proto_tls", "trace_destination", "hep_dest")

modparam("proto_tls", "trace_on", 1)

and then opensips starts…

Can you please explain what I am doing wrong ?

cid:F3100D46-F00D-4610-87ED-3E91DA790A82

Johan De Clercq, Managing Director
Democon bvba - Ooigemstraat 41 - 8780 Oostrozebeke

Tel +3256980990– GSM +32478720104



___
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] Query regarding opensips cluster module .

2019-01-03 Thread Vlad Patrascu

Hi,

You should issue the 'clusterer_reload' MI command on all running nodes 
after adding a new one in the DB and no restart is necessary.


Regards,

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

On 12/28/2018 09:56 AM, Sasmita Panda wrote:

version: opensips 2.2.4 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
F_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_lt, epoll_et, sigio_rt, select.
svn revision: 3247:3606M
main.c compiled on 09:50:32 Nov 12 2018 with gcc 4.8.3


This is the entire version . Can anyone let me know , whether I am in 
the latest version or I need to update my code ??


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Thu, Dec 27, 2018 at 6:33 PM Sasmita Panda <mailto:spa...@3clogic.com>> wrote:


Hi All,

I am using below version of opensips .
version: opensips 2.2.4

I have configured cluster module and I have 2 node in a single
cluster .
Lets say I am adding another node into the same cluster . Each
time I have to update the config file with the new node
information or add the new entry in the DB and restart the process .

I don't want to disturb the running setup while adding new node . 
Is there a way through which I can do it in runtime .

for example : when I am updating something in dynamic routing , I
am adding that through command line and reload the db to have the
updated information . I am not force to restart the process .

Can cluster module also work in the same way ? There is no option
to add the DB entry through command line also . Is that's also a
limitation in cluster module ?

Please do help me . I am not getting anything regarding this in
the module documentation .

*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/



___
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] I deleted an entry from clusterer table , but still opensips try to ping that node .

2019-01-03 Thread Vlad Patrascu

Hi Sasmita,

By default, there is no clusterer replication if "replicate_contacts_to" 
parameter is not set in usrloc. Also, even if another node is sending 
replication packets, they will no get processed on the receiving node 
unless "accept_replicated_contacts" is set. On a typical setup, both 
these parameter should be set on all nodes.


Are you getting any other errors in the logs besides that "parameter not 
found" ?


Btw, I strongly suggest updating to 2.4 as it has received major 
upgrades in terms of clustering.


Regards,

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

On 01/02/2019 12:10 PM, Sasmita Panda wrote:

Hi,
I have another doubt . Please do help me .

When I am reading usrloc module document , its saying in a cluster if 
we want to replicate the contacts across the cluster then we have to 
set a parameter as below .

modparam("usrloc", "replicate_contacts_to", 1)
The default value is 0 , where no cluster id is mentioned .
I have not set this , I have a cluster having 2 node . While I am registering a 
user , the contact is getting replicated between 2 nodes .
If I am trying to mention this parameter , then opensips is not getting started 
. Its saying
*Parameter  not found in module *
*So , my question is , if this parameter is not set , still how contact 
replication is happening ? Is this the default behavior of cluster 
module ? *
*May be my question is foolish ,it will be great if anybody will 
explain this . *

**
**
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Wed, Jan 2, 2019 at 12:22 PM Sasmita Panda <mailto:spa...@3clogic.com>> wrote:


Hi   Sammy,

Yes , you are right . I need to reload the cluster data through MI
command . After reloading its seems fine .

I was not aware about the fact that the cluster data also get
shared with all nodes when I am adding that in 1 node only .

Thank you for your explanation . Its really helpful .


*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Mon, Dec 31, 2018 at 10:25 PM SamyGo mailto:govoi...@gmail.com>> wrote:

Hi,
Did you restart OpenSIPS process on both node1, and 2
simultaneously ? The way I look at this is one of the two
nodes kept the 3rd one in the memory and restarting both nodes
one at a time resulted in both sharing their node structure
and hence node3 stayed visible.
I think possible way to remove a node gracefully would be to
disable the node via the MI command and then remove from DB. I
will try doing this on my test setup as well.

Regards,
Sammy

On Fri, Dec 28, 2018 at 6:40 AM Sasmita Panda
mailto:spa...@3clogic.com>> wrote:

Hi All,

I have a cluster of 2 nodes . Both in working condition . 
  Then I added another node in the same cluster which is
down .

I restarted the opensips process , so it starts pinging
the new node to check its status .  As the new node is
down  , other nodes in the cluster wont get any reply for
the ping  . Then I remove the 3rd node from the cluster
table and restart the opensips process .

Now what I am getting in logs is , still the 2 working
node in the cluster try to ping the 3rd node which is not
in the DB .

Is this an issue on the cluster module or I am doing
something wrong ?? Please help me .
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/
___
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org <mailto: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] SIP-I and CANCEL

2018-12-07 Thread Vlad Patrascu

Hi Giovanni,

Although I'm not claiming to be an expert at all in isup-sip 
interworking, the ITU Q.1912.5 document seems to say that it is not 
necessary to encapsulate REL in CANCEL. You can take a look at the 
example in Figure III.13/Q.1912.5 from Appendix III section of the document.


Regards,

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

On 12/07/2018 07:18 PM, Giovanni Maruzzelli wrote:
On Fri, Dec 7, 2018 at 6:14 PM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Giovanni,

The CANCEL is hop-by-hop, which means each SIP hop will generate a
completely new CANCEL (to be sent further) - there is not
proxying, so the changes you do over the incoming CANCEL will not
propagate into the outgoing CANCEL.


Ciao Bogdan,

yep, saw that


I cannot recall it, but is there a standard case of pushing ISUP
into CANCEL ?


Not sure at all, I am looking around in various (too much) 
documentation around the intertube, not yet sure if you must put isup 
REL into CANCEL or not...


Have a nice wend!
-giovanni

--
Sincerely,

Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18



___
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] Clustered User Location Full Sharing persistency and Cassandra

2018-10-09 Thread Vlad Patrascu

Hi Jock,

The Cassandra module hasn't been well maintained for quite some time up 
until relatively recently (the code wasn't even compiling anymore) so 
there is actually no RPM for it (yet).


Although the issues have been fixed and the module is now up to date 
with the latest Cassandra drivers, the features required for the usrloc 
clustering have only been implemented on the devel branch for Opensips 3.0.


Regards,

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

On 10/09/2018 06:40 PM, Jock McKechnie wrote:

Good morning;

We are attempting to implement a Full Sharing topology User Location
cluster and I'm trying to make sense of whether this can work with
Cassandra or not.

At present we have a four-node cluster (across two datacentres)
working in an in-memory state, with the nodes seeding from each other
(by setting the clusterer node definition flags field to 'NULL' for
all nodes). We'd like to consider having the data set stored to a
Cassandra cluster should we require a complete OpenSIPS cluster
restart, however the following line in the USRLOC documentation has me
wondering:

"Currently, registrations may optionally be fully managed inside NoSQL
databases which support key/multi-value column-like associations.
Example known backends to support these abstractions at the time of
writing are MongoDB and Cassandra. Of these two, only the MongoDB
OpenSIPS driver has been so far extended to implement the required
NoSQL API endpoints."

I read this to say that while both MongoDB and Cassandra can do what
is required, only the MongoDB OpenSIPS modules are currently in a
state to support it. Is this correct?

I can't even work out what RPM the Cassandra module is in, which
doesn't help with me attempting to test. :)

My thanks for the clarification;

  - Jock

___
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] tls_mgm

2018-10-08 Thread Vlad Patrascu

Hi,

Are you running the latest revision of the devel branch? There was a fix 
about a month ago regarding this issue.


Regards,

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

On 10/07/2018 08:10 AM, Slava Bendersky wrote:

Hello Everyone,
I am trying load certificate from database and set filter for ip and 
sip domain to *, but give me error


Oct 7 01:06:05 canldev01-fedora27 /usr/sbin/opensips[17640]: 
ERROR:tls_mgm:parse_domain_address: TLS domain address has to be in 
[IP:port] format
Oct 7 01:06:05 canldev01-fedora27 /usr/sbin/opensips[17640]: 
ERROR:tls_mgm:parse_domain_address: invalid TLS domain address [*]
Oct 7 01:06:05 canldev01-fedora27 /usr/sbin/opensips[17640]: 
ERROR:tls_mgm:parse_match_addresses: Failed to parse address filter: *
Oct 7 01:06:05 canldev01-fedora27 /usr/sbin/opensips[17640]: 
ERROR:tls_mgm:db_add_domain: Failed to parse address matching filters
Oct 7 01:06:05 canldev01-fedora27 /usr/sbin/opensips[17640]: 
ERROR:tls_mgm:load_info: failed to add TLS domain 'default' id: 3, 
skipping...



What is missing ?

Thank you.

volga629


___
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] tls_mgm modparam

2018-09-11 Thread Vlad Patrascu

Hi Dan,

This was indeed a parsing bug, I've pushed the fix. Thanks for spotting it!

Regards,

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

On 09/10/2018 08:39 PM, Dan Pascu wrote:

Tried to use the following setting:

modparam("tls_mgm", "match_ip_address", "[default]*”)

This resulted in the following error:

Sep 10 20:19:07 [5987] ERROR:tls_mgm:parse_domain_address: TLS domain address 
has to be in [IP:port] format
Sep 10 20:19:07 [5987] ERROR:tls_mgm:parse_domain_address: invalid TLS domain 
address [*]
Sep 10 20:19:07 [5987] ERROR:tls_mgm:parse_match_addresses: Failed to parse 
address filter: *
Sep 10 20:19:07 [5987] ERROR:tls_mgm:tlsp_set_match_addr: Failed to parse 
domain matching filters for domain [default]
Sep 10 20:19:07 [5987] CRITICAL:core:yyerror: parse error in config file o.cfg, line 132, 
column 20-21: Parameter  not found in module  - 
can't set
Sep 10 20:19:07 [5987] ERROR:core:main: bad config file (1 errors)
Sep 10 20:19:07 [5987] NOTICE:core:main: Exiting


According to the documentation * should be accepted. Is this a bug in parsing 
or is the documentation wrong?


___
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] tls_mgm

2018-09-07 Thread Vlad Patrascu

Hi Volga,

You are probably getting these errors because you are not providing the 
TLS domain name in the parameter specifications. So all parameters 
should look something like this:


modparam("tls_mgm", "tls_method", "[dom_name]TLSv1")

Regards,

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

On 08/31/2018 05:15 PM, volga...@networklab.ca wrote:

Hello Everyone,
Recent versions of opensips tls_mgm module give this error.

opensips-3.0.0.b33b7a7e7-2.fc27.x86_64

[root@vprx00 ~]# opensips -V
version: opensips 3.0.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, 
PKG_MALLOC, QM_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.
git revision: b33b7a7e7
main.c compiled on 12:56:54 Aug 14 2018 with gcc 7


Aug 31 09:08:26 [14440] DBG:core:load_module: loading module 
/usr/lib64/opensips/modules/proto_hep.so
Aug 31 09:08:26 [14440] DBG:core:load_module: loading module 
/usr/lib64/opensips/modules/proto_tls.so
Aug 31 09:08:26 [14440] DBG:core:add_module_dependency: adding type 2 
dependency proto_tls - (module tls_mgm)
Aug 31 09:08:26 [14440] DBG:core:add_module_dependency: adding type 0 
dependency proto_tls - (module proto_hep)
Aug 31 09:08:26 [14440] DBG:core:load_module: loading module 
/usr/lib64/opensips/modules/tls_mgm.so

Aug 31 09:08:26 [14440] DBG:core:register_module: register_pv: tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 205, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 206, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 207, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 208, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 209, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found  
in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 210, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found  
in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:26 [14440] CRITICAL:core:yyerror: parse error in config 
file /etc/opensips/opensips.cfg, line 211, column 18-19: Parameter 
 not found in module  - can't set
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: tls_mgm matches 
module tls_mgm
Aug 31 09:08:26 [14440] DBG:core:set_mod_param_regex: found 
 in module tls_mgm [/usr/lib64/opensips/modules/]

Aug 31 09:08:26 [14440] ERROR:tls_mgm:split_param_val: No TLS domain name
Aug 31 09:08:2

Re: [OpenSIPS-Users] Help with my OpenSips architecture

2018-08-09 Thread Vlad Patrascu

Hi Dominic,

The state listed by 'clusterer_list_cap' refers to the startup 
synchronization mechanism. When you register a sip device on an 
instance, that event is replicated on the spot to the other instances in 
the cluster, but older registrations are only pulled from other nodes at 
startup. You probably did not set the "seed" flag for any of the nodes, 
so the syncing process is unable to bootstrap correctly.


Regards,

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

On 08/08/2018 09:55 PM, Dominic wrote:
There's something I'm not getting though, I defined my cluster with 2 
opensips instances:


# opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 2 DB_ID=-1 URL=bin:10.0.20.163:5566 
<http://10.0.20.163:5566> Enabled=1 Link_state=Up  Next_hop=2 
Description=none


# opensipsctl fifo clusterer_list_topology
Cluster:: 1
    Node:: 1 Neighbours=2
    Node:: 2 Neighbours=1

However it seems usrloc is not synced as seen in the state below:
# opensipsctl fifo clusterer_list_cap
Cluster:: 1
    Capability:: usrloc-contact-repl State=not synced

However if I register 1 sip device on instance 1, I can see the device 
on both instances if I run "opensipsctl ul show". So it looks as 
though the usrloc is replicated properly so I wonder why "opensipsctl 
fifo clusterer_list_cap" has the "not synced" state.


Dominic








On Wed, Aug 8, 2018 at 8:00 AM, Dominic <mailto:wallnut.monk...@gmail.com>> wrote:




On Wed, Aug 8, 2018 at 4:52 AM, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Hi Dominic,

Please see inline.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
<http://www.opensips-solutions.com>
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
<http://opensips.org/training/OpenSIPS_Bootcamp_2018/>

On 08/07/2018 10:36 PM, Dominic wrote:

Hi all, just to make sure I'm one the right track here I'd
like to share a few thoughts of where I'm currently going
with my architecture, any feedback is really appreciated
specially if it can help me avoid any pitfalls in the future.
Here is what I'm trying to do:

I currently have a a few asterisk servers directly facing the
public internet, with sip devices registering directly with a
specific asterisk.

So my first goal was to have the sip devices register
directly with OpenSips so I used the mid_registrar module for
that, and forward the registers to the right asterisk. This
seems to work very well so far.

Secondly, I setup rtp proxy, on the same box as opensips,
this also seems to work great so far. At this point I should
be able to not have the asterisk facing public internet.

Do you intend to move the * boxes to a private network ? or to
keep them with public IP, but behind a firewall ?


Yes I indend to move them to a private network behind a firewall
with no public IP.



The third thing I now want to do, and this is where I am
currently stuck is to figure out what my options are in terms
of high availability of the opensips. I figured I would go
with a VIP setup with 2 identical opensips box. So in this
type of setup i would have to replicate usrloc and dialogs
between the 2 opensips instances right? Am I forgetting anything?

yes, you are on the right tracks - use the dialog replication
(with a sharing tag) and usrloc full sharing mode - this will
give you the HA you are looking for (in combination with a VIP)


Perfect, I'll give that a shot



Am I on the right track with this type of setup or am I
missing something big here? It's also worth mentioning that I
am using OpenSIPS 2.4

Any advice/links with info on similar setup/code examples are
very welcome

For the HA, see

https://blog.opensips.org/2018/03/15/scaling-distributing-and-partitioning-registrations-with-opensips-2-4/

<https://blog.opensips.org/2018/03/15/scaling-distributing-and-partitioning-registrations-with-opensips-2-4/>

https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/

<https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/>

Thanks
Dominic


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


Thanks a lot for the replie

Re: [OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-08-08 Thread Vlad Patrascu

Hi John,

You conclusion about the modparam provisioning is not completely 
accurate. If you don't have any modparam statements in your script, the 
default preset values are only used as a backup for the default domains. 
And this is necessary in case you don't define the default domains in 
the database. So in this case, in order to always have some settings for 
the default domains, we do a fallback to the preset values.


As such, if you do have a default client and server domain defined in 
the DB and no modparam statements, no script provisioning should be 
taken into account.


Regards,

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

On 08/08/2018 05:36 PM, John Quick wrote:

Hi Vlad,

Thanks for replying.
Yes, I must have been looking at the wrong version in the documentation -
the old version was stored in my browser history and I failed to notice.

Even in the correct v2.4, the documentation for DB provisioning is more
complete when read alongside the extra information in your reply.

It is a pity that there is no way to completely disable provisioning from
modparam parameters when you want only to use the DB. Removing the modparam
statements does not disable them, but merely makes them use default preset
values.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk





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


Re: [OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-08-07 Thread Vlad Patrascu

Hi John,

You are probably looking over the documentation for the wrong OpenSIPS 
version. The issues that you've mentioned appear in the 2.2 docs.


The 2.4 docs should mostly cover your questions, but nevertheless:

a) The domain field is only an identifier for the virtual TLS domain, 
but for default domains, indeed there is a special value, 'default'.


b) * address - same meaning as the IP:port part of the 'server_domain' 
parameter


    * type - TLS client(1) or server(2) domain and 0 for defining both 
a client and server default domain with the same attributes


    * crl_check_all - check all files in the 'crl_dir'

    * crl_dir - path to directory containing Certificate Revocation Lists

c) Both DB and script domains can be defined at the same time, but they 
should be seen as different sets of domains, so you should set a 
modparam only for a script defined domain.


The blob database fields indeed should contain the contents of the 
certificates.


Regards,

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

On 08/01/2018 06:55 PM, John Quick wrote:

Hi Bogdan,

Thanks for your response to my earlier query.
I’m now trying to convert from modparam based definitions to provisioning
certs from the DB.
I cannot find a published example of a populated DB record in the tls_mgm
table.
Furthermore, the online documentation has gaps regarding DB Provisioning and
it also contains this error:
Section 1.7.14 describes a parameter db_mode, but if you try adding this it
generates an error "parameter  not found in module"

Can you please help with an example record or at least answer these
questions:
a) What to put in the 'domain' field if I only want to set up one default
domain. Should it be "default"?
b) What are the following fields. I am not sure what they should contain:
'address', 'type', 'crl_check_all', 'crl_dir'
c) How does provisioning from DB interact with provisioning from static
modparam values?
I got errors when I commented out modparam statements for "certificate" and
"private_key" because the module was still looking for the "default" files,
even though I am now provisioning from the DB. This means there is now
ambiguity - certificates are defined both in files in modparam and also in
blob fields in the DB.

I assume the blob fields 'certificate', 'private_key' and 'ca_list' must
contain the contents of the certificate, not the path to the file.
This means I'll need to write a script to copy these data from the renewed
LetsEncrypt certificates before issuing the MI reload command.

By the way, the online module documentation for tls_mgm has a duplicate
section - 1.7.18 is same as 1.7.19

John Quick
Smartvox Limited
   


Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jul 26 07:56:18 EDT 2018
Hi John, When the cert is configured via modparam, the cert is loaded on

startup by OpenSIPS, so any renewal of the cert will have 0 impact on
OpenSIPS - so you will have to restart after each renewal.

I suggest you to provision the certs via DB (and not script), so you can

do a reload after renewal, with any need to restart opensips.

Regards, Bogdan-Andrei Iancu

___
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] 2.4 and AnyCast Setup

2018-06-21 Thread Vlad Patrascu

Hi Jonathan,

OpenSIPS doesn't do that automatically because the setting should depend 
on what roles the nodes have when you first boot up your cluster. As 
such, on the node that first holds the VIP, and will generally be your 
primary node, OpenSIPS should start with the sharing tag as active in 
order to correctly process the traffic as soon as possible. And on the 
backup node, the opposite. From then on, when a switchover happens at 
runtime, the tag state will be changed by running the MI command 
"dlg_set_sharing_tag_active" when the VRRPD state transitions (this is 
where you will need some extra logic).


Regards,

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

On 21.06.2018 17:13, Jonathan Mabrito wrote:
Thanks! So it does sound like AnyCast is at the routing protocol 
level...I was thinking it was multicast for some reason. Alrighty 
then...I know what needs to be done on my end and a few scenarios I 
can try and get it working. My main roadblock is that we are running 
Cisco EIGRP setup (not that this is your issue...just more summarizing 
on what I found for anyone else who might be reading this)...so either 
I can redistribute some static routes into our EIGRP process or setup 
a new OSPF process and a new network address space (say another /24) 
and redistribute that into our EIGRP process. OSPF would be the more 
elegant and reliable way (as each server will be advertising itself 
when its up) but static is going to be easier to get going and less 
overhead of not having to setup OSPF (but with static, it wont 
technically know when a server is down and I am then relying on longer 
time outs before the other static route metric kicks in). Anywho...I 
have some trial and error on my side now.


I do have one more question. Right now we use VRRPD between our two 
2.3 nodes. If I was to stay with this method for 2.4, but do the 
dialog replication, that would also be an acceptable solution for us. 
I am confused though on this statement in the Clustering blog:


 "When starting OpenSIPS, you need to check the HA status of the node 
(by inspecting the HA system) and to decide which node will start as 
owner of the tag:"


Is that something OpenSIPS does automatically to determine if that 
VRRPD VIP IP is active on itself and set the "dlg_sharing_tag" to 
active  or do I have to add extra logic somewhere?


On Thu, Jun 21, 2018 at 6:24 AM Răzvan Crainea <mailto:raz...@opensips.org>> wrote:


Hi, Jonathan!

The guys from Irontech have written a very nice blogpost regarding
how
they set up their environment. You should definitely give it a try:

https://blog.irontec.com/testing-opensips-anycast-support/

Hope it helps!

Best regards,
Răzvan

On 06/20/2018 10:36 PM, Jonathan Mabrito wrote:
> Hoping I can get some guidance/pointed in the right direction on
this
> subject. Looking at standing up a 2.4 AnyCast 2 node cluster and
try out
> the new 2.4 dialog cluster features (will be a upgrade/migration
from
> 2.3). Not entirely sure what is needed to make this work from the
> AnyCast perspective
>
> When setting up AnyCast, I know the network and routers need
some config
> to support AnyCast. I know this question falls more in the
topics of
> networking, but hoping I can get some guidance on what was done
maybe on
> the test servers when it was developed? Not looking for specific
> configs, just xyz you should look at this or that type responses if
> possible.
>
> Right now, I have the two nodes stood up, but the AnyCast IP I
am trying
> to bring online is not reachable yet. I know I need to do some
network
> statements, just trying to grasp what they are.
>
> Any advice/help to point me in the right direction would be
appreciated.
> --
> -Jonathan
>
>
> ___
> Users mailing list
> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 
Răzvan Crainea

OpenSIPS Core Developer
http://www.opensips-solutions.com

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

--
-Jonathan


___
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] How to extract SIP-I ISUP 'Redirecting number' parameter

2018-03-30 Thread Vlad Patrascu

Hi,

I've pushed the fix, but bear in mind that you could still extract the 
redirecting number without full subfield access support. By just reading 
from "$isup_param(Redirecting number)" you get, as a string, the full 
ISUP parameter value in hex representation. From that, knowing the 
parameter format from the ISUP specification, you could parse the number 
yourself in the OpenSIPS script.


Regards,

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

On 29.03.2018 13:52, Eugene Prokopiev wrote:

Btw, is it possible to extract ISUP part as is in binary form and read
by some external script? Can anybody advice me any library to parse
ISUP binary data?

2018-03-29 12:50 GMT+03:00 Eugene Prokopiev :

Thank you!

I submitted https://github.com/OpenSIPS/opensips/issues/1323 - maybe
your patch can be applied?

2018-03-29 10:53 GMT+03:00 Arto Kuiri :

Hello,

I had same problem and made my own patch. See attached diff, it adds support 
for:
- redirection info (reason in same format as in SIP diversion header, commented 
ITU Q.763 version)
- original called number
- redirection number

Meant to make feature request/patch, but somehow forgot it.

Best regards,
Arto Kuiri




Lähettäjä: Users  käyttäjän Vlad Patrascu 
 puolesta
Lähetetty: 28. maaliskuuta 2018 20:48
Vastaanottaja: users@lists.opensips.org
Aihe: Re: [OpenSIPS-Users] How to extract SIP-I ISUP 'Redirecting number' 
parameter


Hi,

Unfortunately "Redirecting Number" is not currently supported, but you
could open up a feature request regarding this, as it would be not very
difficult to implement.

Regards,

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


Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 28.03.2018 18:32, Eugene Prokopiev wrote:

Hi,

I need to extract ISUP parameter 'Redirecting number' from SIP-I
INVITE request and add it as SIP header with 'X-' prefix to process in
FreeSWITCH. Can't found any about 'Redirecting number' in
http://www.opensips.org/html/docs/modules/2.3.x/sip_i.html, so how to
extract it? 'Redirecting number' parameter value is visible in
Wireshark now as ISUP parameter with t=11 and l=7



___
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




--
WBR,
Eugene Prokopiev






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


Re: [OpenSIPS-Users] How to extract SIP-I ISUP 'Redirecting number' parameter

2018-03-28 Thread Vlad Patrascu

Hi,

Unfortunately "Redirecting Number" is not currently supported, but you 
could open up a feature request regarding this, as it would be not very 
difficult to implement.


Regards,

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

On 28.03.2018 18:32, Eugene Prokopiev wrote:

Hi,

I need to extract ISUP parameter 'Redirecting number' from SIP-I
INVITE request and add it as SIP header with 'X-' prefix to process in
FreeSWITCH. Can't found any about 'Redirecting number' in
http://www.opensips.org/html/docs/modules/2.3.x/sip_i.html, so how to
extract it? 'Redirecting number' parameter value is visible in
Wireshark now as ISUP parameter with t=11 and l=7




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


Re: [OpenSIPS-Users] dialog replication

2018-03-06 Thread Vlad Patrascu

Hi Pasan,

You could have another OpenSIPS instance that exposes the service IP, in 
front of the 2 clustered HA nodes. Calls would first land on this box 
and then would be dispatched to one of the 2 floating IPs. You could for 
example hash over the From tag or Callid in order to send to the same IP.


Regards,

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

On 01.03.2018 03:21, Pasan Meemaduma via Users wrote:

Hi Vlad,

Thanks for your response. I think I'll have to wait until 2.4 
transaction replication come in to action if I am to go with anycast 
ip. I didn't understand how it would solve with 2 moveable ips. how do 
i make sure dialog will tie to a particular ip ?



On Wednesday, 28 February 2018, 17:04, Vlad Patrascu 
 wrote:



Hi,
Yes, you are correct, this is currently a limitation. But it could 
also work in an "active/active" sort of setup if you have 2 movable 
IPs and each dialog is tied to one of the IPs. Full anycast support 
though is coming up in OpenSIPS 2.4.

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 28.02.2018 04:46, Pasan Meemaduma via Users wrote:

Hi Vlad,

On a second thought its how anycast should work, packets could get to 
the closest node so basically with 2.3.3 we can't replicate 
transactions across mulitple opensips servers ? dialog replication  
would only work for an active/passive setup doesn't it ?




On Wednesday, 28 February 2018, 7:36, Pasan Meemaduma via Users 
 <mailto:users@lists.opensips.org> wrote:



Hi Vlad,

That explains the issue then, my sip listener ip is an anycast one, 
and for some weired reason replies for INVITE that leaves node2 
receive by node1 hence it can't create the dialog. I checked with 
node2 being down and recovered and calls init via node1 always 
received final reply hence dialog replication works. So it means my 
anycast configuration is broken right ? Thanks for you time to look 
in to it.



On Tuesday, 27 February 2018, 21:42, Vlad Patrascu 
 <mailto:vl...@opensips.org> wrote:



Hi Pasan,
I don't see anything in the logs or your cluster configuration which 
could indicate that the dialogs don't replicate. Are you sure that 
the problem is consistently reproducible and that the INVITE for the 
call in question receives a final reply? Dialogs are replicated when 
they get to the confirmed state, and judging from the logs, this 
doesn't appear to be happening for that call.

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 27.02.2018 04:15, Pasan Meemaduma via Users wrote:

Hi Vlad,

I have sent you the full debug logs as requested. Also 
clusterer_list mi command gives following output when dialog 
replication stopped working.


node1>>opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 2 DB_ID=5 URL=bin:10.3.1.137:5566 Enabled=1 
Link_state=Up Next_hop=2 Description=Node 2



 node2>> opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 1 DB_ID=4 URL=bin:10.3.1.136:5566 Enabled=1 
Link_state=Up Next_hop=1 Description=Node 1

1



On Monday, 26 February 2018, 18:02, Vlad Patrascu 
 <mailto:vl...@opensips.org> wrote:



Hi,
Can you send the full logs for both nodes from the time that node1 
restarts onwards? Also, what is the output of 'clusterer_list' mi 
command on the instances?

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 26.02.2018 08:38, Pasan Meemaduma via Users wrote:

Hi Guys,

Its me again :). I'm using dialog replication in opensips 2.3.3 and 
it appears it doesn't work after a node goes down and come back 
online. The recovered node

doesn't seems to receiving dialog info via binary interface.

I have node1 and node2 with dialog replication on. everything works 
fine and if I shutdown node1 and bring it back online after a while

node2 doesn't send new call dialog info via binary interface.

I have attach the debug trace from both nodes, if you need anything 
else let me know. I'm also using an anycast ip as the service ip.



on node2 for new call

Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:build_new_dlg: new dialog 0x7f188afd3bf8 
(c=ktQ0Pkdwz50qGYjED6Brpw..,f=sip:X@somedomain;transport=UDP,t=sip:+YYY@somedomain;transport=UDP,ft=2b161508) 
on hash 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:init_leg_info: route_set , contact 
sip:X@192.168.27.11:56419;transport=UDP 
<mailto:sip:X@192.168.27.11:56419;transport=UDP>, cseq 2 
and bind_addr udp:10.3.3.1:5060
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_add_leg_info: set leg 0 for 0x7f188afd3bf8: 
tag=<2b161508> rcseq=<0>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips

Re: [OpenSIPS-Users] dialog replication

2018-02-28 Thread Vlad Patrascu

Hi,

Yes, you are correct, this is currently a limitation. But it could also 
work in an "active/active" sort of setup if you have 2 movable IPs and 
each dialog is tied to one of the IPs. Full anycast support though is 
coming up in OpenSIPS 2.4.


Regards,

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

On 28.02.2018 04:46, Pasan Meemaduma via Users wrote:

Hi Vlad,

On a second thought its how anycast should work, packets could get to 
the closest node so basically with 2.3.3 we can't replicate 
transactions across mulitple opensips servers ? dialog replication  
would only work for an active/passive setup doesn't it ?




On Wednesday, 28 February 2018, 7:36, Pasan Meemaduma via Users 
 wrote:



Hi Vlad,

That explains the issue then, my sip listener ip is an anycast one, 
and for some weired reason replies for INVITE that leaves node2 
receive by node1 hence it can't create the dialog. I checked with 
node2 being down and recovered and calls init via node1 always 
received final reply hence dialog replication works. So it means my 
anycast configuration is broken right ? Thanks for you time to look in 
to it.



On Tuesday, 27 February 2018, 21:42, Vlad Patrascu 
 wrote:



Hi Pasan,
I don't see anything in the logs or your cluster configuration which 
could indicate that the dialogs don't replicate. Are you sure that the 
problem is consistently reproducible and that the INVITE for the call 
in question receives a final reply? Dialogs are replicated when they 
get to the confirmed state, and judging from the logs, this doesn't 
appear to be happening for that call.

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 27.02.2018 04:15, Pasan Meemaduma via Users wrote:

Hi Vlad,

I have sent you the full debug logs as requested. Also clusterer_list 
mi command gives following output when dialog replication stopped 
working.


node1>>opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 2 DB_ID=5 URL=bin:10.3.1.137:5566 Enabled=1 
Link_state=Up Next_hop=2 Description=Node 2



 node2>> opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 1 DB_ID=4 URL=bin:10.3.1.136:5566 Enabled=1 
Link_state=Up Next_hop=1 Description=Node 1

1



On Monday, 26 February 2018, 18:02, Vlad Patrascu 
 <mailto:vl...@opensips.org> wrote:



Hi,
Can you send the full logs for both nodes from the time that node1 
restarts onwards? Also, what is the output of 'clusterer_list' mi 
command on the instances?

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 26.02.2018 08:38, Pasan Meemaduma via Users wrote:

Hi Guys,

Its me again :). I'm using dialog replication in opensips 2.3.3 and 
it appears it doesn't work after a node goes down and come back 
online. The recovered node

doesn't seems to receiving dialog info via binary interface.

I have node1 and node2 with dialog replication on. everything works 
fine and if I shutdown node1 and bring it back online after a while

node2 doesn't send new call dialog info via binary interface.

I have attach the debug trace from both nodes, if you need anything 
else let me know. I'm also using an anycast ip as the service ip.



on node2 for new call

Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:build_new_dlg: new dialog 0x7f188afd3bf8 
(c=ktQ0Pkdwz50qGYjED6Brpw..,f=sip:X@somedomain;transport=UDP,t=sip:+YYY@somedomain;transport=UDP,ft=2b161508) 
on hash 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:init_leg_info: route_set , contact 
sip:X@192.168.27.11:56419;transport=UDP 
<mailto:sip:X@192.168.27.11:56419;transport=UDP>, cseq 2 and 
bind_addr udp:10.3.3.1:5060
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_add_leg_info: set leg 0 for 0x7f188afd3bf8: 
tag=<2b161508> rcseq=<0>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:link_dlg: ref dlg 0x7f188afd3bf8 with 3 -> 3 in h_entry 
0x7f188afc3828 - 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:new_dlg_val: inserting 
=<45ad4c76-1abe-11e8-9410-831894b67d0c>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_onreq: t hash_index = 47425, t label = 2069082013
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_update_contact: Updated dialog 0x7f188afd3bf8 contact 
to  
<mailto:sip:X@192.168.27.11:56419;transport=UDP>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 2 in entry 
0x7f188afc3828
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 0x7f188afd3bf8 with 1 -> 3
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 

Re: [OpenSIPS-Users] dialog replication

2018-02-27 Thread Vlad Patrascu

Hi Pasan,

I don't see anything in the logs or your cluster configuration which 
could indicate that the dialogs don't replicate. Are you sure that the 
problem is consistently reproducible and that the INVITE for the call in 
question receives a final reply? Dialogs are replicated when they get to 
the confirmed state, and judging from the logs, this doesn't appear to 
be happening for that call.


Regards,

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

On 27.02.2018 04:15, Pasan Meemaduma via Users wrote:

Hi Vlad,

I have sent you the full debug logs as requested. Also clusterer_list 
mi command gives following output when dialog replication stopped working.


node1>>opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 2 DB_ID=5 URL=bin:10.3.1.137:5566 Enabled=1 
Link_state=Up  Next_hop=2 Description=Node 2



 node2>> opensipsctl fifo clusterer_list
Cluster:: 1
    Node:: 1 DB_ID=4 URL=bin:10.3.1.136:5566 Enabled=1 
Link_state=Up  Next_hop=1 Description=Node 1

1



On Monday, 26 February 2018, 18:02, Vlad Patrascu  
wrote:



Hi,
Can you send the full logs for both nodes from the time that node1 
restarts onwards? Also, what is the output of 'clusterer_list' mi 
command on the instances?

Regards,
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 26.02.2018 08:38, Pasan Meemaduma via Users wrote:

Hi Guys,

Its me again :). I'm using dialog replication in opensips 2.3.3 and 
it appears it doesn't work after a node goes down and come back 
online. The recovered node

doesn't seems to receiving dialog info via binary interface.

I have node1 and node2 with dialog replication on. everything works 
fine and if I shutdown node1 and bring it back online after a while

node2 doesn't send new call dialog info via binary interface.

I have attach the debug trace from both nodes, if you need anything 
else let me know. I'm also using an anycast ip as the service ip.



on node2 for new call

Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:build_new_dlg: new dialog 0x7f188afd3bf8 
(c=ktQ0Pkdwz50qGYjED6Brpw..,f=sip:X@somedomain;transport=UDP,t=sip:+YYY@somedomain;transport=UDP,ft=2b161508) 
on hash 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:init_leg_info: route_set , contact 
sip:X@192.168.27.11:56419;transport=UDP 
<mailto:sip:X@192.168.27.11:56419;transport=UDP>, cseq 2 and 
bind_addr udp:10.3.3.1:5060
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_add_leg_info: set leg 0 for 0x7f188afd3bf8: 
tag=<2b161508> rcseq=<0>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:link_dlg: ref dlg 0x7f188afd3bf8 with 3 -> 3 in h_entry 
0x7f188afc3828 - 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:new_dlg_val: inserting 
=<45ad4c76-1abe-11e8-9410-831894b67d0c>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_onreq: t hash_index = 47425, t label = 2069082013
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_update_contact: Updated dialog 0x7f188afd3bf8 contact 
to  
<mailto:sip:X@192.168.27.11:56419;transport=UDP>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 2 in entry 
0x7f188afc3828
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 0x7f188afd3bf8 with 1 -> 3
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 0x7f188afd3bf8 with 1 -> 4
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 3 in entry 
0x7f188afc3828
Feb 26 17:28:56 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 2 in entry 
0x7f188afc3828
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:next_state_dlg: dialog 0x7f188afd3bf8 changed from state 1 
to state 5, due event 4
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:dlg_onreply: dialog 0x7f188afd3bf8 failed (negative reply)
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 1 in entry 
0x7f188afc3828
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:next_state_dlg: dialog 0x7f188afd3bf8 changed from state 5 
to state 5, due event 1
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 0 in entry 
0x7f188afc3828
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: ref <=0 for dialog 0x7f188afd3bf8
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:destroy_dlg: destroying dialog 0x7f188afd3bf8
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]:

Re: [OpenSIPS-Users] dialog replication

2018-02-26 Thread Vlad Patrascu

Hi,

Can you send the full logs for both nodes from the time that node1 
restarts onwards? Also, what is the output of 'clusterer_list' mi 
command on the instances?


Regards,

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

On 26.02.2018 08:38, Pasan Meemaduma via Users wrote:

Hi Guys,

Its me again :). I'm using dialog replication in opensips 2.3.3 and it 
appears it doesn't work after a node goes down and come back online. 
The recovered node

doesn't seems to receiving dialog info via binary interface.

I have node1 and node2 with dialog replication on. everything works 
fine and if I shutdown node1 and bring it back online after a while

node2 doesn't send new call dialog info via binary interface.

I have attach the debug trace from both nodes, if you need anything 
else let me know. I'm also using an anycast ip as the service ip.



on node2 for new call

Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:build_new_dlg: new dialog 0x7f188afd3bf8 
(c=ktQ0Pkdwz50qGYjED6Brpw..,f=sip:X@somedomain;transport=UDP,t=sip:+YYY@somedomain;transport=UDP,ft=2b161508) 
on hash 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:init_leg_info: route_set , contact 
sip:X@192.168.27.11:56419;transport=UDP, cseq 2 and bind_addr 
udp:10.3.3.1:5060
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_add_leg_info: set leg 0 for 0x7f188afd3bf8: 
tag=<2b161508> rcseq=<0>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:link_dlg: ref dlg 0x7f188afd3bf8 with 3 -> 3 in h_entry 
0x7f188afc3828 - 2317
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:new_dlg_val: inserting 
=<45ad4c76-1abe-11e8-9410-831894b67d0c>
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_onreq: t hash_index = 47425, t label = 2069082013
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:dlg_update_contact: Updated dialog 0x7f188afd3bf8 contact 
to 
Feb 26 17:28:35 voip2-sip23b /usr/sbin/opensips[4703]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 2 in entry 
0x7f188afc3828
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 0x7f188afd3bf8 with 1 -> 3
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:ref_dlg: ref dlg 0x7f188afd3bf8 with 1 -> 4
Feb 26 17:28:52 voip2-sip23b /usr/sbin/opensips[4702]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 3 in entry 
0x7f188afc3828
Feb 26 17:28:56 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 2 in entry 
0x7f188afc3828
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:next_state_dlg: dialog 0x7f188afd3bf8 changed from state 1 
to state 5, due event 4
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:dlg_onreply: dialog 0x7f188afd3bf8 failed (negative reply)
Feb 26 17:29:05 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 1 in entry 
0x7f188afc3828
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:next_state_dlg: dialog 0x7f188afd3bf8 changed from state 5 
to state 5, due event 1
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: unref dlg 0x7f188afd3bf8 with 1 -> 0 in entry 
0x7f188afc3828
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:unref_dlg: ref <=0 for dialog 0x7f188afd3bf8
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:destroy_dlg: destroying dialog 0x7f188afd3bf8
Feb 26 17:29:11 voip2-sip23b /usr/sbin/opensips[4711]: 
DBG:dialog:destroy_dlg: dlg expired or not in list - dlg 
0x7f188afd3bf8 [2317:677053409] with clid 'ktQ0Pkdwz50qGYjED6Brpw..' 
and tags '2b161508' 'NULL'



on node1

Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15820]: 
DBG:dialog:dlg_onroute: route param is 'd09.1e30b582' (len=12)
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15820]: 
DBG:dialog:lookup_dlg: no dialog id=677053409 found on entry 2317
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15820]: 
DBG:dialog:dlg_onroute: unable to find dialog for BYE with route param 
'd09.1e30b582'
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15822]: 
DBG:dialog:dlg_onroute: route param is 'd09.1e30b582' (len=12)
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15822]: 
DBG:dialog:lookup_dlg: no dialog id=677053409 found on entry 2317
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15822]: 
DBG:dialog:dlg_onroute: unable to find dialog for BYE with route param 
'd09.1e30b582'
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15822]: 
DBG:dialog:dlg_onroute: route param is 'd09.1e30b582' (len=12)
Feb 26 17:28:41 voip2-sip23a /usr/sbin/opensips[15822]: 
DBG:dialog:lookup_dlg: no dialog id=677053409 found on entry 2317
Feb 26 17:28

Re: [OpenSIPS-Users] SIP-I Calling Party number being changed

2018-01-15 Thread Vlad Patrascu

Hi,

I'm not an expert on ITU-T standards but from what I know, the "+" sign 
is only an indication that an international prefix is required and thus 
cannot be set as a digit in the ISUP number related parameters. Being an 
unsupported character, the sip_i module wrote it as 0. Maybe a warning 
log message would be helpful.


As such you should probably replace the plus sign with the international 
call prefix and only after that set the ISUP parameter.


Regards,

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

On 01/15/2018 12:39 PM, Aqs Younas wrote:

Greetings list,

I am using the sip-i module for conversion between sip to sip-i.  I 
want to set calling party number and called party number in e164 
format. Below is how my code looks like.

route{
...
xlog("Here is Called party number: $rU");
xlog("Here is Calling party number: $fU");
do_accounting("log","missed");
add_isup_part("Initial address");
$isup_param(Nature of connection indicators) = "0x10";
$isup_param(Forward Call Indicators) = "0x6001";
$isup_param(Called party number|Nature of address indicator) = 4;
$isup_param(Called party number|Numbering plan indicator) = 1;
$isup_param(Called party number|Address signal) = $rU;
$isup_param(Calling party number|Nature of address indicator) = 4;
$isup_param(Calling party number|Numbering plan indicator) = 1;
$isup_param(Calling party number|Screening indicator) = 4;
$isup_param(Transmission Medium Requirement) = "speech";
$isup_param(Calling party number|Address signal) = $fU;
...
}

branch_route[per_branch_ops] {
xlog("NOA is: $isup_param_str(Called Party Number|Nature of 
address indicator)");
xlog("Called party is: $isup_param_str(Called Party 
Number|Address signal)");
xlog("NOA is: $isup_param_str(Calling Party Number|Nature of 
address indicator)");
xlog("Calling is: $isup_param_str(Calling Party Number|Address 
signal)");

}

But I see Calling party and Called party number being changed from 
what i had set.


This is what I set.

 Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: Here is Called 
party number: +256723000422
Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: Here is Calling 
party number: +12064248192


And what appears in ISUP body. You can notice *+ *changed to 0.

Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: NOA is: international
*Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: Called party is: 
0256723000422*

Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: NOA is: international
*Jan 15 10:16:01 gridtele-ug-vpn ./opensips[6911]: Calling is: 
012064248192*


Any help/suggestion is much appreciated.

Thanks.


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> 
	Virus-free. www.avast.com 
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> 





___
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] Can't add bin_listen interface to script

2017-10-30 Thread Vlad Patrascu

Hi,

The "bin_listen" parameter was removed in OpenSIPS 2.2.X and bin 
listeners should be defined using "listen = bin:a.b.c.d:".


Regards,

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

On 10/30/2017 11:11 AM, Matine Tinthaitae wrote:

Hi,

I'm trying to use the Binary Interface to replicate dialogs in 
OpenSIPS 2.2.5.

When ever i add "bin_listen = a.b.c.d:" opensips fails to start.

Oct 30 10:08:27 [26532] CRITICAL:core:yyerror: parse error in config 
file /usr/local//etc/opensips/opensips.cfg, line 143, column 1-11: 
syntax error
Oct 30 10:08:27 [26532] CRITICAL:core:yyerror: parse error in config 
file /usr/local//etc/opensips/opensips.cfg, line 143, column 1-11:

Oct 30 10:08:27 [26532] ERROR:core:main: bad config file (2 errors)
Oct 30 10:08:27 [26532] NOTICE:core:main: Exiting

Is the binary interface not available in 2.2.5 or what am i doing wrong?

Thank you in advance!

//Matine


___
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] clusterer module

2017-09-18 Thread Vlad Patrascu

Hi Denis,

For around 6 minutes since startup of the first proxy, the second proxy 
is either not fully booted up or the clusterer table is not loaded so it 
can't reply to its pings. The issue occurs from this point on, but the 
chunk of log messages you've provided ends soon after so I couldn't 
pinpoint the problem. Also the other logs weren't really helpful. So 
could you send a slightly longer sequence of logs from startup?


Regards,

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

On 09/18/2017 10:54 AM, Denis via Users wrote:

Hello!
Is there any information about problem?
Thank you.
--
С уважением, Денис.
Best regards, Denis
08.09.2017, 13:46, "Denis via Users" :

Hello, Vlad!
Sorry for long answer.
So, here (https://yadi.sk/i/j9a4CZhS3MiJEm) you can find the log 
file. In this file i tried to display information in chronological order.

In the log file:
opensips2.2. - first proxy
opensipsproxy1 - second proxy
opensipsctl.sh - script for the first proxy
opensipsproxyctl.sh - script for the second proxy
1.1.1.1 - IP of the server (as i mentioned below both proxies are on 
the same server).

Thank you for any help.
--
С уважением, Денис.
Best regards, Denis
30.08.2017, 13:05, "Vlad Patrascu" <mailto:vl...@opensips.org>>:


Hi Denis,

I can't really tell what the problem is from the information you've 
provided (the traces aren't much help as the messages between nodes 
are binary data). Can you provide some logs relevant to the 
clusterer (including debug level) from around the time when the 
nodes first try to establish the links ?


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 08/30/2017 11:46 AM, Denis via Users wrote:

Hello!
Any information about the problem?
Thank you.
--
С уважением, Денис.
Best regards, Denis
25.08.2017, 16:51, "Denis via Users"  
<mailto:users@lists.opensips.org>:

Hello!
Back to 2.2.5 resolved the problem. I got replication of, for 
example, dialog/profile

--
С уважением, Денис.
Best regards, Denis
24.08.2017, 17:46, "Denis via Users" <mailto:users@lists.opensips.org>>:

Hello!
I am developing VoIP architecture with two proxies and one LB.
Between these proxies i have a cluster, using corresponding 
module. All instances (proxies and LB) are on the same server.

I started from 2.2 and there were no problems with the cluster.
Recently, I upgraded Opensips from 2.2. to 2.3.1 and have got 
such situation

./opensipsctl.sh fifo clusterer_list
Cluster:: 1
Node:: 2 DB_ID=2 URL=bin:1.1.1.1:5041 Enabled=1 
Link_state=Probe   Next_hop=none Description=none

./opensipsproxyctl.sh fifo clusterer_list
Cluster:: 1
Node:: 1 DB_ID=1 URL=bin:1.1.1.1:5040 Enabled=1 
Link_state=Up  Next_hop=1 Description=none

tcpdump
10:33:47.101956 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
381492:381525, ack 3259636718, win 342, options 
[nop,nop,TS val 65425778 ecr 65424597], length 33
10:33:47.101984 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 
33, win 6146, options [nop,nop,TS val 65425778 ecr 65425778], 
length 0
10:33:51.725437 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65426934 ecr 
65425778], length 33
10:33:51.725458 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 
66, win 6146, options [nop,nop,TS val 65426934 ecr 65426934], 
length 0

and
10:35:12.589476 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
1471487774:1471487807, ack 2063326017, win 342, options 
[nop,nop,TS val 65447150 ecr 65445995], length 33
10:35:12.589491 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 
33, win 342, options [nop,nop,TS val 65447150 ecr 65447150], length 0
10:35:17.158143 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65448292 ecr 
65447150], length 33
10:35:17.158153 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 
66, win 342, options [nop,nop,TS val 65448292 ecr 65448292], length 0
As you can see node 1 cannot see node 2 (Link_state=Probe). The 
question is why?

Thank you.
--
С уважением, Денис.
Best regards, Denis
,

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


,

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


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

,

___
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailm

Re: [OpenSIPS-Users] Use of colon in XML element names

2017-08-31 Thread Vlad Patrascu

Hi xaled,

There should be no problem with colons in element names (libxml will 
produce some errors, because namespaces are not handled by the xml 
module and the prefix is simply considered as part of the element name, 
but they can be ignored), your issue seems to be caused by something 
else. What errors or other relevant messages do the logs produce? I do 
spot on the other hand a wrong access to the first element when adding 
the attribute, which should look like 
"$xml(xml_s/tns:messageType.attr/xmlns:tns)" but the document should 
still be created fine without that attribute.


As for adding the encoding, you could initialize the $xml variable 
directly with the required XML declaration, like this:


$xml(xml_s) = 'encoding="UTF-8"?>';


Formatted output is not possible currently, you can open a feature 
request on Github regarding this, but if you really need the XML 
document to actually contain the indentation characters, you could do so 
explicitly when inserting the nodes (as in the documentation example).


Regards,

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

On 08/20/2017 07:08 PM, xaled wrote:


Hi,

Just tried the new xml module and have some issues with colon in 
element names. Should I use some escape magic for colons with opensips 
xml module?


Another question is how to add encoding="UTF-8" to have it like this - 



It would be also great to have formatted XML output. Something like 
format parameter in toString method of XML::LibXML::Document in perl.


test:/usr/local/etc/opensips # /usr/local/sbin/opensips -V

version: opensips 2.3.1 (x86_64/linux)

flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
F_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_lt, epoll_et, sigio_rt, select.

git revision: 72fa146

main.c compiled on 18:53:05 Aug 16 2017 with gcc 4.8

$xml(xml_s) = "";

$xml(xml_s.attr/xmlns:tns) = "http://test.org/abc/params/xml/abc";;

$xml(xml_s/tns:messageType) = "";

$xml(xml_s/tns:messageType/tns:crtg) = 
"";


$xml(xml_s/tns:messageType/tns:crtg/tns:ControlIndicators) = 
"5";


xlog("XML_TEST: $xml(xml_s)\n");

2017-08-20T17:46:38.320273+02:00 test /usr/local/sbin/opensips[32422]: 
XML_TEST: #012


The final XML should be like this:



http://test.org/abc/params/xml/abc";>

  



 5



  



Thanks,

xaled



___
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] clusterer module

2017-08-30 Thread Vlad Patrascu

Hi Denis,

I can't really tell what the problem is from the information you've 
provided (the traces aren't much help as the messages between nodes are 
binary data). Can you provide some logs relevant to the clusterer 
(including debug level) from around the time when the nodes first try to 
establish the links ?


Regards,

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

On 08/30/2017 11:46 AM, Denis via Users wrote:

Hello!
Any information about the problem?
Thank you.
--
С уважением, Денис.
Best regards, Denis
25.08.2017, 16:51, "Denis via Users" :

Hello!
Back to 2.2.5 resolved the problem. I got replication of, for 
example, dialog/profile

--
С уважением, Денис.
Best regards, Denis
24.08.2017, 17:46, "Denis via Users" <mailto:users@lists.opensips.org>>:

Hello!
I am developing VoIP architecture with two proxies and one LB.
Between these proxies i have a cluster, using corresponding module. 
All instances (proxies and LB) are on the same server.

I started from 2.2 and there were no problems with the cluster.
Recently, I upgraded Opensips from 2.2. to 2.3.1 and have got such 
situation

./opensipsctl.sh fifo clusterer_list
Cluster:: 1
Node:: 2 DB_ID=2 URL=bin:1.1.1.1:5041 Enabled=1 
Link_state=Probe   Next_hop=none Description=none

./opensipsproxyctl.sh fifo clusterer_list
Cluster:: 1
Node:: 1 DB_ID=1 URL=bin:1.1.1.1:5040 Enabled=1 
Link_state=Up  Next_hop=1 Description=none

tcpdump
10:33:47.101956 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
381492:381525, ack 3259636718, win 342, options [nop,nop,TS 
val 65425778 ecr 65424597], length 33
10:33:47.101984 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 33, 
win 6146, options [nop,nop,TS val 65425778 ecr 65425778], length 0
10:33:51.725437 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65426934 ecr 
65425778], length 33
10:33:51.725458 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 66, 
win 6146, options [nop,nop,TS val 65426934 ecr 65426934], length 0

and
10:35:12.589476 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
1471487774:1471487807, ack 2063326017, win 342, options [nop,nop,TS 
val 65447150 ecr 65445995], length 33
10:35:12.589491 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 33, 
win 342, options [nop,nop,TS val 65447150 ecr 65447150], length 0
10:35:17.158143 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65448292 ecr 
65447150], length 33
10:35:17.158153 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 66, 
win 342, options [nop,nop,TS val 65448292 ecr 65448292], length 0
As you can see node 1 cannot see node 2 (Link_state=Probe). The 
question is why?

Thank you.
--
С уважением, Денис.
Best regards, Denis
,

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


,

___
Users mailing list
Users@lists.opensips.org <mailto: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 change the order of requests

2015-10-23 Thread Vlad Paiu

Hello,

I would say this an UA issue - OpenSIPS does not do any enforcing on the 
order of outgoing SIP packets, so if the UA sends an INVITE immediately 
followed by an UPDATE, there exists the risk of the UPDATE reaching the 
endpoint first ( even if the proxy would maintain the the packet order, 
since UDP is used as transport, there would still be no guarantee that 
the endpoint receives them in the same order ).


Can you configure the UA to only send the UPDATE after the INVITE 
transaction has finished ? This would be the only way to ensure there 
are no races.


Best Regards,

Vlad Paiu
OpenSIPS Developer

On 22.10.2015 20:05, Patrick Wakano wrote:

Hello Opensips list!

I already explained my scenario in this e-mail 
(http://lists.opensips.org/pipermail/users/2015-October/032859.html) 
where the Ack was propagated with wrong CSeq number when using the 
in-dialog ping options. Vlad did a great job and already correct this 
bug! (https://github.com/OpenSIPS/opensips/issues/680)


Now in a scenario where I disabled the in-dialog ping, I faced another 
issue. I mentioned that sometimes, due to unknown reasons, when I 
received a Re-Invite immediately followed by an Update, the Update 
gets forwarded first. The problem is that, since CSeq numbers are not 
altered, when this inversion happens, my peer rejects the Re-Invite 
because its CSeq number is lower than the Update one.
Probably Opensips has to respect the ordering of in-dialog requests 
and forward them accordingly, instead of handling them asynchronously 
and forwarding right away...


Best regards,
Patrick



___
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] Exported Asyncronous functions

2015-10-22 Thread Vlad Paiu

Hello,

There is no way to do that.
Just move your 'line after exec;' to the resume route, or put it in a 
new route that will get called from within the resume route.


Regards,

Vlad Paiu
OpenSIPS Developer

On 22.10.2015 17:39, Dragomir Haralambiev wrote:

Hello,
I try to test Exported Asyncronous functions in OpenSips 2.1.

What I do to return back in stript (at line after exec) when finished 
route[resume] ?

{

async( exec("test.sh.","$ru","$avp(return)"), resume );
line after exec;
}

route[resume] {
xlog("Exec return$avp(return)");
}

Best regards,
PlayMen


___
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 and CSeq number handling

2015-10-21 Thread Vlad Paiu

Hello,

Think a SIP trace would help a lot in debugging this situation - my 
guess is that there is sort of a "race" between the RE-INVITE being sent 
out, and in-dialog options pings ( eg. Re-INVITE goes out, then OpenSIPS 
sends in-dialog OPTION pings, then the ACK comes in and it's CSEQ is 
wrongly increased ).


Can you please provide a SIP trace for your scenario ?

Best Regards,

Vlad Paiu
OpenSIPS Developer

On 21.10.2015 12:32, Vlad Paiu wrote:

Hello,

Yes, if you are using in-dialog OPTIONS pings, OpenSIPS will mangle 
the CSEQs of all in-dialog requests, after it has sent the first pings.


Just making sure I understand the scenario... so the client is sending 
a Re-INVITE and immediately after that it sends an UPDATE, and the ACK 
for the RE-INVITE gets propagated with the CSEQ of the UPDATE ?


Best Regards,
Vlad Paiu
OpenSIPS Developer
On 20.10.2015 21:28, Patrick Wakano wrote:

Hi list,
An update about this issue.
The behavior I mentioned about Opensips incrementing the CSeq values 
only after second Re-Invite is incorrect. More tests showed me that 
this happens after the in-dialog Options the dialog module sends (I 
am creating it with "pP" options). This also explains why Opensips is 
changing the CSeq number, because it has to couple the CSeq numbering 
of the local generated Options with the original requests of the dialog!
The problem regarding the Ack with wrong CSeq number still occurs 
anyways. It seems that Opensips is not matching the Ack with the 
correct Invite transaction...


Patrick


On Tue, Oct 20, 2015 at 12:31 PM, Patrick Wakano <mailto:pwak...@gmail.com>> wrote:


Hello Opensips list!

Hope you all doing fine!

The purpose of this e-mail is to explain a problem I am facing
and to understand a little bit more about the handling done by
Opensips over the CSeq number when forwarding messages to the
destination. I couldn't find any real good explanation over this
subject so I wrote this huge e-mail, sorry for that...

I am trying to use the remote ID feature of Asterisk, but in some
transfer scenarios the call gets dropped and after digging the
problem I think it is related to the CSeq handling done by Opensips.
This remote ID feature is configured to use the
P-Asserted-Identity header to transmit the callee ID to the
caller and it causes the exchange of Re-Invites and/or Updates
during the call. The transfer scenario I mentioned is entirely
handled by Asterisk, and as a result of the transfer it sends to
Opensips the identity of the new peer, using a Re-Invite and an
Update.
First I would like to know how Opensips handles the CSeq number
when proxying the Invite from one side to the other? My tests
showed me that Opensips does not change the CSeq for the first
Invite and first Re-invite, however for the second Re-invite and
for requests after that it is always incrementing the value by
one when forwarding it. Although it haven't caused any errors so
far, I am not sure if this is correct. Why is Opensips
incrementing it? My understanding is that the proxy was not
supposed to change this field...

Now the problem I am facing: In a blind transfer scenario, the
remote ID feature causes Asterisk to send a Re-Invite and right
after an Update. Opensips increments the CSeq of both(because
this happens to be the second Re-Invite of the dialog) and
forward them to the destination. Both messages are answered with
200 Ok. This follows by Asterisk sending an Ack with the same
CSeq number used in the Re-Invite. This is the point where
Opensips fails, it gets this Ack and forward it using the CSeq
number of the Update and not the one of the Re-Invite. Because of
this the destination discards this Ack and keeps retransmitting
the 200 Ok for the Re-Invite, eventually the call is dropped by
timeout or because some other Re-Invite happens without the prior
one being properly handled.

Useful information:
- If the Re-Invite followed by the Update is the first of the
dialog, then the problem does not happen. The CSeq numbers are
not incremented and the CSeq for the Ack is correct.
- If due to unknown timing reasons, the Update gets forwarded
before the Re-Invite (even though the Re-Invite is received
first) the problem also does not happen. The CSeq numbers are
incremented but the CSeq for the Ack gets the correct value. So
it seems to me that the Ack is getting the last CSeq used to
forward, and not the one of the corresponding Invite.
- When I enable more traces(debug=4), I always fall in the case
where the Update is forwarded before the Re-Invite and then the
problem doesn't happen.
- In an attended transfer, Asterisk does not send the Update so
the problem does not happen.
- Not sure why Asterisk is sending the Re-Invite im

  1   2   3   4   5   6   7   >