diff --git a/freeswitch/fs/lib/astpp.xml.php b/freeswitch/fs/lib/astpp.xml.php index 1ac4fad7c..49f78cb11 100755 --- a/freeswitch/fs/lib/astpp.xml.php +++ b/freeswitch/fs/lib/astpp.xml.php @@ -36,6 +36,7 @@ function xml_not_found() { } // Build acl xml +// ASTPPCOM-1321 Ashish start function load_acl($logger, $db, $config) { $xml = "\n"; $xml .= "\n"; @@ -60,55 +61,6 @@ function load_acl($logger, $db, $config) { $xml .= " \n"; } - // For gateways -/* $query = "SELECT * FROM gateways WHERE status=0"; - $logger->log ( "Sofia Gateway Query : " . $query ); - $sp_gw = $db->run ( $query ); - $logger->log ( $sp_gw ); - - foreach ( $sp_gw as $sp_gw_key => $sp_gw_value ) { - - $sp_gw_settings = json_decode ( $sp_gw_value ['gateway_data'], true ); - foreach ( $sp_gw_settings as $sp_gw_settings_key => $sp_gw_settings_value ) { - if ($sp_gw_settings_value != "" && $sp_gw_settings_key == "proxy") { - $tmp_ip_arr = explode ( ":", $sp_gw_settings_value ); - if (filter_var($tmp_ip_arr [0], FILTER_VALIDATE_IP) || preg_match("/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/", $tmp_ip_arr [0])) { - if(preg_match("/[a-zA-Z\-]/i", $tmp_ip_arr [0])){ - $ips = gethostbynamel($tmp_ip_arr [0]); - foreach ($ips as $ip => $value){ - $tmp_ip_arr [0] = $value; - } - } - $xml .= " \n"; - } - } - } - }*/ - - // For opensips - if ($config ['opensips'] == '0') { - if(preg_match("/[a-zA-Z\-]/i", $config ['opensips_domain'])){ - $ips = gethostbynamel($config ['opensips_domain']); - foreach ($ips as $ip => $value){ - $config ['opensips_domain'] = $value; - } - } - $xml .= "\n"; - $xml .= " \n"; - // For loopback - $xml .= "\n"; - $xml .= "\n"; - $xml .= "\n"; - // For event handing - $xml .= "\n"; - $xml .= "\n"; - } - else{ - $xml .= " \n"; - // For event handing - $xml .= "\n"; - } - $xml .= "\n"; $xml .= "\n"; $xml .= " \n"; @@ -118,6 +70,7 @@ function load_acl($logger, $db, $config) { $logger->log ( $xml ); return $xml; } +// ASTPPCOM-1321 Ashish end // Build sofia xml function load_sofia($logger, $db, $config) { diff --git a/web_interface/astpp/application/libraries/astpp/common.php b/web_interface/astpp/application/libraries/astpp/common.php index e672ead8d..d22114c88 100755 --- a/web_interface/astpp/application/libraries/astpp/common.php +++ b/web_interface/astpp/application/libraries/astpp/common.php @@ -2016,7 +2016,9 @@ function get_timezone_offset() { return $gmtoffset; } function sip_profile_date() { - $defualt_profile_data = '{"rtp-ip":"$${local_ip_v4}","dialplan":"XML","user-agent-string":"ASTPP","debug":"0","sip-trace":"no","tls":"false","inbound-reg-force-matching-username":"true","disable-transcoding":"true","all-reg-options-ping":"false","unregister-on-options-fail":"true","log-auth-failures":"true","status":"0","inbound-bypass-media":"false","inbound-proxy-media":"false","disable-transfer":"true","enable-100rel":"false","rtp-timeout-sec":"60","dtmf-duration":"2000","manual-redirect":"false","aggressive-nat-detection":"false","enable-timer":"false","minimum-session-expires":"120","session-timeout-pt":"1800","auth-calls":"true","apply-inbound-acl":"default","inbound-codec-prefs":"PCMU,PCMA,G729","outbound-codec-prefs":"PCMU,PCMA,G729","inbound-late-negotiation":"false"}'; + // ASTPPCOM-1321 Ashish start + $defualt_profile_data = '{"rtp-ip":"$${local_ip_v4}","dialplan":"XML","user-agent-string":"ASTPP","debug":"0","sip-trace":"no","tls":"false","inbound-reg-force-matching-username":"true","disable-transcoding":"true","all-reg-options-ping":"false","unregister-on-options-fail":"true","log-auth-failures":"true","status":"0","inbound-bypass-media":"false","inbound-proxy-media":"false","disable-transfer":"true","enable-100rel":"false","rtp-timeout-sec":"60","dtmf-duration":"2000","manual-redirect":"false","aggressive-nat-detection":"true","enable-timer":"false","minimum-session-expires":"120","session-timeout-pt":"1800","auth-calls":"true","apply-inbound-acl":"default","inbound-codec-prefs":"PCMU,PCMA,G729","outbound-codec-prefs":"PCMU,PCMA,G729","inbound-late-negotiation":"false","ext-rtp-ip":"$${local_ip_v4}","ext-sip-ip":"$${local_ip_v4}","sip-capture":"no","rtp-timer-name":"soft","rtp-hold-timeout-sec":"1800","rfc2833-pt":"101","presence-privacy":"$${presence_privacy}","presence-hosts":"$${domain},$${local_ip_v4}","pass-callee-id":"false","nonce-ttl":"60","manage-presence":"true","inbound-codec-negotiation":"generous","hold-music":"$${hold_music}","forward-unsolicited-mwi-notify":"false","dtmf_type":"rfc2833","context":"default","challenge-realm":"auto_from","auth-all-packets":"false"}'; + // ASTPPCOM-1321 Ashish end return $defualt_profile_data; } function set_refill_coupon_status($select = '', $table = '', $status = '') {