From a11fb612618cf15182514ad35641a57f12966aea Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 27 Feb 2013 15:35:42 -0500 Subject: Fix wording for VoIP address option in the shaper. Add rule going the other direction to catch connections initiated both ways. --- usr/local/www/wizards/traffic_shaper_wizard.inc | 24 ++++++++++++++++------ usr/local/www/wizards/traffic_shaper_wizard.xml | 4 ++-- .../wizards/traffic_shaper_wizard_dedicated.inc | 23 ++++++++++++++++----- .../wizards/traffic_shaper_wizard_dedicated.xml | 4 ++-- .../wizards/traffic_shaper_wizard_multi_all.inc | 23 ++++++++++++++++----- .../wizards/traffic_shaper_wizard_multi_all.xml | 4 ++-- .../wizards/traffic_shaper_wizard_multi_lan.inc | 17 +++++++++++++-- .../wizards/traffic_shaper_wizard_multi_lan.xml | 4 ++-- 8 files changed, 77 insertions(+), 26 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc index a77ba09..d13a5a7 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard.inc @@ -332,10 +332,10 @@ function step3_stepbeforeformdisplay() { $voipfields[] = $field; $field = array(); - $field['name'] = "Address"; - $enablefields[] = "Address"; + $field['name'] = "Upstream SIP Server"; + $enablefields[] = "Upstream SIP Server"; $field['type'] = "inputalias"; - $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location."; + $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the remote PBX or SIP Trunk to prioritize.
NOTE: You can also use a Firewall Alias in this location."; $field['message'] = "IP Address field is non-blank and doesn't look like an IP address."; $field['bindstofield'] = "ezshaper->step3->address"; $voipfields[] = $field; @@ -1359,9 +1359,9 @@ function apply_all_choosen_items() { if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) { /* create VOIP rules */ $rule = array(); - $rule['type'] = "match"; + $rule['type'] = "match"; //$rule['interface'] = $interfacelist; - $rule['descr'] = gettext("VOIP Adapter"); + $rule['descr'] = gettext("Connections From Upstream SIP Server"); $rule['protocol'] = "udp"; $rule['defaultqueue'] = "qVoIP"; $rule['source']['address'] = $config['ezshaper']['step3']['address']; @@ -1370,7 +1370,19 @@ function apply_all_choosen_items() { $rule['wizard'] = "yes"; $rule['enabled'] = "on"; $config['filter']['rule'][] = $rule; - + + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $config['filter']['rule'][] = $rule; } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { /* create VOIP rules */ $rule = array(); diff --git a/usr/local/www/wizards/traffic_shaper_wizard.xml b/usr/local/www/wizards/traffic_shaper_wizard.xml index 4c2f2a3..c2250cf 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.xml +++ b/usr/local/www/wizards/traffic_shaper_wizard.xml @@ -115,9 +115,9 @@ - Address + Upstream SIP Server inputalias - (Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location. + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. ezshaper->step3->address IP Address field is non-blank and doesn't look like an IP address. diff --git a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc index c721b02..2cc43e2 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc @@ -357,10 +357,10 @@ function step3_stepbeforeformdisplay() { $voipfields[] = $field; $field = array(); - $field['name'] = "Address"; - $enablefields[] = "Address"; + $field['name'] = "Upstream SIP Server"; + $enablefields[] = "Upstream SIP Server"; $field['type'] = "inputalias"; - $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location."; + $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the remote PBX or SIP Trunk to prioritize.
NOTE: You can also use a Firewall Alias in this location."; $field['message'] = "IP Address field is non-blank and doesn't look like an IP address."; $field['bindstofield'] = "ezshaper->step3->address"; $voipfields[] = $field; @@ -1423,8 +1423,8 @@ function apply_all_choosen_items() { /* create VOIP rules */ $rule = array(); $rule['type'] = "match"; - //$rule['interface'] = $interfacelist; - $rule['descr'] = gettext("VOIP Adapter"); + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections From Upstream SIP Server"); $rule['protocol'] = "udp"; $rule['defaultqueue'] = "qVoIP"; $rule['source']['address'] = $config['ezshaper']['step3']['address']; @@ -1434,6 +1434,19 @@ function apply_all_choosen_items() { $rule['enabled'] = "on"; $config['filter']['rule'][] = $rule; + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $config['filter']['rule'][] = $rule; + } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { /* create VOIP rules */ $rule = array(); diff --git a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml index ecdb508..8c74094 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml +++ b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml @@ -120,9 +120,9 @@ - Address + Upstream SIP Server inputalias - (Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location. + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. ezshaper->step3->address IP Address field is non-blank and doesn't look like an IP address. diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc index 42f6ddb..707463d 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -379,10 +379,10 @@ function step3_stepbeforeformdisplay() { $voipfields[] = $field; $field = array(); - $field['name'] = "Address"; - $enablefields[] = "Address"; + $field['name'] = "Upstream SIP Server"; + $enablefields[] = "Upstream SIP Server"; $field['type'] = "inputalias"; - $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location."; + $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the remote PBX or SIP Trunk to prioritize.
NOTE: You can also use a Firewall Alias in this location."; $field['message'] = "IP Address field is non-blank and doesn't look like an IP address."; $field['bindstofield'] = "ezshaper->step3->address"; $voipfields[] = $field; @@ -1480,8 +1480,8 @@ function apply_all_choosen_items() { /* create VOIP rules */ $rule = array(); $rule['type'] = "match"; - //$rule['interface'] = $interfacelist; - $rule['descr'] = gettext("VOIP Adapter"); + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections From Upstream SIP Server"); $rule['protocol'] = "udp"; $rule['defaultqueue'] = "qVoIP"; $rule['source']['address'] = $config['ezshaper']['step3']['address']; @@ -1490,6 +1490,19 @@ function apply_all_choosen_items() { $rule['wizard'] = "yes"; $rule['enabled'] = "on"; $config['filter']['rule'][] = $rule; + + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $config['filter']['rule'][] = $rule; } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { /* create VOIP rules */ diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml index 050f493..bb5be7d 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml @@ -128,9 +128,9 @@ - Address + Upstream SIP Server inputalias - (Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location. + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. ezshaper->step3->address IP Address field is non-blank and doesn't look like an IP address. diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc index bde56bb..95a4d94 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc @@ -1221,8 +1221,8 @@ function apply_all_choosen_items() { /* create VOIP rules */ $rule = array(); $rule['type'] = "match"; - //$rule['interface'] = "wan"; - $rule['descr'] = gettext("VOIP Adapter"); + //$rule['interface'] = "wan"; + $rule['descr'] = gettext("Connections From Upstream SIP Server"); $rule['protocol'] = "udp"; $rule['defaultqueue'] = "qVoIP"; $rule['source']['address'] = $config['ezshaper']['step3']['address']; @@ -1232,6 +1232,19 @@ function apply_all_choosen_items() { $rule['enabled'] = "on"; $config['filter']['rule'][] = $rule; + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = "wan"; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $config['filter']['rule'][] = $rule; + } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { /* create VOIP rules */ $rule = array(); diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.xml b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.xml index 30bc566..d54de03 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.xml +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.xml @@ -117,9 +117,9 @@ - Address + Upstream SIP Server inputalias - (Optional) If this is chosen, the provider field will be overridden. This allows you to just provide the IP address of the VOIP adaptor to prioritize. NOTE: You can also use a Firewall Alias in this location. + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. ezshaper->step3->address IP Address field is non-blank and doesn't look like an IP address. -- cgit v1.1