VoIP configuration requirement for FreeSWITCH

This page is intended to describe the functional requirements I want to implement in FreeSWITCH.


  • Use of 3 gateways, 1 being my home PSTN number (via a SPA3102) and the other 2 being DID numbers in 2 different countries.
  • Allow incoming calls to me via a iptel.org number (to avoid connection attempts directly to my system from anyone).
  • Configure DISA on my DID numbers from my mobile allowing me to call in but also call out from one of the other DID numbers..


  • configure internal extensions for family (currently 5 of which 2 are normally used).
  • configure a call group number for all family extensions
  • configure extensions for friends (allow them to call me and free external numbers)

Contexts (groups of users)

  • Internal users (family at home) allowed to dial anywhere
  • Friends allowed to call internal numbers and free external numbers
  • External registration for when travelling (like internal users)


  • Common voicemail for internal extensions
    • some extensions using English
    • some extensions using Spanish
  • Record incoming and outgoing calls
  • Incoming caller id rewrite from foreign gateways so I can dial back out and this will go through the right gateway again.


Incoming routing:

  • Incoming calls from DID numbers to routed to internal extensions via a group call number
    • if no answer go to common voicemail (in English for non Spanish DID numbers)
    • if no answer go to common voicemail (in Spanish for non Spanish DID)

Outgoing routing:

  • Default via Spanish DID number
  • Calls to 2 countries use the local DID number (where possible) [for 2 countries]
  • Provide a special dial prefix to allow dialing out through a specific gateway
  • For convenience, when dialing via the non-default gateway say extra text “using gateway XXXXX” to confirm routing
  • As non PSTN DID numbers may not be reliable, provide fallback via PSTN number to calls made via external DID numbers.
  • Optional: putting numbers on hold
  • Optional: conference call facilities
  • Optional: add skype interface (nice to have, not critical)

Update: 2011/02/11

Additionally to what I originally wrote for “security” I want to add some more features.

  • Limit internal extensions to only work from “internal networks”, thus avoiding any potential hack vector. Done.
  • For an external extension which I want to use when away from home figure out some anti-hack vector for added safety.
  • Internal calls from the internet go to a single uri something@<my.domain>. The internal extensions should not be visible. Done.
  • Outgoing calls via a SIP gateway should be limited to 1 concurrent call at a time, again to limit potential attack vectors.
  • Incoming calls from my sip provider to my DID number/account should be allowed only from the SIP’s host, or network. Again to avoid someone trying to masquerade as my provider.
  • Since this is a SOHO pbx I don’t want users to see that this is anything other than the normal PSTN connection. As such the dial plan should match unaltered the normal national plan, with a few extra extensions added where this can be done unobtrusively. With the Spanish dial plan that’s quite easy given the numbering and there are various unused prefixes which can be used for extensions or special functionality.
  • Use 3-digit extensions. 4 is too long and 2 might be too short. 3 seems ideal. The family are rarely likely to want to transfer internal calls and the only extension they are likely to use is for the voicemail.
  • voicemail should recognise the caller (like most mobile phones do), so it should be unnecessary for a registered internal extension to have to (i) provide the extension number, (ii) provide the password. The voicemail number won’t be reachable from outside so that shouldn’t be too hard.

Since this list has become quite long I want to try to document how I get to the final setup in the hope it will allow someone else to do this more quickly than it’s taken me.

4 thoughts on “VoIP configuration requirement for FreeSWITCH”

  1. Hi Simon,

    The requirements which u have listed above are very usefull for others to complete the task at faster rate, even i am the one among the list, if possible can i get the detailed document which you have prepared for the above.

  2. Hi Simon,

    I have one problem, hope you can give some suggestion to resolve it,

    problem is :

    If it try to register the SIP provider with freeswitch as external gateway, then it is failiing to register, only sometimes rarely it showed as registered, can u help me out why is this failing, do i need to do any changes to the default configuration or change the port to 5060 if so how please help me, i am waiting for your suggestion.

    Thanks in advance.


  3. Hi. If you really want to get FreeSWITCH questions answered it’s probably best to use the #freeswitch IRC channel or if not the freeswitch-users mailing list. These pages are my attempt to get FreeSWITCH to work for me and my thoughts on the process. Certainly I welcome comments, but I don’t really intend to try to help others. I’m not the right person to do that.

  4. Lakshmikanth: Also, if you’re interested, the are regular FreeSWITCH Trainings with one of the authors of the FreeSWITCH book, Darren Schreiber. You can check out http://www.voipkb.com for upcoming dates. I know the next one is in San Francisco at the beginning of March

Leave a Reply