-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Done
-
Affects Version/s: 12
-
Fix Version/s: None
-
Component/s: Extension Settings
-
Labels:
-
Environment:
- Linux asterisk250 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
- Asterisk 13.4.0
- pjproject-2.4
*vmware image
-
ToDo:
-
Asterisk Version:13.4.0
-
Distro:Self Install CentOS 6.X
When adding a CHAN_PJSIP extension. when setting Enable DTLS to yes and Submit/Apply Config, not all DTLS parameters are reflected in pjsip.endpoint.conf. 2 params are missing, dtls_setup and dtls_rekey.
Adding them manually is no a permanent solution as they will get cleared as soon as we apply the config again. Please advice
parameters written when "Apply Config"
{{media_encryption=dtls
dtls_verify=fingerprint
dtls_cert_file=/etc/asterisk/keys/default.pem
dtls_ca_file=/etc/asterisk/keys/ca.crt}}
while it should be the below parameters (with sample values):
{{media_encryption=dtls
dtls_verify=fingerprint
dtls_cert_file=/etc/asterisk/keys/default.pem
dtls_ca_file=/etc/asterisk/keys/ca.crt
dtls_setup=actpass
dtls_rekey=0}}
[EDIT]
A workaround hat solves this issue can be done by adding 2 lines in the Certman class definition in order to complete the dtls key/value pairs:
NOTE: if you modified the file then freePBX will alert about this change, do it on your own risk unless you already know what you are doing. You will need the module to be re-signed (if this is possible). I am not that deep in FreePBX...
in the file $WEB_ROOT/admin/modules/certman/Certman.class.php:
case 'pjsip':
$this->FreePBX->PJSip->addEndpoint($device['id'], 'media_encryption', 'dtls');
$this->FreePBX->PJSip->addEndpoint($device['id'], 'dtls_verify', $device['verify']);
$this->FreePBX->PJSip->addEndpoint($device['id'], 'dtls_cert_file', $cert['files']['pem']);
$this->FreePBX->PJSip->addEndpoint($device['id'], 'dtls_ca_file', $ca['files']['crt']);
//Just Add these:
$this->FreePBX->PJSip->addEndpoint($device['id'], 'dtls_setup', $device['setup']);
$this->FreePBX->PJSip->addEndpoint($device['id'], 'dtls_rekey', $device['rekey']);
break;