[Freeswitch-users] Best practices question about SIP registration

Tim St. Pierre fs-list at communicatefreely.net
Sat Dec 29 07:47:00 MSK 2012


Hi Steven,

I would recommend using a proper domain name as much as possible.  For one, it looks 
nicer!  A SIP URI is supposed to be user at domain like an e-mail address is, and I hope that 
one day URI dialing will be common place, so we might as well do it right the first time. 
  It also helps to manage things.  If you set up SRV DNS records, many devices only need 
the user and domain, as the address and ports are looked up in the SRV record.  This also 
allows for load share or failover right in the DNS record!

For the second question, the MAC address probably doesn't make a lot of sense to me.  The 
user part is supposed to be a user name, not a hardware address.  What if you replace the 
phone?  This is normally an extension number, a telephone number, or perhaps a username 
like the user part of an e-mail address.  Any could be correct, but they should always be 
meaningful, and abstracted from the hardware.  The user part is often presented as caller 
ID, so it should mean something if it comes up on someone else's display as the 
originating number.

If you have a lot of phones, you should look into a better provisioning mechanism than 
individual TFTP files.  It makes sense to have a master config file that contains common 
settings, but it in a larger system, some sort of automation is good.

If you are running out of a database, you can use a server-side script to auto-generate 
the config as the phone asks for it.  This requires the phone to be able to use HTTP to 
fetch config.  Most phones can.

Failing that, many other phones will let you include multiple files, so you can have a 
master config file, then a per-phone file that just has overrides.  You may also be able 
to name the individual files based on the username, then create a symbolic link to the 
file named as the MAC address.  If you want to re-assign a phone to a different user, just 
update the symlink.

I recommend the HTTP script if you are up for it, as you can automate everything and save 
yourself a lot of time in the long run.  Create one database that you manage your users in 
and have Freeswitch config (via XML Curl) as well as the phone config fetch the 
appropriate settings from it.  That way, they will always match.

-Tim

Steven Schoch wrote:
> Please excuse me, I'm a VoIP newbie.
> 
> I found the very helpful comment in conf/directory/default.xml.  It says 
> that the default domain is the IP address of the Freeswitch server.  It 
> seems to me that this could cause problems if the IP changed for some 
> reason, or if the server has multiple NICs (which one does it choose in 
> that case?)
> 
> Is it better do just define a well known text string for the default 
> domain, or even use a real DNS domain name?
> 
> 2nd question is about SIP usernames.  At least one phone I have found 
> uses the MAC address as the default SIP user.  Would it be better to 
> avoid having a separate TFTP file for each phone, and just use the 
> already unique MAC address as the user?
> 
> -- 
> Steve
> 
> 
> ------------------------------------------------------------------------
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list