Commit Graph

551 Commits

Author SHA1 Message Date
Andrey Volk 1544dfb755 [Core, modules] Fix various dead assignments. 2026-05-25 23:56:13 +03:00
junction1153b 3b58ebc5f3 [mod_sofia] Update Polycom UA to recognize new Poly phones
We observed that the new Poly phones (formerly known as Polycom) were not getting sent a SIP UPDATE in certain circumstances (example: retrieving a parked call, and therefore, Caller ID would not show the parked caller). I renamed Polycom to Poly which will catch all Poly AND Polycom UA's. I also added Acrobits, and Ringotel to extend such functionality to those UA's. There were also other minor compatibility issues with the new Poly phones which have been resolved with tweaking the UA recognition on the code.

Co-authored-by: Joseph <junction1153@gmail.com>
2025-01-21 00:57:25 +03:00
Andrey Volk 5b1c2688da [Core, mod_sofia] Add switch_uint31_t type. Fix CSeq bigger than 2^31-1. 2024-05-09 22:20:14 +03:00
Jakub Karolczyk 5656972bfe [core,miniupnpc,modules] Fix not used variables 2023-07-04 10:18:16 +01:00
Jakub Karolczyk 9494148b10 [mod_sofia] Coverity fixes
* [mod_sofia] Coverity CID 1468634 (Resource leak)

* [mod_sofia] Coverity CID 1294467 (Resource leak)

---------

Co-authored-by: Andrey Volk <andywolk@gmail.com>
2023-03-30 22:00:40 +03:00
Joseph Nadiv 7afeceb47e [mod_sofia] Randomize OPTIONS Ping interval
In FS-6400, the attempt was made to randomize OPTIONS
packets to be sent at a random interval.  The same random
interval is applied to all endpoints so this doesn't work.
Furthermore, rounding within the code, as well as
reseeding with srand() on each run will ultimately
make the ping times converge over time.  Once the
times converge, they will not separate since the reseeding
will cause the same random number to apply to each
registration.

This commmit will apply the random interval only during
initial registration and update of registration.
All subsequent pings will be incremented with the
actual value of ping-mean-interval. (This parameter
name is no longer accurate, and would be better named
ping-max-interval).

srand() has been moved to the start of the worker
thread, and all repeat calls have been removed,
so that each call of rand(), even during the
same second, generates a different random number.

Fixes #1132, Fixes #1133
2022-11-20 13:51:41 -05:00
agree 767b163cbd [mod_sofia] Fix PRESENCE_PROBE firing on rejection
After rejecting the subscription for authentication the function calls goto end. In the end block freeswitch fires PRESENCE_PROBE events and releases the allocated memory
* when rejecting a call for auth PRESENCE_PROBE should not get fired
* This caused all other subscribers to the same entity to get flooded with NOTIFY's because `call_id` only gets set later in the function, so when firing the PRESENCE_PROBE without `call_id` being set all subscriptions will get a notify
* this can be considered a security flaw as any unauthorized user can send
SUBSCRIBES and trigger thousands of NOTIFY's to the SUBSCRIBED endpoints

This was fixed simply my moving down the end label after the code that
sends the PRESENCE_PROBE event
2022-08-26 18:09:34 -04:00
Andrey Volk 19a7debc1b [mod_sofia] Fix dead nested assignments 2022-08-10 00:13:18 +03:00
Dragos Oancea a5a1fb9dd8 [mod_sofia] fix memleak (presence) 2021-10-23 22:00:56 +03:00
Andrey Volk cba582cf4a [mod_sofia] Fix multiple issues in sofia_presence.c found by scan-build. 2021-10-19 20:10:35 +03:00
Andrey Volk dcb75a79e3 [mod_sofia] Fix multiple memory leaks in sofia_presence_handle_sip_i_subscribe() 2021-03-17 00:56:19 +03:00
Andrey Volk b06036e30f [mod_sofia] Cleanup usage of sofia-sip headers. 2020-08-03 22:15:19 +04:00
Andrey Volk e2c1e3a7d3 FS-12055: [mod_sofia] Fix leaks and release profile properly in general_event_handler() and actual_sofia_presence_event_handler() 2019-12-30 23:58:28 +04:00
Andrey Volk 20a893fd06 FS-12038: [mod_sofia, core] Fix potential leak and race in chat_hash, add switch_core_hash_insert_auto_free(). 2019-09-06 20:22:20 +04:00
Andrey Volk 91e99db6c8 FS-11944: [mod_sofia] Fix error: 'nh->nh_home' will always evaluate to 'true'. 2019-07-23 18:47:17 +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 da49b042ba FS-11506: [mod_sofia] Handle multiple History-Info headers in MESSAGE 2018-11-06 20:56:11 +00:00
Mike Jerris 94a094c5ef FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae with malformed xml 2018-07-24 07:21:39 +00:00
Brian West 352cc3526d FS-10903: [mod_sofia,mod_valet_parking] Fix Issue with subscriptions and Valet Parking #resolve 2018-07-24 07:21:39 +00:00
Bob McCarthy bdfc02f227 FS-10808 [mod_sofia] Fix memory leak in SLA 2018-05-02 14:06:01 -06:00
Alexey Melnichuk dd913d1bb5 FS-10268. Set correct Event-Name for RECV_EVENT event in sofia endpoint 2017-04-26 17:15:51 +03:00
Anthony Minessale 778190ffaf FS-10180: [mod_sofia] Move debug line to higher level #resolve 2017-03-26 10:58:28 -04:00
Brian West 9e971e5602 FS-10035: [mod_sofia] Outbound calls use progressing not alerting #resolve 2017-02-13 08:08:56 -06:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Brian West c0423c5877 FS-9855: [mod_spandsp] Refused T38 reinvite on b-leg breaks T38 negotiation on a-leg when using T38 gateway mode #resolve 2017-01-05 16:34:11 -06:00
Brian West f54c7f9f34 FS-9855: [mod_spandsp] Refused T38 reinvite on b-leg breaks T38 negotiation on a-leg when using T38 gateway mode #resolve 2017-01-05 15:51:52 -06:00
Mike Jerris e1b3ee1efd FS-9652: improve sql sanitization 2016-11-11 11:27:35 -06:00
Mike Jerris 654cf8c5ef Merge pull request #1030 in FS/freeswitch from ~LUIZTELLES/bf-fs-9671:bugfix/FS-9671-wrong-cseq-is-sent-in-notify-after to master
* commit '4c45f529f8b193d6bb2535ae5d42dc0c86f2960f':
  FS-9671 fix wrong cseq in notify Expires 0
2016-11-11 09:52:41 -06:00
Brian West 6076e0c7e9 FS-9204: complte the urls so that snom can execute the pickup, It used to probably send it to the proxy, but now needs the host in the packet or throws network error 2016-11-09 16:27:15 -06:00
luiztelles 4c45f529f8 FS-9671 fix wrong cseq in notify Expires 0 2016-10-31 09:57:07 -02:00
Mike Jerris 2c86910092 FS-9381: [mod_sofia] fix leak in sofia_presence_chat_send 2016-07-25 14:01:52 -04:00
Armen Babikyan e23aa12a2d FS-8643: fix mod_sofia memory leaks 2015-12-10 22:42:55 -08:00
Mike Jerris 5c59a0159d FS-7966: fix more msvc 2015 warnings. 2015-08-31 17:08:52 -04:00
Michael Jerris 3bbfa9f341 FS-7407: when using proxy, make sure to pick the right transport to the proxy 2015-04-13 22:54:02 +00:00
Michael Jerris 302a339fdf FS-7294: Enable -Werror when building with clang compiler #resolve 2015-02-17 12:20:33 -05:00
Michael Jerris 6afc2b5a2e FS-6688: #resolve fix resubscribe through proxy with record route when the resub does not have a record route and the route has uri params 2015-01-07 17:41:19 -05:00
Anthony Minessale c460c00b55 FS-7134 #resolve 2015-01-06 16:29:38 -06:00
Michael Jerris 067cb0f0f2 FS-7100: make buffer for sub contact big enough 2014-12-22 17:19:08 -05:00
Michael Jerris 5376e82669 FS-6688: don't update the contact when the original had fs_path, the new one doesnt, and the contact didn't change. This will fix the normal case of record route from a proxy without breaking normal changing of a contact 2014-12-10 10:33:43 -05:00
Brian West 75815877d6 FS-6688 #resolve 2014-10-27 14:14:21 -05:00
Travis Cross b5294c53d6 Fix crash on transport=tls with non-TLS profile
We use the transport of the Contact header of the remote UAC to decide
which of our own Contact addresses we should use when replying to a
SUBSCRIBE or sending a presence NOTIFY.

If TLS is not enabled on a Sofia profile, then the TLS Contacts for
that profile are NULL.  Unfortunately we were using these NULL values
uncritically when the remote UAC sent us a Contact header with a TLS
transport and our own Sofia profile did not have TLS enabled.

With this commit we fall back to our TCP Contact address when the
remote Contact is TLS and our Sofia profile does not have TLS enabled.
2014-10-10 18:36:37 +00:00
Anthony Minessale 77c99b6306 FS-6806 #resolve #comment off by 1 error in last fix 2014-09-10 20:32:36 +05:00
Anthony Minessale a73583b5f3 FS-6806 #resolve 2014-09-09 00:09:31 +05:00
Anthony Minessale 5075d4af0d fix typo that can lead to seg 2014-07-30 22:17:47 +05:00
Brian West 940171c623 FS-6670 #resolve #comment Doh, see this one is dangerous 2014-07-21 16:04:36 -05:00
Brian West c15663cba2 FS-6670 #resolve #comment This should resolve this fun stuff. 2014-07-21 15:58:32 -05:00
Anthony Minessale II 83a4305003 Merge pull request #6 in FS/freeswitch from ~FRANCOIS/fs-6568:master to master
* commit 'e3b0d7219e1ea269ccd7c5f04747ad21f62c73b2':
  Fix BLF confusion when dealing with the same extension in multiple domains
2014-07-18 12:27:19 -05:00
Anthony Minessale c58e64bf6d add some more headers to sip messages 2014-07-16 00:55:46 +05:00
François e3b0d7219e Fix BLF confusion when dealing with the same extension in multiple domains 2014-07-06 16:57:50 +02:00