Re: [OpenSIPS-Users] wolfssl setup

2022-02-22 Thread Jehanzaib Younis
Thank you for your response.
yes that is what i did but i am getting a couple of errors as shown below:

Feb 23 02:14:17  opensips: ERROR:tls_mgm:split_param_val: No TLS domain name
Feb 23 02:14:17  opensips: Traceback (last included file at the bottom):
Feb 23 02:14:17  opensips: 0. /usr/local//etc/opensips/opensips.cfg
Feb 23 02:14:17  opensips: CRITICAL:core:yyerror: parse error in
/usr/local//etc/opensips/opensips.cfg:122:20-21: Parameter
 not found in module  - can't set

My config is

loadmodule "proto_tls.so"
loadmodule "tls_wolfssl.so"
loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "wolfssl")
modparam("tls_mgm", "server_domain", "mysipxx.com")
modparam("tls_mgm", "match_sip_domain", "mysipxx.com  ")
modparam("tls_mgm", "certificate", "/etc/letsencrypt/live/mysipxx.com
/cert.pem")
modparam("tls_mgm", "private_key", "/etc/letsencrypt/live/mysipxx.com
/privkey.pem")
modparam("tls_mgm", "ca_list", "/etc/letsencrypt/live/mysipxx.com
/fullchain.pem")

Regards,
Jehanzaib


On Wed, Feb 23, 2022 at 7:00 PM Ovidiu Sas  wrote:

> What exactly is the issue?
> You can load both libraries and switch between them via the
> tls_library param of tls_mgm module:
> loadmodule "tls_openssl.so"
> loadmodule "tls_wolfssl.so"
> loadmodule "tls_mgm.so"
> # modparam("tls_mgm", "tls_library", "openssl")
>   modparam("tls_mgm", "tls_library", "wolfssl")
>
> -ovidiu
>
> On Tue, Feb 22, 2022 at 9:57 PM Jehanzaib Younis
>  wrote:
> >
> > Hi,
> >
> > Does anyone have a working example with tls_wolfssl ? I was able to work
> with tls_openssl but i am try to test with wolfssl library and having a
> hard time at the moment ;)
> >
> >
> > Thank you.
> > ___
> > 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] wolfssl setup

2022-02-22 Thread Ovidiu Sas
What exactly is the issue?
You can load both libraries and switch between them via the
tls_library param of tls_mgm module:
loadmodule "tls_openssl.so"
loadmodule "tls_wolfssl.so"
loadmodule "tls_mgm.so"
# modparam("tls_mgm", "tls_library", "openssl")
  modparam("tls_mgm", "tls_library", "wolfssl")

-ovidiu

On Tue, Feb 22, 2022 at 9:57 PM Jehanzaib Younis
 wrote:
>
> Hi,
>
> Does anyone have a working example with tls_wolfssl ? I was able to work with 
> tls_openssl but i am try to test with wolfssl library and having a hard time 
> at the moment ;)
>
>
> Thank you.
> ___
> 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


[OpenSIPS-Users] wolfssl setup

2022-02-22 Thread Jehanzaib Younis
Hi,

Does anyone have a working example with tls_wolfssl ? I was able to work
with tls_openssl but i am try to test with wolfssl library and having a
hard time at the moment ;)


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


[OpenSIPS-Users] mid_registrar and webrtc with asterisk

2022-02-22 Thread Alberto
Hi,

I'm back again, I'm trying to get mid_registrar to work with webrtc, but
when I use the piece of configuration below asterisk replies with 404.
I think it's because asterisk expects the url to be "wss://
10.0.0.153:8188/ws"
But where do I configure such a url in opensips??
Thanks

  if (is_method("REGISTER")) {
mid_registrar_save("location", "p0v");
switch ($retcode) {
  case 1:
#$du = "sips:10.0.0.153:5061;transport=tls";
#$ru = "sip:10.0.0.153:5061";
$du = "sips:10.0.0.153:8188;transport=wss";
$ru = "sip:10.0.0.153:8188";
$fs = NULL;
route(relay);
break;
  case 2:
xlog("L_INFO", "Absorb REGISTER!\n");
break;
  default:
xlog("L_INFO", "Failed to save registration!\n");
break;
}

exit;
  }
___
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-02-22 Thread Bogdan-Andrei Iancu

+1 , good point Ovidiu !!

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp
  https://www.opensips.org/Training/Bootcamp

On 2/22/22 3:58 PM, Ovidiu Sas wrote:

Hi Mark,

Take a look at the ds_list mi command. Under resolved_addresses you
should see which IPs and ports are used for matching the given FQDN.
This should help in troubleshooting your issue.

-ovidiu

On Tue, Feb 22, 2022 at 3:57 AM 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


___
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-02-22 Thread Ovidiu Sas
Hi Mark,

Take a look at the ds_list mi command. Under resolved_addresses you
should see which IPs and ports are used for matching the given FQDN.
This should help in troubleshooting your issue.

-ovidiu

On Tue, Feb 22, 2022 at 3:57 AM 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
>
>
> ___
> 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


Re: [OpenSIPS-Users] is_from_gw() DNS Names

2022-02-22 Thread Bogdan-Andrei Iancu

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 

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


___
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-02-22 Thread Mark Farmer
Hi Bogdan

The GW's have 2 CNAME records which I have no control over. DR has entries
like 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";
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 
> listUsers@lists.opensips.orghttp://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


Re: [OpenSIPS-Users] is_from_gw() DNS Names

2022-02-22 Thread Bogdan-Andrei Iancu

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


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


Re: [OpenSIPS-Users] acc not writing INVITE to db

2022-02-22 Thread Răzvan Crainea

Hi, Marcin!

Can you provide the full debug logs of a call without CDR?

Best regards,

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

On 2/20/22 22:58, Marcin Groszek wrote:

An update: Perhaps this will help:

debug of  acc successfully written to db:

  DBG:dialog:fetch_dlg_value: looking for 
  DBG:dialog:fetch_dlg_value: var found-> <#006>!
  DBG:db_mysql:db_mysql_do_prepared_query: new query=|insert into acc 
(method,from_tag,to_tag,callid,sip_code,sip_reason,time,src,dst,src_ip,dst_ip,caller_cus_id,callee_cus_id,billsec,caller_bill,callee_bill,rate,fee,setuptime,created,duration,ms_duration 
) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)|
DBG:db_mysql:re_init_statement:  query  is (method,from_tag,to_tag,callid,sip_code,sip_reason,time,src,dst,src_ip,dst_ip,caller_cus_id,callee_cus_id,billsec,caller_bill,callee_bill,rate,fee,setuptime,created,duration,ms_duration 
) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)>, ptr=(nil)


and dbug of no cdr written to db:

DBG:dialog:lookup_dlg: no dialog id=1391388357 found on entry 737
  DBG:dialog:dlg_onroute: unable to find dialog for BYE with route param 
'1e2.5c6eee25'
  DBG:dialog:get_dlg: input 
ci=<3ded0fe13eeb83243d0285fe620772ad@10.0.0.111:5062>(48), 
tt=(10), ft=(10)
  DBG:dialog:get_dlg: no dialog 
callid='3ded0fe13eeb83243d0285fe620772ad@10.0.0.111:5062' found
  DBG:dialog:dlg_onroute: Callid 
'3ded0fe13eeb83243d0285fe620772ad@10.0.0.111:5062' not found

  DBG:dialog:destroy_dlg: destroying dialog 0x7effaf2068a0
  DBG:dialog:destroy_dlg: dlg expired or not in list - dlg 
0x7effaf2068a0 [737:1391388357] with clid 
'3ded0fe13eeb83243d0285fe620772ad@10.0.0.111:5062' and tags 'as1a9a4ffb' 
'as5c819c44'


10.0.0.111 is a originating host, and it looks as the dialog var is 
missing.


I have also compared queries: insert into dialog and update dialog and 
they are identical other then a  dlg_id and callid.


Debug for the calls states: DBG:dialog:get_dlg: no dialog callid= and I 
was able to find it same callid in  insert into dialog query and in 
database table as well.





___
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