twilio / OpenVBX

OpenVBX is a web-based open source phone system for business.
http://openvbx.org
Other
699 stars 342 forks source link

Rudimentary SIP support #243

Closed ryanpetris closed 10 years ago

ryanpetris commented 11 years ago

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.

nsteffan commented 11 years ago

+1

ghost commented 10 years ago

+1 Great work Ryan.

Gipetto commented 10 years ago

@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.

Gipetto commented 10 years ago

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().