2
votes

I have just installed Kamailio SIP Server followed instructions on official site. Later I've started the server for listening SIP messages and added "test" user. So now the tutorial is ended up and i have no idea how i can test whether it works correctly or not. I mean if there is some "hello world" simple config to run or how to write simple test and execute in that environment. What I've found in google it's just module and function descriptions. Thanks for any help and "real" examples are vital :)

2
I'm afraid this isn't on topic on SO, it may be better suited for the product's own support resourcesPekka

2 Answers

2
votes

I assume you have choosen a domain for your sip server (mysipserver.com in the tutorial). I'm also assuming that you have choosen a domain name that you owns.

  • Step1: check NAPTR & SRV record (optional, but at least SRV is good to have)

In theory, SIP Applications, will do some NAPTR and SRV requests to locate your server for your service. This is described in rfc3263 and means you are supposed to configure your DNS entries to let SIP applications find the IP of your server. Check this page for an example!

Then, you can test NAPTR for your service (replace antisip.com, with your domain name)

~$ host -t NAPTR antisip.com
antisip.com has NAPTR record 0 0 "s" "SIPS+D2T" "" _sips._tcp.antisip.com.
antisip.com has NAPTR record 2 0 "s" "SIP+D2U" "" _sip._udp.antisip.com.
antisip.com has NAPTR record 1 0 "s" "SIP+D2T" "" _sip._tcp.antisip.com.

Then, use one the answers to test the SRV queries:

~$ host -t SRV _sips._tcp.antisip.com.
_sips._tcp.antisip.com has SRV record 0 0 5061 sip.antisip.com.
_sips._tcp.antisip.com has SRV record 0 0 5061 sip2.antisip.com.

In the example above sip.antisip.com and sip2.antisip.com are running the sip services for antisip.com

  • Step2: Without NAPTR/SRV, at least check DNS

To make it simple, if you have one server, just make sure your domain resolve to your server's IP address:

~$ ping antisip.com
PING antisip.com (91.121.78.130) 56(84) bytes of data.

Note that for me, antisip.com is also the sip.antisip.com server.

  • Step3: Testing from a windows

The easiest from this point is to test on your favorite desktop OS. This will allow you to start a network capture.

You can download this very simple demo. It's a very basic SIP app, but that's easier for testing: VoipByAntisip.exe for Windows

Install wireshark and start it. Then, start capture and put the "sip" filter. You may also later add the "DNS" filter and the "RTP" filter.

  1. Test UDP, TCP and then TLS:

To test UDP, in settings, configure:

Proxy: mysipserver.com
username: test
password: yourpassword
protocol: UDP

To test TCP, in settings, modify:

protocol: TCP

To test TLS (without certificate verification), in settings, modify:

protocol: TLS

After applying the change, the box on the left of REFRESH button should become green with 200 OK written. If not, UDP doesn't work and either the answer code is written, or a 408 Timeout is provided to indicate no answer.

If you have registered correctly: that means you have received a 200 Ok, then, the "location" table of your kamailio database should contains the new registered user.

  1. Test calls:

Of course, you also need to test calls.

The tutorial doesn't indicate that you need a rtp relay! But usually, if you wish to makes calls between SIP User-Agents, an application relaying RTP, like rtpproxy will need to be installed and configured to work with kamailio on your server. Without the relay, you should be able to call (talk) between two SIP applications running on the same LAN.

In order to test calls, you will need to create a second user (test2?) and configure another PC to use this account. Then, in Voip By Antisip for windows, use the start call box and enter sip:[email protected]. The network capture should show an INVITE being sent to your server. This INVITE should be relayed to second user and received by test2 SIP application.

0
votes

If your SIP server is up and running, then go ahead and use an android phone to test whether it works fine. You can use 'csipsimple' client to connect to a SIP server. For more details checkout this tutorial.

And there are other SIP clients available for various devices PC, Android, iOS, etc.