Configuring SIP

From FreeSWITCH Wiki
Jump to: navigation, search

The SIP configuration is made in three different config files.

Contents

Configuration

vars.xml

In this file, there is only one parameter that you need to specify. That parameter is $${domain}. This parameter should contain the domain name (or text string like an ip address) that the phones / user agents use when they register.

Additionally you can set the "hold_music" channel variable to either a wave file path or "indicate_hold"(sends re-invite on hold).


sip_profiles/internal.xml

This file contains SIP specific information like which providers (to make external calls) you have and how the registration process should work. By default, all phones may register.

Since we only want to allow registered phones to use our switch, we need to change the parameter called "accept-blind-reg".

 <param name="accept-blind-reg" value="false"/>

directory/default.xml

The last thing to do is to specify which users that may register themselves. This is done in the "directory" directory.

Passwords can either be sent as clear text or as A1-hashes (MD5 string of "username:domain:password"). Passwords are also optional, although note that the params tag always has to be specified, otherwise the user will not be found.

<domain name="$${domain}">
	<user id="arne">
		<params></params>
	</user>
	<user id="arnepw">
		<params>
			<param name="password" value="arnepw" />
		</params>
	</user>
</domain>

Also note that I've changed the domain name to $${domain} to match the string in FreeSwitch.xml. In this way, you only need to change if FreeSwitch.xml when the domain is changed.

References

Advanced usage

You can provide FreeSWITCH with your own directory (dynamically generated by a webserver). This is done by using the mod_xml_curl module. For additional information, look here: mod_xml_curl