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>
This commit is contained in:
Chris RienzoandAndrey Volk authored and GitHub committed 2021-04-27 13:54:32 -06:00
1 parent b7316ba557
commit deecaae870
16 files changed
+742 -9

No files matched your search

+5
View File
@@ -130,6 +130,11 @@ static struct switch_cause_table CAUSE_CHART[] = {
{"DOES_NOT_EXIST_ANYWHERE", SWITCH_CAUSE_DOES_NOT_EXIST_ANYWHERE},
{"NOT_ACCEPTABLE", SWITCH_CAUSE_NOT_ACCEPTABLE},
{"UNWANTED", SWITCH_CAUSE_UNWANTED},
{"NO_IDENTITY", SWITCH_CAUSE_NO_IDENTITY},
{"BAD_IDENTITY_INFO", SWITCH_CAUSE_BAD_IDENTITY_INFO},
{"UNSUPPORTED_CERTIFICATE", SWITCH_CAUSE_UNSUPPORTED_CERTIFICATE},
{"INVALID_IDENTITY", SWITCH_CAUSE_INVALID_IDENTITY},
{"STALE_DATE", SWITCH_CAUSE_STALE_DATE},
{NULL, 0}
};