Closed ryanpetris closed 10 years ago
+1
+1 Great work Ryan.
@ryanpetris I'm hoping to dive deeply in to this soon, but off the cuff I see that there's a lot of rudimentary sip
address checking. The develop branch of OpenVBX, where all the development work happens before moving to master, has a helper method for validating sip
addresses.
https://code.hq.twilio.com/shawn/OpenVBX/blob/develop/OpenVBX/helpers/format_helper.php
Can you cherry-pick this work from your master in to your develop branch instead and resubmit the pull request against develop?
You can read a bit more about the repo layout here: https://github.com/twilio/OpenVBX/wiki as well as get a link in to the git-flow methodology. It makes pull requests from forks a bit tedious but the workflow itself is solid.
Looking back at my earlier comment about the number of times we use strpos($var, 'sip')
to check the sip address: after reading the entirety of the pull request and reacquainting myself with the codebase a bit I wouldn't worry about that so much. Sheesh... I really should have written some quick and easy helpers like is_phone_number()
is_client_address()
as we now need is_sip_address()
.
I needed/wanted this for my own OpenVBX installation so I added some very rudimentary support for SIP urls in both the devices page and in the dial applet. If anything you could use this as a base for adding proper SIP support.