How does SIP work?

(I’m sorry to ask this question here, but I didn’t get a reply in VoIP-related forums and I figured there’s a lot of people here who are knowledgeable about VoIP and SIP, and could help me see the light. Please replace “Axon PBX server” with “Asterisk in SIP mode” if you will :smile: )

I finally got to have a working set up using an Axon Windows PBX software, Linksys 3102 gateway, a GrandStream IP phone and an X-Ten softphone over the Net… but I don’t know why it works :smile:

Here’s how I think the whole thing works:

  1. I set up the router to map UDP 5060 to the host where the PBX is installed, and I launch the Axon server

  2. Remote phones connect through the Net into the Axon server to register their IP address and extension

  3. When a call comes in from the PSTN network into the Linksys, the 3102 sends an SIP notification to the PBX. The PBX checks what extensions it must ring, and sends out SIP notifactions to all extensions involved. For this to work, all remote routers must also forward SIP messages to the IP phones that registered (UDP 5060 by defaullt, but each phone needs its own port to be reachable, eg. UDP 5060 for the first phone in the LAN, UDP 5061 for the second phone, etc.)

  4. Once a phone goes off-hook, a connection is set up between the phone and the Linksys gateway. During the connection, each device tells the other what UDP ports it will use for RTP, ie. data packets.

Provided this is correct so far, here’s where things begin to blur:

  • If I don’t set up remote phones to use STUN, connections are made, but I don’t get sound in one direction: Is it because without STUN, the misconfigured phone sends its private IP in the data part of an SIP message, eg., and since this is an unroutable address the other device won’t be able to route data packets?

  • I didn’t forward any ports for RTP, but calls still work: Is it because I happen to have UPnP-capable routers, hence RTP ports are automagically opened to make things happen?

Thanks much for any hint :smile:

start from here:
good luck!


Already done, but

  1. that site is a mess
  2. that page is anything but a quick run-up on what SIP is and how it works

… hence my asking if anyone knew of such document :smile:

Some information:

Best practices for SIP NAT traversal By Adrian Georgescu … ctices.pdf