This is an experimental implementation of STIR/SHAKEN in Kazoo using SecSIPIdX as a NIF to process identity headers.
- Testing is needed, especially regarding:
- Anonymous calls (i.e., privacy settings in Kazoo)
- International calls
- Emergency services (911/933)
- Special services (411/811/899/etc)
- Check number database to properly determine attestation level
- Add support for inbound call verification
- Add support for resellers (check account DB for private key)
- There is a known bug in FreeSWITCH that creates duplicate
Identityheaders.
- Certificates from an approved STI-CA
- Somewhere to host your public key
- Go (required to build SecSIPIdX)
git clone https://github.com/openkazoo/martiniIn stepswitch_outbound.erl, update handle_req:
-spec handle_req(kz_json:object(), kz_term:proplist()) -> any().
handle_req(OffnetJObj, _Props) ->
'true' = kapi_offnet_resource:req_v(OffnetJObj),
OffnetReq = kapi_offnet_resource:jobj_to_req(OffnetJObj),
_ = kapi_offnet_resource:put_callid(OffnetReq),
NewOffnetReq = martini:maybe_add_identity_header(OffnetJObj),
case kapi_offnet_resource:resource_type(NewOffnetReq) of
?RESOURCE_TYPE_AUDIO -> handle_audio_req(NewOffnetReq);
?RESOURCE_TYPE_ORIGINATE -> handle_originate_req(NewOffnetReq)
end.- Build and install Kazoo as usual
The martini config is stored in CouchDB under system_config/martini:
"default": {
"enabled": true,
"public_key_url": "https://domain.com/public_key.pem",
"private_key_pem": "-----BEGIN EC PRIVATE KEY-----\n{YOUR_PRIVATE_KEY}\n-----END EC PRIVATE KEY-----"
}- Modify the config
- Ensure
public_key_urlis accessible to the public - Ensure
private_key_pemhas newlines, as appropriate
- Ensure
- Run
sup kazoo_data_maintenance flush_docs