Commit Graph

518 Commits

Author SHA1 Message Date
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
Jeff Lenk 1cde5f01e0 FS-6386 --resolve 2014-03-23 16:15:49 -05:00
Anthony Minessale 8f703c7a78 FS-6353 regression from 7ba257ecd6 2014-03-14 18:34:08 -04:00
Anthony Minessale e37616e36d do not retry so fast on failed outbound subs 2014-03-14 12:55:50 -05:00
Brian West 7a6e8f4672 FS-6354 --resolve, add realm to sofia::expires event 2014-03-13 11:13:10 -05:00
Anthony Minessale 7ba257ecd6 FS-6353 --resolve 2014-03-13 10:23:13 -05:00
Anthony Minessale 70f2908976 more nat fix 2014-03-11 16:12:43 -05:00
Anthony Minessale 5c8a3b12fd Convert some behaviors to optional.
These all were set before but now are disabled by default because they are not proper to have enabled without a good reason.

tcp-unreg-on-socket-close

If registration is TCP or TLS and socket connection is interrupted, unregister the client.

tcp-always-nat

Treat all TCP connections as NATTED, this causes all traffic back to the phone to reuse the existing TCP socket but may
cause problems when not used with TCP keepalive.

tls-always-nat

Same as tcp-always-nat but only for TLS connections.
2014-03-11 15:17:02 -05:00
Anthony Minessale 804ef7709d change from sqlite hash to newly added one 2014-03-09 00:37:17 +05:00
Brian West 1d36f5b219 FS-5915 --resolve 2014-02-28 16:09:59 -06:00
Anthony Minessale b82df8a7da FS-6287 this should either prevent the problem or spell out what is causing it. please test 2014-02-28 23:23:30 +05:00
Brian West 45e19b75dd FS-6270 add client_port to SIP Registration events 2014-02-25 21:49:35 -06:00
Brian West 97e136c12b FS-5724 include realm in sofia::unregister Event 2014-02-22 18:31:23 -06:00
Travis Cross bd72cd9cc1 Allow setting late margin on register expirations
When an endpoint registers to us we internally mark the expiration as
some seconds longer than the actual registration.  Previously this
value was fixed at 60 seconds.

Some people need this value to be shorter so they can meet their SLA
by taking a different action when a device doesn't re-register when
expected.

This commit adds a SIP profile parameter sip-expires-late-margin which
allows setting the margin value we apply here.

FS-6101 --resolve

Thanks-to: Emmanuel Schmidbauer <e.schmidbauer@gmail.com>
2014-02-20 16:07:53 +00:00
Anthony Minessale b3c02a547e FS-6230 --resolve There was no NAT detection enabled on the calls, this patch will activate it explicitly when used with force-rport to avoid a similar problem with other users 2014-02-14 23:50:17 +05:00
Ken Rice 6e7d5d0897 update copyright header for 2014 2014-02-12 12:08:56 -06:00
Anthony Minessale c52ac4817c FS-6128 FS-6200 --resolve allocating the sofia_private on the nua_handle seems to lead to memory corruption, changing it back to malloc as done in the version before the regression 2014-02-11 04:05:40 +05:00
Anthony Minessale a21cbf8142 FS-6165 --resolve 2014-01-30 00:20:21 +05:00