Fix get_server_sccp_bind when a bindaddr is specified in the frontend it should return an array of array indexed by the 'bindaddr'
Signed-off-by: Diederik de Groot <dkgroot@talon.nl>
This commit is contained in:
parent
99aa4971c4
commit
95d0c80b8e
|
@ -1881,7 +1881,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO
|
||||||
*/
|
*/
|
||||||
function createDefaultSccpXml()
|
function createDefaultSccpXml()
|
||||||
{
|
{
|
||||||
|
$data_value = array();
|
||||||
foreach ($this->sccpvalues as $key => $value) {
|
foreach ($this->sccpvalues as $key => $value) {
|
||||||
$data_value[$key] = $value['data'];
|
$data_value[$key] = $value['data'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,9 @@ class xmlinterface
|
||||||
|
|
||||||
if (file_exists($xml_template)) {
|
if (file_exists($xml_template)) {
|
||||||
$xml_work = simplexml_load_file($xml_template);
|
$xml_work = simplexml_load_file($xml_template);
|
||||||
|
|
||||||
|
|
||||||
$xnode = &$xml_work->callManagerGroup->members;
|
$xnode = &$xml_work->callManagerGroup->members;
|
||||||
$bind_tmp = $this->get_server_sccp_bind($data_values);
|
$bind_tmp = $this->get_server_sccp_bind($data_values);
|
||||||
|
//error_log("bind_tmp:".print_r($bind_tmp, true), 0);
|
||||||
$ifc = 0;
|
$ifc = 0;
|
||||||
foreach ($bind_tmp as $bind_value) {
|
foreach ($bind_tmp as $bind_value) {
|
||||||
$xnode_obj = clone $xnode->member;
|
$xnode_obj = clone $xnode->member;
|
||||||
|
@ -381,7 +380,9 @@ class xmlinterface
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
if ($data_values['bindaddr'] !== '0.0.0.0') {
|
if ($data_values['bindaddr'] !== '0.0.0.0') {
|
||||||
return array('ip' => $data_values['bindaddr'], 'port' => $data_values['port']);
|
$rkey = $data_values['bindaddr'];
|
||||||
|
$res[$rkey] = array('ip' => $data_values['bindaddr'], 'port' => $data_values['port']);
|
||||||
|
return $res;
|
||||||
}
|
}
|
||||||
$ip_fill = true;
|
$ip_fill = true;
|
||||||
if (!empty($data_values['ccm_address'])) {
|
if (!empty($data_values['ccm_address'])) {
|
||||||
|
|
Loading…
Reference in a new issue