So this only effects toll free numbers, local 10 digit numbers this is not needed. I switched to the toll free number as it bypasses alot of the new hoops to jump through to get registered.
Sole Proprietor A2P 10DLC Registration Launches on April 17, 2023, This is a new requirement that carriers are forcing. There are additional fees and such with this new setup. If you do not get setup then you risk additional fees and being blocked by carriers (I was already getting hit with additional fees)
After going back and for trying to get it setup, I got word from a rep that if I was to switch over to a toll free number then they are already considered A2P compliant, however there are additional requirements, but the process is much simpler.
Requirement #1: I have to have proof that the number Opt-In to receive the messages, was told a signed document is good enough and would need to be public for the carriers to see, google drive folder was fine to place there.
Requirement #2: Must send them an opt-in message after getting document stating what they signed up to and how to opt-out
Requirement #3: Opt-Out Method, this I found out there was a standard and did not have to do anything, all is needed is a text reply "Stop" and it returns a generic message and blocks the number from getting anymore messages. "Start" allows them to get them again.
Requirement #4: Is the Header needed, They could not clarify if the same system continued to send them needed to have it or if only different systems sending. As I am using my toll free number with friends and family so we all use the same number and account for sending out messages. So each habitat is considered a separate "Business" and would need the header. (But they believe its still required on a single "Business" sending.
So all these thing mentioned above are new coming through from the new carriers rules. They don't have official documentation for the Toll Free section since this is also still new for them to deal with. Just like with the Sole Proprietor that most hubitat twilio users will be using has changed several time in the first 7 days of them launching due to minor things changing and being tweaked.
I tried for the time period to get registered but kept having issues are it was tailored to business not individuals. (We were a total after thought by carriers). I believe alot has been streamed lined and no longer require your EIN number to register if you are not a business.
The code I posted above is not a requirement for local 10 numbers.
Figured I would post if for others incase they needed it, and made it an optional field that if not fielded in it is basically skipped.
I have had very basic programming over the years so I was able to understand what needed to be tweaked and with googles help found how to write it in groovy.
So honestly I believe most will not need this feature, it will be a very limited use case. I have it working on my side and they confirmed it will work the way I have it setup.
I have my headder as Albert's Hubitat, my Brother has it as Erik's Hubitat and friend has it as Jeremy's Hubitat ect...
They each had to fill out a document with the number(s) they will be sending to and sign it along with their header tag. I then upload that to my google drive for the carriers access.
But now its a set it and forget it.
So I don't believe you need to add the code, after I went through everything its a going to be a limited use case, so People should be able to just copy and paste the code should they need it for their toll free numbers. As as mentioned twilio is not even 100% sure it needed for single use, but I am using across multiple so there it was needed.
Hope that helps. And thanks again for all that you do in the community