Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function processQuickCreate($tech, $extension, $data) {
$settings['callerid']['value'] = isset($data['callerid']) ? $data['callerid'] : '' ;

if($tech == "pjsip"){
$settings['dtmfmode']['value'] = isset($data['dtmfmode']) ? $data['dtmfmode'] : "rfc4733";
$settings['dtmfmode']['value'] = isset($data['dtmfmode']) ? $data['dtmfmode'] : $settings['dtmfmode']['value'];
$settings['defaultuser']['value'] = isset($data['defaultuser']) ? $data['defaultuser'] : "";
$settings['trustrpid']['value'] = isset($data['trustrpid']) ? $data['trustrpid'] : "yes";
$settings['send_connected_line']['value'] = isset($data['send_connected_line']) ? $data['send_connected_line'] : "yes";
Expand Down
3 changes: 2 additions & 1 deletion functions.inc/drivers/Sip.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $prim
$select[] = array('value' => 'info', 'text' => _('SIP INFO (application/dtmf-relay)'));
$select[] = array('value' => 'inband', 'text' => _('In band audio (Not recommended)'));
$tt = _("The DTMF signaling mode used by this device, usually RFC for most phones.").' [dtmfmode]';
$tmparr['dtmfmode'] = array('prompttext' => _('DTMF Signaling'), 'value' => 'rfc2833', 'tt' => $tt, 'select' => $select, 'level' => 0);
$DEVICE_SIP_DTMF = $this->freepbx->Config->get_conf_setting('DEVICE_SIP_DTMF');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should check for a false return and use a default value if needed, e.g. get_conf_setting('DEVICE_SIP_DTMF') ?: 'rfc2833'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed !

$tmparr['dtmfmode'] = array('prompttext' => _('DTMF Signaling'), 'value' => $DEVICE_SIP_DTMF, 'tt' => $tt, 'select' => $select, 'level' => 0);

unset($select);
$tt = _("Re-Invite policy for this device, see Asterisk documentation for details.").' [canreinvite]';
Expand Down