Commit Graph
546 Commits
Author SHA1 Message Date
Andrey Volk 594e42544b [mod_sofia] Put more comments into the code explaining that we include switch_ssl.h into sofia_reg.c because of SHA-512-256 (RFC-8760) 2021-11-17 18:18:52 +03:00
Chris Rienzo c9fba5cf39 [mod_sofia] Fix regression in RFC-8760. SHA-512/256 was not offered because OPENSSL_VERSION_NUMBER was not defined in sofia_reg.c 2021-11-15 13:18:29 -05:00
Dragos Oancea 392bc26a43 [mod_sofia] fix memleak with invalid hostname as gw/proxy 2021-10-23 22:00:49 +03:00
Dragos Oancea c86e3827f9 [mod_sofia] rfc8760: use different nonce per auth algorithm.
[mod_sofia] keep unconsumed nonce in the db for 32 seconds (timer_t1x64) + nonce_ttl.
[mod_sofia] add #ifdef condition on using sha512: OPENSSL_VERSION_NUMBER >= 0x10101000L
2021-10-23 22:00:42 +03:00
Dragos OanceaandAndrey Volk 69cdaac60b [mod_sofia] more fixes around md5 hash infoleak (tricky cfg).
* [mod_sofia] md5 hash infoleak fixes: (explictly allow host set in gw params 'register_proxy' and 'outbound_proxy' to challenge too).

"We have tightened security for digest authentication on gateways.
If you have gateways configured using dns and not an ip address,
you may need to configure gw-auth-acl in gateway configuration to
specify the IP addresses you can send auth challenges to for this gateway.
This is meant to better secure who we will send auth challenges." (Mike Jerris)

[mod_sofia] add REGISTER/401 unit-tests (sipp based)

[mod_sofia] add INVITE/407 unit-test (sipp-based)

* Cleanup spacing

Co-authored-by: Andrey Volk <andywolk@gmail.com>
2021-09-08 18:22:14 +03:00
Dragos Oancea c41aa83b17 [mod_sofia] fix md5 digest infoleak
[mod_sofia] refactor IP checks with sip-dig

[mod_sofia] add sipp-based unit-tests (use spawn_instead_of_system)
2021-08-13 18:17:17 +03:00
Dragos Oancea 833235b941 [mod_sofia] Add RFC8760 (sha-256, sha-512)
enable on the sip profile, eg:
<param name="rfc8760-auth-algorithms" value="sha-256,md5"/>
2021-04-12 09:57:56 -04:00
Andrey Volk dfb9541b08 [mod_sofia] Use thread-safe alternatives when destroying nua and nua_handle references. Bump sofia-sip library requirement to version 1.13.3 2021-03-22 18:43:19 +03:00
Andrey Volk 0059f0cc1b [mod_sofia] Gateways DOWN state introduced a regression: REG gateways in DOWN state could not be killed. NOREG gateways could change state in some conditions. Register and Unregister commands will now error if a gateway is NOREG. 2021-03-18 03:07:49 +03:00
Andrey Volk e3e0c7c259 [mod_sofia] Protect insertion into profile->reg_nh_hash with a mutex. 2021-03-17 18:33:12 +03:00
Andrey VolkandMike Jerris a746d12f6c [mod_sofia] Keep noreg gateways as NOREG, mark unregistered gateways as DOWN.
Co-authored-by: Mike Jerris <mike@signalwire.com>
2021-03-17 18:20:32 +03:00
Andrey Volk b06036e30f [mod_sofia] Cleanup usage of sofia-sip headers. 2020-08-03 22:15:19 +04:00
Chris Rienzo 52a17066eb [mod_sofia] Quiet down error when registration credentials are missing 2020-05-07 02:42:01 +04:00
Jourdan Templeton 5805addbeb [mod_sofia] Add new gateway param 'contact-in-ping' to support for Microsoft Teams Direct Routing 2020-03-23 23:29:53 +04:00
Andrey Volk 8442218df1 [mod_sofia] sofia_handle_sip_i_invite() leaks xml and event objects on acl_token, sofia_reg_handle_sip_r_challenge() leaks xml object when a user does not have params. 2019-12-31 00:45:00 +04:00
Chris Rienzo 9d4f480335 [mod_sofia] Fix some incorrect word contractions. 2019-10-10 09:41:53 -04:00
Mariah Yang d654faa5a9 FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_sofia 2019-07-18 22:22:56 +04:00
Chris Rienzo 681b7e28ab FS-11785 [mod_sofia] fix scan-build issues 2019-07-17 21:49:50 +04:00
Mike Jerris 99b3162ffc FS-11680: [mod_sofia] dont treat registers from websockets received over a proxy over non websockets as nat. We should be sending to the route set and not locking on to send all requests to the websocket directly in this case 2019-07-16 23:26:20 +04:00
Andrey Volk a7477ed0e2 FS-11911: Fix build on Debian Buster 2019-07-15 22:23:25 +04:00
Chris Rienzo 604690b5c8 FS-11583 [mod_sofia] fix crash when missing address in register event 2018-12-26 15:51:41 -05:00
Chris Rienzo cae7f0fa2f FS-11562 [mod_sofia] fire register state event on changing registrar IP 2018-12-10 21:53:13 -05:00
Seven Du 9911004b52 FS-11562 #resolve add register ip and port to gateway register state change events 2018-12-10 10:22:20 -05:00
Christian Schmidt 69ec4aadab FS-11508: [mod_sofia] Make max-registrations-per-extension use extension instead of username 2018-11-08 12:45:45 +01:00
Brian West 31d9584f59 FS-10840: [mod_sofia] max-registrations-per-extension parameter is not multi-tennant 2018-07-24 07:21:37 +00:00
Hunyadvári Péter bec68edb16 FS-8893: [mod_sofia] Add variables to sofia::register/unregister events 2018-04-03 10:42:04 +02:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Mike Jerris e1b3ee1efd FS-9652: improve sql sanitization 2016-11-11 11:27:35 -06:00
Josh Allmann 5bb6742b44 mod_sofia: Add 'username' header for expiration events.
More consistent with the naming in other events, eg
register and unregister.
2016-10-13 15:50:50 -04:00
Mike Jerris 346a60ed3d Merge pull request #928 in FS/freeswitch from ~ANTONIO/freeswitch-fs-9398:master to master
* commit '9cd2dbbddb9afb59037704739e206e30b4ac1cb6':
  FS-9398 solve missing variables in sofia events expire and unregister
2016-09-02 13:11:53 -05:00
Spencer Thomason 5a2f9d7a78 FS-9466: Use system MD5 if available
- Use system MD5 on BSD and Solaris based platforms
- Use OpenSSL if system library is not available
- Fallback to included APR
- Optimize switch_md5_string()
- replace libsofia MD5 routines in mod_sofia with switch_md5() ones

FS-9466 #resolve
2016-08-31 15:00:48 -07:00
Antonio 9cd2dbbddb FS-9398 solve missing variables in sofia events expire and unregister 2016-08-17 09:50:08 +02:00
Sergey Khripchenko 2766eaf49e FS-9225: [mod_sofia] Allow to force SIP REGISTER Expires: to be within configured range.
Allow to force SIP REGISTER Expires: to be within MIN and MAX values.
Not just to force it to one specific value using "sip-force-expires".

New profile parameters:
  "sip-force-expires-min"
  "sip-force-expires-max"
2016-06-03 05:30:01 -07:00
Flavio Grossi d1680d7b3b FS-7915 parse and store multiple path fields 2016-03-18 09:52:43 +01:00
Ken Rice ce62c06241 update my email address 2016-01-22 16:43:29 -06:00
Michael Jerris 5509a62706 FS-8042, FS-8182: add ping time (in ms) to sip_registrations table, displays as part of the show commands that show registration details, add force_ping=true user var to force options ping on individual registered endpoints 2015-09-21 12:13:28 -05:00
Mike Jerris 5c59a0159d FS-7966: fix more msvc 2015 warnings. 2015-08-31 17:08:52 -04:00
Mike Jerris 641fc1f18e Merge pull request #169 in FS/freeswitch from ~FRANCOIS/freeswitch-fs-7204:master to master
* commit '441dd9128862ce741a56a01acfa3e862949d1347':
  FS-7204, Allow to force a per-account send-message-query-on-register
2015-06-01 13:54:15 -05:00
Spencer Thomason 54f1639831 FS-7192: [mod_sofia] do not include Expires header in INVITEs responding to a auth challenge 2015-02-19 15:36:54 -08:00
Michael Jerris 302a339fdf FS-7294: Enable -Werror when building with clang compiler #resolve 2015-02-17 12:20:33 -05:00
Rajesh Panicker 5db8a0c16b FS-7228 - Max Register Refresh before the Register is challenged for credentials 2015-02-06 10:16:36 -08:00
François 441dd91288 FS-7204, Allow to force a per-account send-message-query-on-register 2015-01-27 17:14:54 +01:00
Dmitriy N. Borisov c96d64e7e1 invalid type cast correction 2014-12-19 11:13:55 +03:00
Brian West 32a9ff3d39 Merge pull request #60 in FS/freeswitch from ~SJTHOMASON/freeswitch:FS-6823 to master
* commit 'afb00b2ecc8a9b049801f3f475c80e1111070fa8':
  Force rport on ADTRAN TA Devices
2014-11-04 07:36:36 -06:00
Brian West 39be877760 One place we said Failed Registration, the other we said Registration Failed, lets try to be consistent. 2014-10-30 10:40:52 -05:00
Brian West 3b9f0c32e6 FS-6927 #comment allow sub millisecond resolution for option ping times 2014-10-29 16:01:28 -05:00
Brian West f772b400bf FS-6939 please do pull request next time. ;) 2014-10-27 14:12:55 -05:00
Brian West 26af9c3d67 FS-6939 #resolve 2014-10-27 12:23:44 -05:00
Brian West 15e9e68064 FS-6927 #resolve #comment This display option ping times in the gateway status on sofia status gateways or individual gateway status output 2014-10-16 17:03:37 -05:00
Matteo Brancaleoni beb1d17921 FS-6400 Improve sip ping generation by distributing them across an interval 2014-10-14 14:24:21 +02:00