Changeset 11366
- Timestamp:
- 02/13/11 16:32:26 (2 years ago)
- Files:
-
- freepbx/branches/2.9/libfreepbx.install.php (modified) (1 diff)
- modules/branches/2.9/core/functions.inc.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.9/libfreepbx.install.php
r11293 r11366 1658 1658 $freepbx_conf->define_conf_setting('BRAND_CSS_CUSTOM',$set); 1659 1659 1660 // 1661 // CATEGORY: Device Setting Defaults 1662 // 1663 $set['category'] = 'New Device Defaults'; 1664 $set['level'] = 0; 1665 1666 // ALWAYS_SHOW_DEVICE_DETAILS 1667 $set['value'] = false; 1668 $set['options'] = ''; 1669 $set['name'] = 'Show all Device Setting on Add'; 1670 $set['description'] = 'When adding a new extension/device, setting this to true will show most available device settings that are displayed when you edit the same extension/device. Otherwise, just a few basic settings are displayed.'; 1671 $set['readonly'] = 0; 1672 $set['type'] = CONF_TYPE_BOOL; 1673 $set['emptyok'] = 0; 1674 $set['sortorder'] = 10; 1675 $freepbx_conf->define_conf_setting('ALWAYS_SHOW_DEVICE_DETAILS',$set); 1676 1677 // DEVICE_SIP_CANREINVITE 1678 $set['value'] = 'yes'; 1679 $set['options'] = array('no', 'yes', 'nonat', 'update'); 1680 $set['name'] = 'SIP canrenivite (directmedia)'; 1681 $set['description'] = 'Default setting for SIP canreinvite (same as directmedia). See Asterisk documentation for details.'; 1682 $set['readonly'] = 0; 1683 $set['type'] = CONF_TYPE_SELECT; 1684 $set['emptyok'] = 0; 1685 $set['sortorder'] = 20; 1686 $freepbx_conf->define_conf_setting('DEVICE_SIP_CANREINVITE',$set); 1687 1688 // DEVICE_SIP_TRUSTRPID 1689 $set['value'] = 'yes'; 1690 $set['options'] = array('no', 'yes'); 1691 $set['name'] = 'SIP trustrpid'; 1692 $set['description'] = 'Default setting for SIP trustrpid. See Asterisk documentation for details.'; 1693 $set['readonly'] = 0; 1694 $set['type'] = CONF_TYPE_SELECT; 1695 $set['emptyok'] = 0; 1696 $set['sortorder'] = 30; 1697 $freepbx_conf->define_conf_setting('DEVICE_SIP_TRUSTRPID',$set); 1698 1699 // DEVICE_SIP_SENDRPID 1700 $set['value'] = 'no'; 1701 $set['options'] = array('no', 'yes', 'pai'); 1702 $set['name'] = 'SIP trustrpid'; 1703 $set['description'] = "Default setting for SIP sendrpid. A value of 'yes' is equivalent to 'rpid' and will send the 'Remote-Pary-ID' header. A value of 'pai' is only valid starting with Asterisk 1.8 and will send the 'P-Asserted-Identity' header. See Asterisk documentation for details."; 1704 $set['readonly'] = 0; 1705 $set['type'] = CONF_TYPE_SELECT; 1706 $set['emptyok'] = 0; 1707 $set['sortorder'] = 40; 1708 $freepbx_conf->define_conf_setting('DEVICE_SIP_SENDRPID',$set); 1709 1710 // DEVICE_SIP_NAT 1711 $set['value'] = 'yes'; 1712 $set['options'] = array('no', 'yes', 'never', 'route'); 1713 $set['name'] = 'SIP nat'; 1714 $set['description'] = "Default setting for SIP nat. A 'yes' will attempt to handle nat, also works for local (uses the network ports and address instead of the reported ports), 'no' follows the protocol, 'never' tries to block it, no RFC3581, 'route' ignores the rport information. See Asterisk documentation for details."; 1715 $set['readonly'] = 0; 1716 $set['type'] = CONF_TYPE_SELECT; 1717 $set['emptyok'] = 0; 1718 $set['sortorder'] = 50; 1719 $freepbx_conf->define_conf_setting('DEVICE_SIP_NAT',$set); 1720 1721 // DEVICE_SIP_ENCRYPTION 1722 $set['value'] = 'no'; 1723 $set['options'] = array('no', 'yes'); 1724 $set['name'] = 'SIP encryption'; 1725 $set['description'] = "Default setting for SIP encryption. Whether to offer SRTP encrypted media (and only SRTP encrypted media) on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if the peer does not support SRTP. See Asterisk documentation for details."; 1726 $set['readonly'] = 0; 1727 $set['type'] = CONF_TYPE_SELECT; 1728 $set['emptyok'] = 0; 1729 $set['sortorder'] = 60; 1730 $freepbx_conf->define_conf_setting('DEVICE_SIP_ENCRYPTION',$set); 1731 1732 // DEVICE_SIP_QUALIFYFREQ 1733 $set['value'] = 60; 1734 $set['options'] = array(15, 86400); 1735 $set['name'] = 'SIP qualifyfreq'; 1736 $set['description'] = "Default setting for SIP qualifyfreq. Only valid for Asterisk 1.6 and above. Frequency that 'qualify' OPTIONS messages will be sent to the device. Can help to keep NAT holes open but not dependable for remote client firewalls. See Asterisk documentation for details."; 1737 $set['readonly'] = 0; 1738 $set['type'] = CONF_TYPE_INT; 1739 $set['emptyok'] = 0; 1740 $set['sortorder'] = 70; 1741 $freepbx_conf->define_conf_setting('DEVICE_SIP_QUALIFYFREQ',$set); 1742 1743 // DEVICE_QUALIFY 1744 $set['value'] = 'yes'; 1745 $set['options'] = ''; 1746 $set['name'] = 'SIP and IAX qualify'; 1747 $set['description'] = "Default setting for SIP and IAX qualify. Whether to send periodic OPTIONS messages (for SIP) or otherwise monitor the channel, and at what point to consider the channel unavailable. A value of 'yes' is equivalent to 2000, time in msec. Can help to keep NAT holes open with SIP but not dependable for remote client firewalls. See Asterisk documentation for details."; 1748 $set['readonly'] = 0; 1749 $set['type'] = CONF_TYPE_TEXT; 1750 $set['emptyok'] = 0; 1751 $set['sortorder'] = 80; 1752 $freepbx_conf->define_conf_setting('DEVICE_QUALIFY',$set); 1753 1754 // DEVICE_DISALLOW 1755 $set['value'] = ''; 1756 $set['options'] = ''; 1757 $set['name'] = 'SIP and IAX disallow'; 1758 $set['description'] = "Default setting for SIP and IAX disallow (for codecs). Codecs to disallow, can help to reset from the general settings by setting a value of 'all' and then specifically including allowed codecs with the 'allow' directive. Values van be separated with '&' e.g. 'g729&g722'. See Asterisk documentation for details."; 1759 $set['readonly'] = 0; 1760 $set['type'] = CONF_TYPE_TEXT; 1761 $set['emptyok'] = 1; 1762 $set['sortorder'] = 90; 1763 $freepbx_conf->define_conf_setting('DEVICE_DISALLOW',$set); 1764 1765 // DEVICE_ALLOW 1766 $set['value'] = ''; 1767 $set['options'] = ''; 1768 $set['name'] = 'SIP and IAX allow'; 1769 $set['description'] = "Default setting for SIP and IAX allow (for codecs). Codecs to allow in addition to those set in general settings unless explicitly 'disallowed' for the device. Values van be separated with '&' e.g. 'ulaw&g729&g729' where the preference order is preserved. See Asterisk documentation for details."; 1770 $set['readonly'] = 0; 1771 $set['type'] = CONF_TYPE_TEXT; 1772 $set['emptyok'] = 1; 1773 $set['sortorder'] = 90; 1774 $freepbx_conf->define_conf_setting('DEVICE_ALLOW',$set); 1775 1776 // DEVICE_CALLGROUP 1777 $set['value'] = ''; 1778 $set['options'] = ''; 1779 $set['name'] = 'SIP & DAHDI callgroup'; 1780 $set['description'] = "Default setting for SIP, DAHDI (and Zap) callgroup. Callgroup(s) that the device is part of, can be one or more callgroups, e.g. '1,3-5' would be in groups 1,3,4,5. See Asterisk documentation for details."; 1781 $set['readonly'] = 0; 1782 $set['type'] = CONF_TYPE_TEXT; 1783 $set['emptyok'] = 1; 1784 $set['sortorder'] = 100; 1785 $freepbx_conf->define_conf_setting('DEVICE_CALLGROUP',$set); 1786 1787 // DEVICE_PICKUPGROUP 1788 $set['value'] = ''; 1789 $set['options'] = ''; 1790 $set['name'] = 'SIP & DAHDI pickupgroup'; 1791 $set['description'] = "Default setting for SIP, DAHDI (and Zap) pickupgroup. Pickupgroups(s) that the device can pickup calls from, can be one or more groups, e.g. '1,3-5' would be in groups 1,3,4,5. Device does not have to be in a group to be able to pickup calls from that group. See Asterisk documentation for details."; 1792 $set['readonly'] = 0; 1793 $set['type'] = CONF_TYPE_TEXT; 1794 $set['emptyok'] = 1; 1795 $set['sortorder'] = 110; 1796 $freepbx_conf->define_conf_setting('DEVICE_PICKUPGROUP',$set); 1660 1797 1661 1798 // The following settings are used in various modules prior to 2.9. If they are found in amportal.conf then we modules/branches/2.9/core/functions.inc.php
r11353 r11366 4080 4080 function core_devices_addsip($account) { 4081 4081 global $db; 4082 global $amp_conf; 4082 4083 4083 4084 $flag = 2; … … 4101 4102 $sipfields[] = array($account,'accountcode',$db->escapeSimple((isset($_REQUEST['accountcode']))?$_REQUEST['accountcode']:''),$flag++); 4102 4103 $sipfields[] =array($account,'secret',$db->escapeSimple((isset($_REQUEST['secret']))?$_REQUEST['secret']:''),$flag++); 4103 $sipfields[] = array($account,'canreinvite',$db->escapeSimple((isset($_REQUEST['canreinvite']))?$_REQUEST['canreinvite']: 'no'),$flag++);4104 $sipfields[] = array($account,'trustrpid',$db->escapeSimple((isset($_REQUEST['trustrpid']))?$_REQUEST['trustrpid']: 'no'),$flag++);4105 $sipfields[] = array($account,'sendrpid',$db->escapeSimple((isset($_REQUEST['sendrpid']))?$_REQUEST['sendrpid']: 'no'),$flag++);4104 $sipfields[] = array($account,'canreinvite',$db->escapeSimple((isset($_REQUEST['canreinvite']))?$_REQUEST['canreinvite']:$amp_conf['DEVICE_SIP_CANREINVITE']),$flag++); 4105 $sipfields[] = array($account,'trustrpid',$db->escapeSimple((isset($_REQUEST['trustrpid']))?$_REQUEST['trustrpid']:$amp_conf['DEVICE_SIP_TRUSTRPID']),$flag++); 4106 $sipfields[] = array($account,'sendrpid',$db->escapeSimple((isset($_REQUEST['sendrpid']))?$_REQUEST['sendrpid']:$amp_conf['DEVICE_SIP_SENDRPID']),$flag++); 4106 4107 $sipfields[] = array($account,'context',$db->escapeSimple((isset($_REQUEST['context']))?$_REQUEST['context']:'from-internal'),$flag++); 4107 4108 $sipfields[] = array($account,'dtmfmode',$db->escapeSimple((isset($_REQUEST['dtmfmode']))?$_REQUEST['dtmfmode']:''),$flag++); … … 4110 4111 $sipfields[] = array($account,'mailbox',$db->escapeSimple((isset($_REQUEST['mailbox']) && !empty($_REQUEST['mailbox']))?$_REQUEST['mailbox']:$account.'@device'),$flag++); 4111 4112 $sipfields[] = array($account,'username',$db->escapeSimple((isset($_REQUEST['username']))?$_REQUEST['username']:$account),$flag++); 4112 $sipfields[] = array($account,'nat',$db->escapeSimple((isset($_REQUEST['nat']))?$_REQUEST['nat']: 'yes'),$flag++);4113 $sipfields[] = array($account,'nat',$db->escapeSimple((isset($_REQUEST['nat']))?$_REQUEST['nat']:),$flag++); 4113 4114 $sipfields[] = array($account,'port',$db->escapeSimple((isset($_REQUEST['port']))?$_REQUEST['port']:'5060'),$flag++); 4114 $sipfields[] = array($account,'qualify',$db->escapeSimple((isset($_REQUEST['qualify']))?$_REQUEST['qualify']: 'yes'),$flag++);4115 $sipfields[] = array($account,'qualify',$db->escapeSimple((isset($_REQUEST['qualify']))?$_REQUEST['qualify']:$amp_conf['DEVICE_QUALIFY']),$flag++); 4115 4116 if (version_compare($amp_conf['ASTVERSION'],'1.6','ge')) { 4116 $sipfields[] = array($account,'qualifyfreq',$db->escapeSimple((isset($_REQUEST['qualifyfreq']))?$_REQUEST['qualifyfreq']: '60'),$flag++);4117 $sipfields[] = array($account,'qualifyfreq',$db->escapeSimple((isset($_REQUEST['qualifyfreq']))?$_REQUEST['qualifyfreq']:$amp_conf['DEVICE_SIP_QUALIFYFREQ']),$flag++); 4117 4118 } 4118 4119 if (version_compare($amp_conf['ASTVERSION'],'1.8','ge')) { 4119 4120 $sipfields[] = array($account,'transport',$db->escapeSimple((isset($_REQUEST['transport']))?$_REQUEST['transport']:'udp'),$flag++); 4120 $sipfields[] = array($account,'encryption',$db->escapeSimple((isset($_REQUEST['encryption']))?$_REQUEST['encryption']: 'no'),$flag++);4121 $sipfields[] = array($account,'encryption',$db->escapeSimple((isset($_REQUEST['encryption']))?$_REQUEST['encryption']:$amp_conf['DEVICE_SIP_ENCRYPTION']),$flag++); 4121 4122 } 4122 $sipfields[] = array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']: ''),$flag++);4123 $sipfields[] = array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']: ''),$flag++);4123 $sipfields[] = array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']:$amp_conf['DEVICE_CALLGROUP']),$flag++); 4124 $sipfields[] = array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']:$amp_conf['DEVICE_PICKUPGROUP']),$flag++); 4124 4125 $sipfields[] = array($account,'deny',$db->escapeSimple((isset($_REQUEST['deny']))?$_REQUEST['deny']:''),$flag++); 4125 4126 $sipfields[] = array($account,'permit',$db->escapeSimple((isset($_REQUEST['permit']))?$_REQUEST['permit']:''),$flag++); 4126 $sipfields[] = array($account,'disallow',$db->escapeSimple((isset($_REQUEST['disallow']))?$_REQUEST['disallow']: ''),$flag++);4127 $sipfields[] = array($account,'allow',$db->escapeSimple((isset($_REQUEST['allow']))?$_REQUEST['allow']: ''),$flag++);4127 $sipfields[] = array($account,'disallow',$db->escapeSimple((isset($_REQUEST['disallow']))?$_REQUEST['disallow']:$amp_conf['DEVICE_DISALLOW']),$flag++); 4128 $sipfields[] = array($account,'allow',$db->escapeSimple((isset($_REQUEST['allow']))?$_REQUEST['allow']:$amp_conf['DEVICE_ALLOW']),$flag++); 4128 4129 4129 4130 $vmexten = isset($_REQUEST['vmexten'])?$db->escapeSimple(trim($_REQUEST['vmexten'])):''; … … 4173 4174 function core_devices_addiax2($account) { 4174 4175 global $db; 4176 global $amp_conf; 4175 4177 4176 4178 $flag = 2; … … 4198 4200 array($account,'username',$db->escapeSimple(($_REQUEST['username'])?$_REQUEST['username']:$account),$flag++), 4199 4201 array($account,'port',$db->escapeSimple(($_REQUEST['port'])?$_REQUEST['port']:'4569'),$flag++), 4200 array($account,'qualify',$db->escapeSimple(($_REQUEST['qualify'])?$_REQUEST['qualify']: 'yes'),$flag++),4202 array($account,'qualify',$db->escapeSimple(($_REQUEST['qualify'])?$_REQUEST['qualify']:$amp_conf['DEVICE_QUALIFY']),$flag++), 4201 4203 array($account,'deny',$db->escapeSimple((isset($_REQUEST['deny']))?$_REQUEST['deny']:''),$flag++), 4202 4204 array($account,'permit',$db->escapeSimple((isset($_REQUEST['permit']))?$_REQUEST['permit']:''),$flag++), 4203 array($account,'disallow',$db->escapeSimple(($_REQUEST['disallow'])?$_REQUEST['disallow']: ''),$flag++),4204 array($account,'allow',$db->escapeSimple(($_REQUEST['allow'])?$_REQUEST['allow']: ''),$flag++),4205 array($account,'disallow',$db->escapeSimple(($_REQUEST['disallow'])?$_REQUEST['disallow']:$amp_conf['DEVICE_DISALLOW']),$flag++), 4206 array($account,'allow',$db->escapeSimple(($_REQUEST['allow'])?$_REQUEST['allow']:$amp_conf['DEVICE_ALLOW']),$flag++), 4205 4207 array($account,'accountcode',$db->escapeSimple(($_REQUEST['accountcode'])?$_REQUEST['accountcode']:''),$flag++), 4206 4208 array($account,'requirecalltoken',$db->escapeSimple(($_REQUEST['requirecalltoken'])?$_REQUEST['requirecalltoken']:''),$flag++) … … 4252 4254 function core_devices_addzap($account) { 4253 4255 global $db; 4256 global $amp_conf; 4254 4257 4255 4258 foreach ($_REQUEST as $req=>$data) { … … 4281 4284 array($account,'callprogress',$db->escapeSimple(($_REQUEST['callprogress'])?$_REQUEST['callprogress']:'no')), 4282 4285 array($account,'accountcode',$db->escapeSimple((isset($_REQUEST['accountcode']))?$_REQUEST['accountcode']:'')), 4283 array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']: '')),4284 array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']: '')),4286 array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']:$amp_conf['DEVICE_CALLGROUP'])), 4287 array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']:$amp_conf['DEVICE_PICKUPGROUP'])), 4285 4288 array($account,'channel',$db->escapeSimple(($_REQUEST['channel'])?$_REQUEST['channel']:'')) 4286 4289 ); … … 4304 4307 function core_devices_adddahdi($account) { 4305 4308 global $db; 4309 global $amp_conf; 4306 4310 4307 4311 foreach ($_REQUEST as $req=>$data) { … … 4333 4337 array($account,'callprogress',$db->escapeSimple(($_REQUEST['callprogress'])?$_REQUEST['callprogress']:'no')), 4334 4338 array($account,'accountcode',$db->escapeSimple((isset($_REQUEST['accountcode']))?$_REQUEST['accountcode']:'')), 4335 array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']: '')),4336 array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']: '')),4339 array($account,'callgroup',$db->escapeSimple((isset($_REQUEST['callgroup']))?$_REQUEST['callgroup']:$amp_conf['DEVICE_CALLGROUP'])), 4340 array($account,'pickupgroup',$db->escapeSimple((isset($_REQUEST['pickupgroup']))?$_REQUEST['pickupgroup']:$amp_conf['DEVICE_PICKUPGROUP'])), 4337 4341 array($account,'channel',$db->escapeSimple(($_REQUEST['channel'])?$_REQUEST['channel']:'')) 4338 4342 ); … … 6435 6439 $tmparr['accountcode'] = array('value' => '', 'tt' => $tt, 'level' => 1); 6436 6440 $tt = _("Callgroup(s) that this device is part of, can be one or more callgroups, e.g. '1,3-5' would be in groups 1,3,4,5."); 6437 $tmparr['callgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6441 $tmparr['callgroup'] = array('value' => $amp_conf['DEVICE_CALLGROUP'], 'tt' => $tt, 'level' => 1); 6438 6442 $tt = _("Pickupgroups(s) that this device can pickup calls from, can be one or more groups, e.g. '1,3-5' would be in groups 1,3,4,5. Device does not have to be in a group to be able to pickup calls from that group."); 6439 $tmparr['pickupgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6443 $tmparr['pickupgroup'] = array('value' => $amp_conf['DEVICE_PICKUPGROUP'], 'tt' => $tt, 'level' => 1); 6440 6444 $tt = _("Mailbox for this device. This should not be changed unless you know what you are doing."); 6441 6445 $tmparr['mailbox'] = array('value' => '', 'tt' => $tt, 'level' => 2); … … 6491 6495 $tmparr['accountcode'] = array('value' => '', 'tt' => $tt, 'level' => 1); 6492 6496 $tt = _("Callgroup(s) that this device is part of, can be one or more callgroups, e.g. '1,3-5' would be in groups 1,3,4,5."); 6493 $tmparr['callgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6497 $tmparr['callgroup'] = array('value' => $amp_conf['DEVICE_CALLGROUP'], 'tt' => $tt, 'level' => 1); 6494 6498 $tt = _("Pickupgroups(s) that this device can pickup calls from, can be one or more groups, e.g. '1,3-5' would be in groups 1,3,4,5. Device does not have to be in a group to be able to pickup calls from that group."); 6495 $tmparr['pickupgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6499 $tmparr['pickupgroup'] = array('value' => $amp_conf['DEVICE_PICKUPGROUP'], 'tt' => $tt, 'level' => 1); 6496 6500 $tt = _("Mailbox for this device. This should not be changed unless you know what you are doing."); 6497 6501 $tmparr['mailbox'] = array('value' => '', 'tt' => $tt, 'level' => 2); … … 6528 6532 $tmparr['port'] = array('value' => '4569', 'tt' => $tt, 'level' => 1); 6529 6533 $tt = _("Setting to yes (equivalent to 2000 msec) will send an OPTIONS packet to the endpoint periodically (default every minute). Used to monitor the health of the endpoint. If delays are longer then the qualify time, the endpoint will be taken offline and conisdered unreachable. Can be set to a value which is the msec threshhold. Setting to no will turn this off. Can also be helpful to keep NAT pinholes open."); 6530 $tmparr['qualify'] = array('value' => 'yes', 'tt' => $tt, 'level' => 1);6534 $tmparr['qualify'] = array('value' => $amp_conf['DEVICE_QUALIFY'], 'tt' => $tt, 'level' => 1); 6531 6535 $tt = _("Disallowed codecs. Set this to all to remove all codecs defined in the general settings and then specify specific codecs separated by '&' on the 'allow' setting, or just disallow specific codecs separated by '&'."); 6532 $tmparr['disallow'] = array('value' => '', 'tt' => $tt, 'level' => 1);6536 $tmparr['disallow'] = array('value' => $amp_conf['DEVICE_DISALLOW'], 'tt' => $tt, 'level' => 1); 6533 6537 $tt = _("Allow specific codecs, separated by the '&' sign and in priority order. E.g. 'ulaw&g729'. Codecs allowed in the general settings will also be allowed unless removed with the 'disallow' directive."); 6534 $tmparr['allow'] = array('value' => '', 'tt' => $tt, 'level' => 1);6538 $tmparr['allow'] = array('value' => $amp_conf['DEVICE_ALLOW'], 'tt' => $tt, 'level' => 1); 6535 6539 $tt = _("How to dial this device, this should not be changed unless you know what you are doing."); 6536 6540 $tmparr['dial'] = array('value' => '', 'tt' => $tt, 'level' => 2); … … 6568 6572 $tt = _("The DTMF signalling mode used by this device, usually rfc2833 for most phones."); 6569 6573 $tmparr['dtmfmode'] = array('value' => 'rfc2833', 'tt' => $tt, 'select' => $select, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidDTMFMODE ); 6574 // $amp_conf['DEVICE_SIP_CANREINVITE'] 6575 // $amp_conf['DEVICE_SIP_TRUSTRPID'] 6576 // $amp_conf['DEVICE_SIP_SENDRPID'] 6577 // $amp_conf['DEVICE_SIP_NAT'] 6578 // $amp_conf['DEVICE_SIP_ENCRYPTION'] 6579 // $amp_conf['DEVICE_SIP_QUALIFYFREQ'] 6580 // $amp_conf['DEVICE_QUALIFY'] 6581 // $amp_conf['DEVICE_DISALLOW'] 6582 // $amp_conf['DEVICE_ALLOW'] 6583 // $amp_conf['DEVICE_CALLGROUP'] 6584 // $amp_conf['DEVICE_PICKUPGROUP'] 6570 6585 6571 6586 unset($select); … … 6575 6590 $select[] = array('value' => 'nonat', 'text' => 'nonat'); 6576 6591 $select[] = array('value' => 'update', 'text' => 'update'); 6577 $tmparr['canreinvite'] = array('value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);6592 $tmparr['canreinvite'] = array('value' => $amp_conf['DEVICE_SIP_CANREINVITE'], 'tt' => $tt, 'select' => $select, 'level' => 1); 6578 6593 6579 6594 $tt = _("Asterisk context this device will send calls to. Only change this is you know what you are doing."); … … 6587 6602 $select[] = array('value' => 'yes', 'text' => _('Yes')); 6588 6603 $tt = _("Whether Asterisk should trust the RPID settings from this device. Usually should be yes for CONNECTEDLINE() functionality to work if supported by the endpoint."); 6589 $tmparr['trustrpid'] = array('value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);6604 $tmparr['trustrpid'] = array('value' => $amp_conf['DEVICE_SIP_TRUSTRPID'], 'tt' => $tt, 'select' => $select, 'level' => 1); 6590 6605 6591 6606 unset($select); … … 6597 6612 } 6598 6613 $tt = _("Whether Asterisk should send RPID (or PAI) info to the device. Usually should be enabled to the settings used by your device for CONNECTEDLINE() functionality to work if supported by the endpoint."); 6599 $tmparr['sendrpid'] = array('value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);6614 $tmparr['sendrpid'] = array('value' => $amp_conf['DEVICE_SIP_SENDRPID'], 'tt' => $tt, 'select' => $select, 'level' => 1); 6600 6615 6601 6616 unset($select); … … 6612 6627 $select[] = array('value' => 'route', 'text' => _('route - NAT no rport')); 6613 6628 $tt = _("NAT setting, see Asterisk documentation for details. Yes usually works for both internal and external devices. Set to No if the device will always be internal."); 6614 $tmparr['nat'] = array('value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1);6629 $tmparr['nat'] = array('value' => $amp_conf['DEVICE_SIP_NAT'], 'tt' => $tt, 'select' => $select, 'level' => 1); 6615 6630 6616 6631 $tt = _("Endpoint port number to use, usually 5060. Some 2 ports devices such as ATA may used 5061 for the second port."); 6617 6632 $tmparr['port'] = array('value' => '5060', 'tt' => $tt, 'level' => 1); 6618 6633 $tt = _("Setting to yes (equivalent to 2000 msec) will send an OPTIONS packet to the endpoint periodically (default every minute). Used to monitor the health of the endpoint. If delays are longer then the qualify time, the endpoint will be taken offline and conisdered unreachable. Can be set to a value which is the msec threshhold. Setting to no will turn this off. Can also be helpful to keep NAT pinholes open."); 6619 $tmparr['qualify'] = array('value' => 'yes', 'tt' => $tt, 'level' => 1);6634 $tmparr['qualify'] = array('value' => $amp_conf['DEVICE_QUALIFY'], 'tt' => $tt, 'level' => 1); 6620 6635 if (version_compare($amp_conf['ASTVERSION'],'1.6','ge')) { 6621 6636 $tt = _("Frequency in seconds to send qualify messages to the endpoint."); 6622 $tmparr['qualifyfreq'] = array('value' => '60', 'tt' => $tt, 'level' => 1);6637 $tmparr['qualifyfreq'] = array('value' => $amp_conf['DEVICE_SIP_QUALIFYFREQ'], 'tt' => $tt, 'level' => 1); 6623 6638 } 6624 6639 if (version_compare($amp_conf['ASTVERSION'],'1.8','ge')) { … … 6633 6648 $select[] = array('value' => 'yes', 'text' => _('Yes')); 6634 6649 $tt = _("Whether to offer SRTP encrypted media (and only SRTP encrypted media) on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if the peer does not support SRTP. Defaults to no."); 6635 $tmparr['encryption'] = array('value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);6650 $tmparr['encryption'] = array('value' => $amp_conf['DEVICE_SIP_ENCRYPTION'], 'tt' => $tt, 'select' => $select, 'level' => 1); 6636 6651 } 6637 6652 6638 6653 $tt = _("Callgroup(s) that this device is part of, can be one or more callgroups, e.g. '1,3-5' would be in groups 1,3,4,5."); 6639 $tmparr['callgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6654 $tmparr['callgroup'] = array('value' => $amp_conf['DEVICE_CALLGROUP'], 'tt' => $tt, 'level' => 1); 6640 6655 $tt = _("Pickupgroups(s) that this device can pickup calls from, can be one or more groups, e.g. '1,3-5' would be in groups 1,3,4,5. Device does not have to be in a group to be able to pickup calls from that group."); 6641 $tmparr['pickupgroup'] = array('value' => '', 'tt' => $tt, 'level' => 1);6656 $tmparr['pickupgroup'] = array('value' => $amp_conf['DEVICE_PICKUPGROUP'], 'tt' => $tt, 'level' => 1); 6642 6657 $tt = _("Disallowed codecs. Set this to all to remove all codecs defined in the general settings and then specify specific codecs separated by '&' on the 'allow' setting, or just disallow specific codecs separated by '&'."); 6643 $tmparr['disallow'] = array('value' => '', 'tt' => $tt, 'level' => 1);6658 $tmparr['disallow'] = array('value' => $amp_conf['DEVICE_DISALLOW'], 'tt' => $tt, 'level' => 1); 6644 6659 $tt = _("Allow specific codecs, separated by the '&' sign and in priority order. E.g. 'ulaw&g729'. Codecs allowed in the general settings will also be allowed unless removed with the 'disallow' directive."); 6645 $tmparr['allow'] = array('value' => '', 'tt' => $tt, 'level' => 1);6660 $tmparr['allow'] = array('value' => $amp_conf['DEVICE_ALLOW'], 'tt' => $tt, 'level' => 1); 6646 6661 $tt = _("How to dial this device, this should not be changed unless you know what you are doing."); 6647 6662 $tmparr['dial'] = array('value' => '', 'tt' => $tt, 'level' => 2);
