Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

VoIP Phones - FreePBX - chan sip: Difference between revisions

→‎top: clean up
(→‎top: clean up)
 
(9 intermediate revisions by 2 users not shown)
<indicator name="VoIPConfiguring">[[File:menu-voip.svg|link=:Category:VoIP Phones|30px|Back up to the VoIP Configuring page]]</indicator>
[[File:Freepbx_logo.png]]
 
'''2016-11 The information below is for an older version of FreePBX - newer versions use 'pjsip' rather than 'chan_sip', see: [[VoIP Phones - FreePBX]] '''
 
*[[IPv6]] Works!
FreePBX is based on [[VoIP Phones - Asterisk|Asterisk]] - you may wish to read this page for more background information.
 
These instructions were last tested on FreePBX 212.0.76.2 - from the FreePBX Distro installer with Asterisk 11.019.230.
 
=Setting up your A&A trunk=
==Configuration in FreePBX Web UI==
Log into your FreePBX administration interface and go to '''Connectivity, Trunks''' - then select '''Add SIP Trunk'''.
 
Fill out the fields as below:
 
===General Settings===
* '''Trunk Name:''' A descriptive name for the trunk - enter whatever you wish.
* '''Outbound CallerID:''' The caller ID you will use for calls made on this trunk. I entered my phone number in the format: 01234567890.
* '''Disable Trunk:''' Make sure "Disable" is not ticked.
 
===Dialed Number Manipulation Rules===
I left this entire section alone.
 
===Outgoing Settings===
These are your outgoing call settings - for calls you make from your phone through voiceless. These settings can be found under the "SIP Phone" heading in clueless for your number.
 
'''Trunk Name:''' <code>out-01234567890</code><br />
'''PEER Details:''' <pre>host=voiceless.aa.net.uk
username=+441234567890
secret=YOUR-OUTGOING-PASSWORD-HERE
type=peer
username=+441234567890
insecure=invite</pre>
secretremotesecret=YOUR-OUTGOING-PASSWORD-HERE
transport=udp
disallow=all
allow=alaw
qualify=yes
</pre>
 
===Incoming Settings===
These are your incoming call settings - for calls you receive from voiceless. These settings can be found under the "To your server via SIP" heading in clueless for your number.
 
 
'''USER Context:''' <code>in-01234567890</code>
'''USER Details:''' <pre>secrettype=YOUR-INCOMING-PASSWORD-HEREuser
type=peer
context=from-trunk
username=in-01234567890
insecure=invite</pre>
remotesecret=YOUR-INCOMING-PASSWORD-HERE
transport=udp
disallow=all
allow=alaw
trustrpid=yes</pre>
 
===Registration===
If your FreePBX is behind a NAT you may need to enter a registration string here.
 
If you FreePBXthere is notno behindNAT abetween NATyour FreePBX and voiceless, you should not use registration if possible.
 
More details can be found on the [[VoIP Phones - Asterisk]] article.
 
==Fix forFixing incoming calls==
In order for FreePBX to recognise incoming calls from the voiceless.aa.net.uk platform, we must change a FreePBX setting:
After using the above for a while, you may well find that your incoming calls randomly stop working - this is because they are being rejected by Asterisk as it does not recognise the incoming calls properly.
 
Go to '''Settings, Asterisk SIP Settings''', then click on '''Chan SIP'''.
This can be fixed by manually adding some fixes to <code>/etc/asterisk/sip_custom_post.conf</code>:
<pre>
; IPv4 voiceless addresses for 01234567890
[in-01234567890-a4](in-01234567890)
host=a4.voiceless.aa.net.uk
[in-01234567890-b4](in-01234567890)
host=b4.voiceless.aa.net.uk
[in-01234567890-c4](in-01234567890)
host=c4.voiceless.aa.net.uk
[in-01234567890-d4](in-01234567890)
host=d4.voiceless.aa.net.uk
[in-01234567890-e4](in-01234567890)
host=e4.voiceless.aa.net.uk
[in-01234567890-f4](in-01234567890)
host=f4.voiceless.aa.net.uk
[in-01234567890-g4](in-01234567890)
host=g4.voiceless.aa.net.uk
[in-01234567890-h4](in-01234567890)
host=h4.voiceless.aa.net.uk
[in-01234567890-i4](in-01234567890)
host=i4.voiceless.aa.net.uk
[in-01234567890-j4](in-01234567890)
host=j4.voiceless.aa.net.uk
 
Scroll to the bottom of the page and find the '''Other SIP Settings''' entry.
; [[IPv6]] voiceless addresses for 01234567890
[in-01234567890-a6](in-01234567890)
host=a6.voiceless.aa.net.uk
[in-01234567890-b6](in-01234567890)
host=b6.voiceless.aa.net.uk
[in-01234567890-c6](in-01234567890)
host=c6.voiceless.aa.net.uk
[in-01234567890-d6](in-01234567890)
host=d6.voiceless.aa.net.uk
[in-01234567890-e6](in-01234567890)
host=e6.voiceless.aa.net.uk
[in-01234567890-f6](in-01234567890)
host=f6.voiceless.aa.net.uk
[in-01234567890-g6](in-01234567890)
host=g6.voiceless.aa.net.uk
[in-01234567890-h6](in-01234567890)
host=h6.voiceless.aa.net.uk
[in-01234567890-i6](in-01234567890)
host=i6.voiceless.aa.net.uk
[in-01234567890-j6](in-01234567890)
host=j6.voiceless.aa.net.uk
</pre>
 
In the first field, enter <code>match_auth_username</code>, and in the second field enter <code>yes</code>.
This seems to keep incoming calls working OK.
 
[[File:Freepbx_other_sip_settings.png]]
You will need to force Asterisk to reload the configuration files for this to take effect - this can be done by restarting Asterisk or by running <code>asterisk -rx 'reload'</code>.
 
Then click '''Submit Changes'''!
If you are using the test voiceless server for any reason, you will also need to add those addresses to your <code>/etc/asterisk/sip_custom_post.conf</code>:
<pre>
; voiceless test server addresses for 01234567890
[in-01234567890-z4](in-01234567890)
host=z4.voiceless.aa.net.uk
[in-01234567890-z6](in-01234567890)
host=z6.voiceless.aa.net.uk
</pre>
 
=Making IPv6 work=
*Also see the [[VoIP Security]] page for information about securing your VoIP service.
 
 
[[Category:VoIP]]
[[Category:VoIP Phones|FreePBX]]
[[Category:VoIP IPv6]]
editor
706

edits