Jump to content

restricting a device


Jack Noe

Recommended Posts

I have a customer, a facility similar to  detox center.
They want 2 features, for polycom phones in the patients rooms  if anyone has any thought ideas, greatly appreciated
 
 
1 - The patient should not be able to call out at night, Except for 911 which should work all times.
2-  During the day when calls are allowed,  there should be a white list where only specific calls can be called, so they can only dial specific phone numbers.
 
I have a solution for number 1
The dial plan will allow only a callflow 500, or 911, which we will set in the provisioning on 2600 in dial-plans, which will go to Disa based on a schedule.
 
For option 2 i have a solution to block a specific IP based on a schedule, in the router.
 
Does anyone know how to combine both features, or any simpler way ?
 
 
 
 
 
 
Link to comment
Share on other sites

  • 2600Hz Employees

1. You could use Pivot and maintain the list of device->allowed_numbers in a db. Then you can create a UI where you/the facility can manage what numbers a device can dial.

2. You could create a "dial_plan" object on the device that whitelists the allowed numbers and rewrites all others to a "can't dial this number" recording (like adding a prefix "BARRED" and having a callflow pattern for "BARRED{\\d+}")

Those are two quick thoughts with no testing so buyer beware :)

Link to comment
Share on other sites

 

Quote

 

I will throw in doing similar things on the server side (never hurts to have redundancy!):

1. Classifiers can be used to restrict/allow dialing numbers. In your example, a classifier for "\\+?1900\\d+" could be added to deny access to these numbers

2. Dial plans can convert "local" dials to appropriate representations. You can prepend area codes, country codes, add access codes, whatever is needed.

 

@mc_ This is really good information and I moved some of what you said from another thread to this one for consistency on what I'm about to ask.

I've read the documentation on phone numbers, converters, classifiers, dial plans, and etc., but would like some clarification. 

  • I'm struggling to understand when they take effect as anything that reaches no_match is already formatted correctly and unmodified from the dial plan. I inserted a pivot into no_match and looked at the results. Regardless of what the dial plan matches and converts a normalized number is the outcome. This includes "unknown" extensions. 
  • Where in the account, user, or device doc do you insert the classifier, all I can find is call restrictions.
  • And if I add a classifier, do I then need to add the friendly name to call restrictions to deny?
  • How does pretty print apply to classifiers? That one seems to be coming out of left field for a place that prevents routing of numbers.
  • What is with the "\\" in the regex? It appears in the beginning and again within "\\d"  The '\' means literal and would imply the match should be "\d" Am I missing something as that's not a valid number syntax. 

Wheew , sorry for so many questions, but this topic appears to be very powerful stuff.

Link to comment
Share on other sites

  • 2600Hz Employees
  • The "Request" username is normalized to e164 if possible from the get-go. Depending on your e164_converters, they may correct the request to something not accounted for in your dial_plan.
  • The classifiers are in the number_manager config. You use the classifier name as a key into the call_restriction object to allow/deny/inherit.
  • The classifier key is used (so in the example "tollfree_us", "unknown", etc would be the values to use in the call_restriction object.
  • Pretty print is only used for display purposes in the UI; unrelated to call processing
  • You have to escape the backslash to make it literal to make the regex be valid. See here for example

 

Link to comment
Share on other sites

therefore, in the hosted service, I don't have access to the classifiers being located in the number_manager config?

and,  It appears that dial plan has no effect when the global carrier is removed from no_match. I.e. if I place a pivot there and look at requestbin the request is always normalized. However, if I replace global carrier, I can use dial plan to create nonconforming numbers that fail. Does having global carrier in the no_match callflow enable dial plan?     

Link to comment
Share on other sites

The Regex is straight from the documentation slightly modified with your example.

Dial Plan using Device level.
Regex: ^1?([2-9][0-9]{2}[2-9][0-9]{6})$
Prefix: BARRED

Dial any 10 digit number and you get an error trying to complete a call; as I would expect.  

Do the same with pivot on the no_match and I never see the "BARRED2125551212" in the request or anywhere for that matter. 

I'm concluding there must be a behavior difference when global carrier is evoked in the no_match.

 

Edited by FASTDEVICE (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...