Commit Graph

1294 Commits

Author SHA1 Message Date
Andrey Volk 7ed2a99eb5 [mod_sofia] Implement maximum receiving requests per second max-recv-requests-per-second profile parameter. (Warning: Behaviour change. New default is 1000 requests per second) 2021-10-23 22:01:06 +03:00
Andrey Volk 3447daea46 [mod_sofia] Destroy session after relaying notify result on proxy refer. 2021-10-23 22:00:45 +03:00
Chris Rienzo 1adcebb309 [mod_sofia] add sip_refer_continue_after_reply channel variable.
Set to true to prevent hangup when response to REFER request is received.
Added sip_refer_target_status_code and sip_refer_target_provisional_status_code
channel variables to store responses from NOTIFY sipfrags.
2021-10-23 22:00:41 +03:00
Michael Jerris 9163b7569a [mod_sofia] add 'sip_destination_prefix' var to prefix user portion of request uri with a value (note this will not affect calls to registered endpoints) (#70) 2021-10-23 21:59:51 +03:00
Mike Jerris 0283c9e2e7 [mod_sofia] add 'sip_destination_prefix' var to prefix user portion of request uri with a value (note this will not affect calls to registered endpoints) 2021-10-23 21:59:51 +03:00
Seven Du 260d1a40e3 [mod_sofia] add contact header in REFER 2021-10-23 21:59:50 +03:00
Andrey Volk 86a075da56 [mod_sofia] scan-build: Fix dereference of null pointer in sofia_outgoing_channel(). 2021-10-19 20:26:53 +03:00
Andrey Volk 81fff857c5 [mod_sofia] sofia_process_dispatch_event() should unref all handles via sofia stack 2021-06-14 19:46:28 +03:00
Chris Rienzo deecaae870 STIR/SHAKEN (#1160)
* [core] Add SWITCH_CAUSEs for STIR/SHAKEN.
[mod_sofia] Add sofia_verify_identity dialplan APP as a STIR/SHAKEN verification service.  Set sip_hangup_on_verify_identity_fail=true to end calls that fail verification, otherwise check sip_verstat and sip_verstat_detailed channel variables for verification result.

* [mod_sofia] Fix stir shaken implementation issues on fail.

* fix build

* Fix given comments

* stir_shaken_passport_get_grant return does not require to be freed.

* reworked things

* [core] add switch_rfc822_datetime_to_epoch()

* [mod_sofia] fix test return code

* [mod_sofia] Add Date header when signing Identity

* [mod_sofia] Check Date - WIP doesn't work

* [mod_sofia] STIR/SHAKEN check SIP Date header

* Try to give time for sofia to clean up calls

Co-authored-by: Andrey Volk <andywolk@gmail.com>
2021-04-27 13:54:32 -06: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 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
Seven Du bb6ec01d1e [mod_sofia] fix session log 2021-03-16 20:29:04 +03:00
Andrey Volk b06036e30f [mod_sofia] Cleanup usage of sofia-sip headers. 2020-08-03 22:15:19 +04:00
Andrey Volk 6f0ad146d2 [mod_sofia] Fix crash from double profile unlock on outgoing channel from a gateway on a paused profile 2019-12-31 03:13:03 +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 f93445a38c FS-12010: [sofia-sip] Fix improper cleanup on su_deinit(). 2019-08-20 03:11:28 +04:00
Andrey Volk 96aac32237 FS-12010: [mod_sofia, mod_valet_parking, mod_enum] Fix memory leaks on FreeSWITCH shutdown. 2019-08-19 23:14:24 +04:00
Mike Jerris 090e8284b6 FS-11961: [mod_sofia] Handle request vs response in sofia_media_tech_media 2019-07-25 14:26:36 -06: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
Seven Du 23e050618d FS-11721 fix data length of stripped html 2019-07-17 23:26:05 +04:00
Mike Jerris e7dda1b027 Revert "FS-9490: [mod_sofia] add filter to SIP messages that match a regexp."
This reverts commit 53dbe5d84a.

This previous patch made logger function not reentrant so reverting until we can get a fix without that issue
2019-07-17 22:57:55 +04:00
Chris Rienzo e09e84b088 FS-11784 [mod_sofia] quiet the codec negotiation error log. It's something that is not necessarily a FS issue. 2019-07-17 20:14:33 +04:00
Anthony Minessale b8a8765991 FS-11713: [core] fix video upgrade from b to a 2019-07-17 20:07:30 +04:00
Mike Jerris a9e634b664 FS-11557: [mod_sofia] add support for RFC 7989 Session-ID header
(enable with sofia profile param rfc-7989=true)

FS-11557 [mod_sofia, mod_conference, core] Add support for re-INVITE when setting Session-ID in conference after call has been answered.

FS-11557 [mod_conference] Missed a spot where APP_SESSION_ID needed to be set.

FS-11557: set session id for outbound (initial requests)

FS-11557: [mod_sofia] rename vars and functions "session id" -> "session uuid" to reflect the real meaning for rfc7989.

FS-11557: fix bug - colliding chan var names (session_id)

FS-11557: check nil session uuid

FS-11557 : replace CS_NEW with CS_INIT for when originating calls, generate new uuid.

FS-11557: handle inbound (UAS mode, one leg)

FS-11557: generic param handling and filter via new sip profile option "rfc-7989-filter", eg:
<param name="rfc-7989-filter" value="logme, sec-agree, privacy" />

FS-11557: renamed chan vars (reflect meaning only for RFC7989)

FS-11557: fallback to RFC7329 - "old" Session-ID

FS-11557: distinguish between request and replies when we read the header
(to provide compatibility with old RFC7329 - section 11 of RFC7989)
FS-11557: change more vars/consts names

FS-11557: move compat flag on the channel.

FS-11557: add Session-ID header in REFER

FS-11557: needs extra condition on received initial request

FS-11557: handle NOTIFY

FS-11557: support answer() in dialplan - it was sending back a 200 OK with Session-ID invalid, eg: A=NIL;B=X

FS-11557: add Session-ID for NOTIFY (more cases)

FS-11557: handle reply to SIP INFO (add Session-ID header)

FS-11557: handle case of BYE after REFER, when the channel is destroyed already (save the uuid on sofia_private)

FS-11557: handle more SIP reply cases (eg: 202 Accepted , more negative replies)

FS-11557: handle ACK (UAS role)

FS-11557: added "rfc-7989-force-old" profile param - to enforce old rfc7329 for the UAC role. default off.
enabled with "<param name="rfc-7989-force-old" value="true" />".

FS-11557: fallback to rfc7329 fixes.

FS-11557: set flag CF_RFC7329_COMPAT on partner channel where needed

FS-11557: fix crash (mod_conference)
2019-07-17 19:13:41 +04:00
Seven Du cc66bcabfd FS-11498 fix url cut off 2019-07-16 22:26:32 +04:00
Andrey Volk a7477ed0e2 FS-11911: Fix build on Debian Buster 2019-07-15 22:23:25 +04:00
Andrey Volk 0d895c50f5 FS-11421: [mod_sofia] Cleanup. 2019-06-21 20:58:12 +04:00
Chris Rienzo 0a6d87edfe FS-11824 [sofia-sip,mod_sofia,core] Added cause codes that map to SIP 600,603,604,606,607 2019-06-06 11:51:51 -04:00
Piotr Gregor 118dd796f3 FS-11421: [core,mod_sofia] Fix rtp_pass_codecs_on_stream_change to process all sdp settings in the re-invite -- add new filter_codecs app and fix some races and negotiation bugs #resolve 2019-06-06 11:08:52 -04:00
Mike Jerris d61126ca82 FS-11814: [mod_sofia] fix regression in fs_path handling on BYE 2019-06-04 15:46:36 -04:00
Mike Jerris 720863188c Merge pull request #1654 in FS/freeswitch from ~LAZEDO/freeswitch:feature/FS-11607 to master
* commit '614bc42e2ce07492ec8410d4046521a4a6ed6cac':
  [FS-11607] [mod_sofia] add a json api to collect info
2019-02-12 15:16:55 +00:00
lazedo 614bc42e2c [FS-11607] [mod_sofia] add a json api to collect info 2019-01-30 23:44:42 +00:00
Luis Azedo 185ddcb860 FS-11026 [mod_sofia] set proxy on bye if available 2019-01-14 17:05:21 +00:00
António Silva 8ca7a5492d FS-11512 [mod_sofia] #resolve missing privacy header on display update 2018-11-29 09:54:24 +01:00
António Silva 221d728e62 FS-11118 #resolve mod_sofia send display update to Grandstream family user-agent 2018-11-21 16:04:29 +01:00
Brian West 9e8ae18f95 FS-11471: [mod_sofia] revert changes to send PAI for polycom 4.x versions differently, seems polycom has now fixed this 2018-10-22 11:00:33 -05:00
Brian West adb813e089 FS-10880: [mod_sofia] SIP INFO DTMF method not working on b-leg #resolve 2018-07-24 07:21:39 +00:00
Brian West 433c2b6b89 FS-10899: [core] 3pcc-mode=proxy is proxying SDP in the 200OK with late offer invites #resolve 2018-07-24 07:21:39 +00:00
Anthony Minessale 67b56343a2 FS-10823: [mod_sofia] curly brackets on SDP header causes FS to crash #resolve 2018-07-24 07:21:34 +00:00
Anthony Minessale db47792558 FS-10447: [freeswitch-core] Manual video refresh mode #resolve 2017-06-29 16:57:18 -05:00
Mike Jerris 14204c2557 Merge pull request #1083 in FS/freeswitch from ~MOCHOUINARD/freeswitch:FS-9791 to master
* commit '040a0d20d9bfc87fb6571a584a3061cb699bb71b':
  FS-9791: Allow sofia_contact() to limit result by sip user agent Ex: sip_match_user_agent=Bria
2017-04-28 20:03:29 +00:00
Josh Allmann 70dd9727ee FS-10241: Convert sofia_send_info_vid_refresh to a chanvar. 2017-04-19 21:41:49 +00:00
Mike Jerris 3d885ac5c0 FS-10241: [mod_sofia] don't send xml media refresh request before we have media setup 2017-04-17 16:56:46 -05:00
Marc Olivier Chouinard 040a0d20d9 FS-9791: Allow sofia_contact() to limit result by sip user agent Ex: sip_match_user_agent=Bria 2017-03-10 23:00:42 -05:00
Mike Jerris 2f4c9b363e FS-10067: [mod_sofia] add update-refresher profile param and sip_update_refresher channel var to use update for session timers 2017-03-03 11:01:26 -06:00
Anthony Minessale 40bfe0fff5 FS-9154: [freeswitch-core] Add & remove video on re-invites #resolve 2017-02-15 13:56:35 -06:00
Brian West e8bd2d6f98 FS-10041: [mod_conference,mod_sofia] Invalid contact,<(null)>;isfocus, when hold call inside a conference room #resolve 2017-02-14 14:31:11 -06:00
Mike Jerris e8f6ed3d93 Merge pull request #1183 in FS/freeswitch from ~SAFAROV/freeswitch2:FS-10009 to master
* commit '6c12f69e0c893646eda0bb010873583040aa136b':
  FS-10009: mod_fail2ban - Added logging of network_ip for abandoned calls
2017-02-14 13:32:05 -06:00