VoIP Phones - FreePBX: Difference between revisions
mNo edit summary |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<indicator name="VoIPConfiguring">[[File:menu-voip.svg|link=:Category:VoIP Phones|30px|Back up to the VoIP Configuring page]]</indicator> |
<indicator name="VoIPConfiguring">[[File:menu-voip.svg|link=:Category:VoIP Phones|30px|Back up to the VoIP Configuring page]]</indicator> |
||
⚫ | |||
[[File:Freepbx_logo.png]] |
[[File:Freepbx_logo.png]] |
||
*There is an older guide if you are using chan_sip: [[ |
*There is an older guide if you are using chan_sip: [[VoIP Phones - FreePBX - chan sip]] |
||
=Setting up a A&A ipv6 trunk using pjsip via the Freepbx GUI= |
=Setting up a A&A ipv6 trunk using pjsip via the Freepbx GUI= |
||
This guide works with Freepbx 14.0.1.36. Earlier versions may not work. Version 13 will certainly not work. |
This guide works with Freepbx 14.0.1.36. Earlier versions may not work. Version 13 will certainly not work. |
||
==Setting up the trunk on the A&A control pages== |
==Setting up the trunk on the A&A control pages== |
||
The key to success is that you _*MUST*_ use the same password for both |
The key to success is that you _*MUST*_ use the same password for both |
||
the incoming and outgoing directions, and for |
the incoming and outgoing directions, and for the "To your server by |
||
sip" entry on the incoming page. If you do not do this you will find |
sip" entry on the incoming page. If you do not do this you will find |
||
yourself in a bottomless pit of pain. |
yourself in a bottomless pit of pain. |
||
==Adding the neccessary additional conf files== |
==Adding the neccessary additional conf files== |
||
Line 25: | Line 24: | ||
/etc/asterisk/pjsip.endpoint_custom_post.conf |
/etc/asterisk/pjsip.endpoint_custom_post.conf |
||
<syntaxhighlight lang=bash |
<syntaxhighlight lang=bash> |
||
[anonymous](+) |
[anonymous](+) |
||
; |
; |
||
Line 74: | Line 73: | ||
[2001:8b0:0:30::5060:0]/125 this should allow all of the current servers |
[2001:8b0:0:30::5060:0]/125 this should allow all of the current servers |
||
to contact you. |
to contact you. |
||
==And finally== |
==And finally== |
||
Line 82: | Line 80: | ||
used by pjsip, it is essential that you fully restart the asterisk |
used by pjsip, it is essential that you fully restart the asterisk |
||
server, either by rebooting your box or by using systemd etc. |
server, either by rebooting your box or by using systemd etc. |
||
⚫ |
Latest revision as of 19:19, 18 September 2022
- There is an older guide if you are using chan_sip: VoIP Phones - FreePBX - chan sip
Setting up a A&A ipv6 trunk using pjsip via the Freepbx GUI
This guide works with Freepbx 14.0.1.36. Earlier versions may not work. Version 13 will certainly not work.
Setting up the trunk on the A&A control pages
The key to success is that you _*MUST*_ use the same password for both the incoming and outgoing directions, and for the "To your server by sip" entry on the incoming page. If you do not do this you will find yourself in a bottomless pit of pain.
Adding the neccessary additional conf files
You cannot yet add a pjsip IPV6 transport via the Freepbx gui. So some custom config files are needed. These are as shown below. You will have to tweak the endpoint section name and the bind parameter in the tranport section for your setup.
/etc/asterisk/pjsip.endpoint_custom_post.conf
[anonymous](+)
;
; Fix bug in freepbx automatically generated anonymous endpoint
;
transport=ipv6-udp
;
; The section name below must exactly match the endpoint name you
; use in the Freepbx GUI.
[AAPJSIP](+)
transport=ipv6-udp
/etc/asterisk/pjsip.transports_custom.conf
; Set the bind parameter to the address (and port)
; you want the trunk to listen on. I tend to use
; a global ipv6 address out of my delegated block
; and a random port number as this makes it harder
; for scanners and easier to configure my firewall.
; Remember to set the server address in the "To your server"
; section in the A&A control pages to match this.
[ipv6-udp]
type=transport
protocol=udp
bind=[2001:8b0:xxxx:xxxx::x]:xxxx
allow_reload=no
tos=cs3
cos=3
Adding an IPV6 trunk via the Freepbx GUI
Create the new trunk as a normal ipv4 udp trunk using pjsip. On the general tab the "Trunk name" must match the section name you used in the conf files above.
Moving on to the pjsip settings. On the General tab the username should be set to the username portion onlyof your A&A sip uri e.g. +443333123456 and the secret to match the one you have used three times on the A&A control pages. Authentication must be set to Outbound only. Regsitration must be set to None. SIP Server should be voiceless.aa.net.uk. SIP Server Port shouid be 5060. Context must _*NOT*_ be left at from-pstn and _*MUST*_ be set to from-trunk-pjsip-yourtrunkname where yourtrunkname is the name you have given to this trunk. Another bottomless pit of pain awaits if you do not do this. On the Advanced tab Match must be set to something like [2001:8b0:0:30::5060:0]/125 this should allow all of the current servers to contact you.
And finally
Do to some horrendous interactions between the Freepbx dialplan customisation method and the new "Asterisk Sorcery" caching database used by pjsip, it is essential that you fully restart the asterisk server, either by rebooting your box or by using systemd etc.