SOLVED Feature Request: Idiot Proofing

Status
Not open for further replies.

bcmike

Active Member
Jun 7, 2018
326
54
28
53
Hi,

The carriers in North America are now getting tough on enforcing valid call display. I was wondering if there was a way to enforce validation on the outbound call display field when creating an extension.

Yes this is mostly to prevent me from forgetting about call display or putting it in the wrong field and then having calls rejected (I am the idiot in question)
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,383
364
83
There is a relatively new permission in extensions called outbound_caller_id_select. It is not enabled by default (at least not on an upgrade), if selected it will only allow you to select a caller ID from numbers you have in your inbound destinations.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
There is a relatively new permission in extensions called outbound_caller_id_select. It is not enabled by default (at least not on an upgrade), if selected it will only allow you to select a caller ID from numbers you have in your inbound destinations.

This is years old :) I think it may well have disappeared for a while.

I think its tough to idiot proof as for example, at the time the extension is created, you may not yet have defined any DIDs. I think you just need to start disciplining yourself to do it.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,383
364
83
I have to agree with @DigitalDaz it is impossible for the software to police what you are trying to do. We have seen some tightening up from Ofcom with caller ID here in the UK. There are many legitimate reasons why you may need to present a caller ID that is not one of the systems inbound destinations.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
An actual ongoing issue with callerID and a valid use case is forwarding. If you are forwarding the call you may well want to present the incoming DID to the forwarded call recipient.
 
  • Like
Reactions: Adrian Fretwell

ad5ou

Active Member
Jun 12, 2018
884
195
43
I agree the best way is to remember to add correct CID with each extension.
Another option is to add a “default” caller ID for the site in dialplan.
 

bcmike

Active Member
Jun 7, 2018
326
54
28
53
I think you guys are misunderstanding what I'm asking and perhaps over thinking it a bit. I wasn't really asking for the system to check against any lists and enforce any rules. I just want the form to validate the field has been filled out, that's it, as in it can't be blank.

I guess if I really wanted to ask for something fancy perhaps a domain default caller id could be specified somewhere that would be overridden by extension outbound call display fields. This may already exist to forgive me if it does.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
Whilst I think what you are asking for is valid I also know that fusionpbx development resources are limited. I would much rather the team is coding to fix bugs and add features than to make it a platform for idiots, using your terminology. That said, if you can fix it and make a pull request then go ahead.
 

bcmike

Active Member
Jun 7, 2018
326
54
28
53
10-4 message received, the idiot thing was meant more as a joke.

Ok, I think I'll look at the form and see if I can add the validation and then make it a domain option ie; enforce_CID = yes
 

bcmike

Active Member
Jun 7, 2018
326
54
28
53
Ok I figured out how to do the simplest form of what I wanted to do, here's how.

First use at your won risk!!

Make a backup of extensions_edit.php

cp /var/www/fusionpbx/app/extensions/extension_edit.php /var/www/fusionpbx/app/extensions/extension_edit.bak

The edit line 1171 and line 1211 with the "required" flag for the field

echo " <input class='formfld' type='text' name='outbound_caller_id_name' maxlength='255' value=\"".escape($outbound_caller_id_name)."\" required='required'>\n";


echo " <input class='formfld' type='text' name='outbound_caller_id_number' maxlength='255' min='0' step='1' value=\"".escape($outbound_caller_id_number)."\" required='required'>\n";

Done like dinner and a lot easier than I thought it would be.
 

bcmike

Active Member
Jun 7, 2018
326
54
28
53
Ok one last thing. If you want the field label to be bold, to indicate it's required like the other required fields edit line 1140 and 1179 respectively. Change the cell class from "vncell" to "vncellreq"

echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
 
Status
Not open for further replies.