Commit Graph

535 Commits

Author SHA1 Message Date
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
Michael Jerris 855cc4b4e0 add 908-retry-seconds gateway param to set reg retry time when getting a 908 for backup interfaces to connect quickly 2014-10-09 14:43:23 -04:00
Mike Jerris 34bc98cafa Merge pull request #47 in FS/freeswitch from ~FLAVIO/freeswitch-fs-5106:master to master
* commit '56535519043201c723467c66c772d7519a2b6f62':
  FS-5106 fire an event when a sip client doesn't respond to option-ping
2014-10-07 14:06:34 -05:00
Spencer Thomason afb00b2ecc Force rport on ADTRAN TA Devices
ADTRAN Total Access devices do not support sending the rport parameter in
the Via header. This allows us to detect the device and force rport when
using the "safe" parameter, enabling the device to be used behind NAT.

FS-6823 #resolve
2014-10-02 13:09:15 -07:00
Spencer Thomason 747322dcc6 Remove Contact header from BYE and CANCEL requests.
Per rfc3261 the Contact header is not applicable and MUST not appear in
the request.

FS-5868 #resolve
2014-10-02 12:24:46 -07:00
Flavio Grossi 5653551904 FS-5106 fire an event when a sip client doesn't respond to option-ping
When all-reg-options-ping is enabled, this adds a new custom event to mod_sofia
(sofia::sip_user_state), which is fired when a client stops responding to such
ping packets (or when it is reachable again).

Add two needed new columns to the sip_registrations table:
  - ping_status, which is "Reachable" or "Unreachable" depending on the client
    status;
  - ping_count, which tracks the number of ping responses received and is used
    to provide some kind of hysteresis to avoid firing the event in case of
    transitory network failures.

Then ping_count is checked against two threshold values, sip-user-ping-min
and sip-user-ping-max in a similar fashion as the ping-{max,min} options for
the gateways. These two values are configurable in the profile's xml
configuration file.

Also, if unregister-on-options-fail is enabled, the client is unregistered
based on the number of OPTIONS failure which is also checked against the
sip-user-ping-{min,max} values.
2014-10-02 12:34:47 +02:00
Steven Ayre 93bd5833c2 Add uptime property to mod_sofia gateways
The 'UP' status indicates a gateway is online as determined by
registration and/or SIP OPTIONS pinging.

The time the gateway has been in the 'UP' status is recorded,
and can be monitored using 'sofia status' and 'sofia xmlstatus'.

This can be used to detect and graph when there are outages.

ref: FS-6772

Reviewed-by: Travis Cross <tc@traviscross.com>
2014-09-04 03:43:36 +00:00
William King c19aa584cc CID: 1214222
sofia_glue_get_url_from_contact to strdup the value so before
overwriting the value signal to sofia that we have finished with the
raw header.
2014-05-16 17:01:03 -07:00
William King 7d5434f57c CID: 1214223-1214230 If sent an invalid registration authentication header with multiple params of the same name, then only use the first of the params instead of leaking memory 2014-05-16 11:50:18 -07:00
Michael Jerris abd7882d18 contact->m_url is an array, don't check array for zero as its useless 2014-04-26 15:35:27 -04:00
Anthony Minessale 7151d6acea FS-6402 part 2 2014-04-02 03:21:37 +05:00
Anthony Minessale 5c0cff70b3 FS-6402 --resolve 2014-04-02 01:20:19 +05:00