InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
502 stars 246 forks source link

Internal and external phone numbers #80

Open ogogon opened 4 years ago

ogogon commented 4 years ago

The program divides all phone numbers into two categories - internal numbers (extensions) and just numbers. As far as I understand, the selection criterion is the length of the number. If there are less than seven digits, then this is an internal telephone number, if seven or more, then this is just a telephone number.

Why not five, six, eight? For example, I live on a small campus where city phone numbers are five digits long. And this is completely normal - neither the Ministry of Communications, nor the International Telecommunication Union not have any claims to anyone.

I believe there must be a way to define the criteria by which the extension number is determined.

Besides, why, without my permission, does the program subscribe to receive the states of all numbers about which it has heard something? In a large call center, this means a significant load on the softswitch and a lot of traffic on the network. I think it would be nice to be able to control this option.

By the way, in the topic about multilingual support, I gave the lines, the translation of which was corrected. You may not have paid attention.

InnovateAsterisk commented 4 years ago

Most of these things are controlled with the DB settings: var DidLength = parseInt(getDbItem("DidLength", 6)); // DID length from which to decide if an incoming caller is a "contact" or an "extension".

For the moment there is no "settings" UI that will allow a user to change these - mostly because the settings list is changing rapidly. The easiest way to do this If you don't want to fork the code to your own (and want to keep using the master track), is to make a small "pre" script. That you include in index.html

...
        <script type="text/javascript">
        window.localStorage.setItem("DidLength", "5");   // or 4 or what ever you want here
        </script>
        <script type="text/javascript" src="phone.js"></script>
....

Yes, the subscribe is assumed - true, and probably something down the line that could be a setting for each buddy. Ill look at including a "[] Subscribe to device state" tick box. Although I think this should be the default behaviour.

I got the changes to the language file, but want to discuss this further with you - will do so in the language topic.

ogogon commented 4 years ago

If you don't want to fork the code to your own

My ambition does not go that far. Also, I know JavaScript very poorly.

For the moment there is no "settings" UI that will allow a user to change these - mostly because the settings list is changing rapidly.

I hope this option will be implemented someday.

Ill look at including a "[] Subscribe to device state" tick box.

I believe this would be correct.

Although I think this should be the default behaviour.

Probably you want to check how soon the Asterisk's administrator will start retaliatory hostilities.

I got the changes to the language file, but want to discuss this further with you - will do so in the language topic.

I will wait for your questions.