[OpenSIPS-Users] python module

2023-03-30 Thread Alberto
Hi,

I'm curious, since python_exec only accepts one extra parameter, how do you
guys pass multiple variables to a python function?

I personally do this:
$json(args) := "{}";
$json(args/param0) = "sdifuhsidfg";
$json(args/param1) = "asfagfgf";
$json(args/param2) = "asfergerghdf";
python_exec("python_my_fn", $json(args));

and then I restore the json object in the python function and use my
variables..

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


Re: [OpenSIPS-Users] TLS and WSS Opensips Listen

2023-03-30 Thread Pratik Patel
If I will set require_cert 0 in the tls_mgm module then able to register
and make a call but when the destination person answers the call then the
below error I get in Syslog :

ERROR:tls_openssl:openssl_tls_blocking_write: TLS send timeout (100)
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:proto_wss:ws_client_handshake: cannot start handshake
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:proto_wss:ws_connect: cannot complete WebSocket handshake
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:tls_openssl:openssl_tls_blocking_write: TLS send timeout (100)
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:tls_openssl:openssl_tls_conn_shutdown: something wrong in SSL: 1, 11,
Resource temporarily unavailable
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:tls_openssl:tls_print_errstack: TLS errstack: error:140E0197:SSL
routines:SSL_shutdown:shutdown while in init
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:proto_wss:proto_wss_send: connect failed
Mar 30 16:26:41 opensips[154227]: Mar 30 16:26:41 [154227]
ERROR:core:msg_send: send() to 11.11.11.11:5060 for proto wss/6 failed

On Thu, Mar 30, 2023 at 7:43 PM Pratik Patel 
wrote:

> Hi Rizwan,
>
> I am really sorry for that I am posting first time my question about
> opensips and I have not clear idea which channel I will get responses.
>
> I will take care of that now .
>
> I have done this wss with TLS on freeswitch there working fine with same
> certificate but when on opensips when try to configure wss with TLS facing
> issue .
>
> I have done pastbin url that I have configured .
>
> In freeswitch I have added some pem files in /etc/freeswitch/TLS/
>
> chain.pem
> cafile.pem
> fullchain.pem
> privkey.pem
> wss.pem
>
> Then restart freeswitch service and it's start working.
>
> So I have pointed same domain to my opensips and copy all certificate to
> /etc/opensips/tls/
>
> And check some documents as per that I have configured on opensips.cfg but
> not able to connect that was url from my web client .
>
> Can you please share steps and documents something that I will prefer or
> generate let's encrypted certificate that use to do enable TLS with wss in
> opensips.
>
>
>
> On Thu, Mar 30, 2023, 18:58 Răzvan Crainea  wrote:
>
>> Hi, Pratik!
>>
>> As the error clearly says, you are requiring a certificate in your
>> configuration file, but not providing one when running the openssl
>> command.
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Core Developer
>> http://www.opensips-solutions.com
>>
>> On 3/30/23 15:52, Pratik Patel wrote:
>> > Hello
>> >
>> > I want to make my opensips listen as wss same like FreeSWITCH but
>> facing
>> > issue with opensips :
>> >
>> > I am working on opensips with wss and tls configuration but facing
>> below
>> > Error :
>> > 140010946856256:error:1409445C:SSL routines:ssl3_read_bytes:tlsv13
>> alert
>> > certificate required:../ssl/record/rec_layer_s3.c:1543:SSL alert number
>> 116
>> >
>> > openssl s_client -connect abc.com:7443 
>> -servername
>> > abc.com 
>> > In opensips.cfg code :
>> >
>> > https://pastebin.com/Bn9fc70Z 
>> >
>> >
>> > ___
>> > 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] TLS and WSS Opensips Listen

2023-03-30 Thread Pratik Patel
Hi Rizwan,

I am really sorry for that I am posting first time my question about
opensips and I have not clear idea which channel I will get responses.

I will take care of that now .

I have done this wss with TLS on freeswitch there working fine with same
certificate but when on opensips when try to configure wss with TLS facing
issue .

I have done pastbin url that I have configured .

In freeswitch I have added some pem files in /etc/freeswitch/TLS/

chain.pem
cafile.pem
fullchain.pem
privkey.pem
wss.pem

Then restart freeswitch service and it's start working.

So I have pointed same domain to my opensips and copy all certificate to
/etc/opensips/tls/

And check some documents as per that I have configured on opensips.cfg but
not able to connect that was url from my web client .

Can you please share steps and documents something that I will prefer or
generate let's encrypted certificate that use to do enable TLS with wss in
opensips.



On Thu, Mar 30, 2023, 18:58 Răzvan Crainea  wrote:

> Hi, Pratik!
>
> As the error clearly says, you are requiring a certificate in your
> configuration file, but not providing one when running the openssl command.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 3/30/23 15:52, Pratik Patel wrote:
> > Hello
> >
> > I want to make my opensips listen as wss same like FreeSWITCH but facing
> > issue with opensips :
> >
> > I am working on opensips with wss and tls configuration but facing below
> > Error :
> > 140010946856256:error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert
> > certificate required:../ssl/record/rec_layer_s3.c:1543:SSL alert number
> 116
> >
> > openssl s_client -connect abc.com:7443 
> -servername
> > abc.com 
> > In opensips.cfg code :
> >
> > https://pastebin.com/Bn9fc70Z 
> >
> >
> > ___
> > 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] TLS and WSS Opensips Listen

2023-03-30 Thread Răzvan Crainea

Hi, Pratik!

As the error clearly says, you are requiring a certificate in your 
configuration file, but not providing one when running the openssl command.


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 3/30/23 15:52, Pratik Patel wrote:

Hello

I want to make my opensips listen as wss same like FreeSWITCH but facing 
issue with opensips :


I am working on opensips with wss and tls configuration but facing below 
Error :
140010946856256:error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert 
certificate required:../ssl/record/rec_layer_s3.c:1543:SSL alert number 116


openssl s_client -connect abc.com:7443  -servername 
abc.com 

In opensips.cfg code :

https://pastebin.com/Bn9fc70Z 


___
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] TLS and WSS Opensips Listen

2023-03-30 Thread Pratik Patel
Hello

I want to make my opensips listen as wss same like FreeSWITCH but facing
issue with opensips :

I am working on opensips with wss and tls configuration but facing below
Error :
140010946856256:error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert
certificate required:../ssl/record/rec_layer_s3.c:1543:SSL alert number 116

openssl s_client -connect abc.com:7443 -servername abc.com
In opensips.cfg code :

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


Re: [OpenSIPS-Users] looking for PCAP to CDR utility

2023-03-30 Thread Saint Michael
I am alradybusing tshark and awk, but I thought that there was some tools
written to do this

Federico

On Thu, Mar 30, 2023, 1:55 AM Karsten Wemheuer  wrote:

> Hi,
>
> maybe You can use ngrep (converting pcap to text) and than a lot of
> scripting in the language of Your choice.
>
> Have a nice day
>
> Karsten
>
> Am Donnerstag, dem 30.03.2023 um 01:40 -0400 schrieb Saint Michael:
> > Is there any command line tool for Linux (ubuntu 20.04 or better)
> > that can generate opensips SIP CDR from a group of large *.pcap files
> > that only contain SIP information?
> > I have not found it. I tried with tshark and it would take a lot of
> > coding to get this done. I am looking for these fields
> >
> >  fields="method,from_tag,to_tag,callid,sip_code,sip_reason,time,orig_
> > fu,orig_ru,out_fu,out_ru,source_ip,dst_ip,lrn,rate,provrate,jurisd,ro
> > unding,minsec,singlecharge,setuptime,closetime,duration,ms_duration"
> >  one record per call of course
> >
> >
> >
> >
> > ___
> > 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