Jump to content

Adding Routing Records


subo

Recommended Posts

Hi.

 

Step1

I've discoverd a strange behaviour while executing the following command:

PS > $NEW=New-IpPbxRoutingRecord -Number +43 -Priority 600
PS > $NEW


 Id Enabled GrantAccess Priority NumberFilter                   Prefix Retries NoFurtherRetries Description
 -- ------- ----------- -------- ------------                   ------ ------- ---------------- -----------
  0 True    Allow            500 +43                                   0       False


PS > $NEW.Priority=600
PS > $NEW

 Id Enabled GrantAccess Priority NumberFilter                   Prefix Retries NoFurtherRetries Description
 -- ------- ----------- -------- ------------                   ------ ------- ---------------- -----------
  0 True    Allow            600 +43                                   0       False

 

 

PS >$NEW | Add-IpPbxRoutingRecord -TrunkGroupName "TR_3_1"

So the New-IpPbxRoutingRecord alway sets the priority to 500 and ignores the supplied values. If you manually modify the Priority property and add the entry to the routing table it gets the right priority. *Strange*

 

Step2

I'd like to provide additional values to the routing-object, but there are only 3 supported by New-IpPbxRoutingRecord.

So I've added manually:

$NEW.Priority=$item.Priority
$NEW.UserRestriction=0
$NEW.GroupRestriction=0
$NEW.LocationRestriction=0

 

But I wasn't succesful to unceck the SourceCodeRestriction (at the second tab - see screenshot)

It seems that I have to delete the property SourceCodeRestriction from the routing-object.

Any hint to archive this?

 

Thanx for any hint,

-Subo

 

post-855-0-59313300-1447171830_thumb.png

Link to comment
Share on other sites


  • Most Valued User

Hi,


the ignored Priority parameter is a bug which is fixed in SwyxWare 2015 R3. The fix is in IpPbxRoutingRecord.ps1 installed in  C:\Program Files (x86)\SwyxWare Administration\Modules\IpPbx. 


 


Line 176 is


$RoutingRecord.Priority = 500


but has to be


$RoutingRecord.Priority = $Priority

 

I'm not sure about the SourceNumberRestriction property. Have you tried to set it to $null instead of ""?

Link to comment
Share on other sites


Hi Martin.


 


You where right with the update which was recently installed. But I forgot to reload the swyx-module in my PowerShell session. *grr*


The hint to set


 


$ROUTING_ITEM.SourceNumberRestriction=$null


 


doesn't uncheck SourceNumberRestriction.


 


Thanx,


-Subo


Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.