How To Connect To SIP
This post is the start of a series. I’m going to be releasing all of the bits and pieces that make up the online payments system at my library. It should be a good model for most libraries to follow, you can use nearly any payment gateway, and all you need is SIP and PHP.
The first step is going to be to make sure our web server can actually connect to our SIP server. This will save you lot’s of time thinking your PHP is broken, when it’s really a port open/closed issue.
First, login to your web server, the one that will be connecting to SIP through PHP. Open up a command prompt and enter the command ‘telnet sip.mydomain.com 666’ where sip.mydomain.com is the address to your SIP server, and 666 is the port number you wish to connect into.
After you press enter, your screen should go totally blank. It will look really weird, but not to worry, this is normal. You’ve now started a telnet connection to your SIP server. You can type in anything you want (it won’t show up, this is something called localecho), and when you hit enter you should get a 96 as a response. The 96 response means that SIP didn’t understand the command. This does verify that you are connected into the server, however.
If you receive another message, like the one in this screen shot, then your webserver cannot see your SIP server. You’ll have to make the changes to the firewall to open the port.
Now we know that your webserver can actually connect to your SIP server. In the next post in this series, we’ll actually make the connection through SIP, and get some real data from SIP.
March 12th, 2011 at 11:22 am
I’m glad you’re posting this series. III sells a module for this purpose but it sounds like it may not be necessary!
April 20th, 2011 at 1:03 pm
[…] time, we took a look at how to make sure your web server can see your SIP server. This time, we’re going to carry on with actually making the two talk to each […]
May 4th, 2011 at 9:07 am
[…] we’ve looked at how to make our web server talk to our SIP server, and how to make PHP talk to our SIP server. Let’s start to retrieve some real data from […]