Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-9574

not all of DTLS parameters are written to pjsip.endpoin.conf

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 12
    • Fix Version/s: None
    • Component/s: Extension Settings
    • 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

      Description

      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;

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tm1000 Andrew Nagy
                Reporter:
                sleem Sleem
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.