BT Digital Voice to
| ||||||||
|
Introduction Hopefully these notes will be useful to others going through the same process. These notes are not intended as a beginners guide and assume some Asterisk and home hub knowledge by the reader. He is a BT Halo Broadband customer and until recently was using a BT Home Hub 5. He has two RaspberryPi’s which are used as Asterisk servers. Asterisk1 for C*NET and Asterisk2 for various networks (PhreakNet, NPSTN & TandmX). The hostnames for the Raspberry Pi's are ‘asterisk1’ and ‘asterisk2’ respectively. Also connected is a Linksys SPA2101 ATA with two FXS ports and a Cisco SPA525G2 VOIP phone with 5 lines (effectively 5 x FXS ports). There are also have various softphones on a laptop and an Android smartphone (Zoiper, 3CX, MicroSip, GS Wave).
Rob advises.....
Ports SIP Ports asterisk1 5067 asterisk2 5068 SPA2101/1 5065 SPA2101/2 5066 SPA525G2/1 5070 SPA525G2/2 5071
SPA525G2/3 5072 IAX Ports asterisk1 4569
asterisk2 4570 RTP Ports asterisk1 10000-20000 asterisk2 20001-30000
DDNS https://www.cloudns.net/blog/what-is-dynamic-dns/ My hostname is something like ‘telecom.ddns.net’. The reason I have just mentioned that is because I use it in the examples that follow.
Port Forwarding Rule Name Hostname External Ports Internal Ports Protocol Asterisk1-SIP asterisk1 5067-5067 5067-5067 TCP/UDP Asterisk2-SIP asterisk2 5068-5068 5068-5068 TCP/UDP Asterisk1-Media asterisk1 10000-20000 10000-20000 UDP Asterisk2-Media asterisk2 20001-30000 20001-30000 UDP Asterisk1-IAX asterisk1 4569-4569 4569-4569 TCP/UDP Asterisk2-IAX asterisk2 4570-4570 4570-4570 TCP/UDP There were some rules for an X-Box where a game required special settings. You can also translate a port into a different one by having different External/Internal ranges.
Upgrade from BTHH5 to BTSH2 I recently upgraded my BT Home Hub 5 to a BT Smart Hub 2 after experiencing intermittent data loss and dropped connections on our broadband service. The Smart Hub 2 has resolved those issues but it introduced new problems with my Asterisk setup. This was before I went over to Digital Voice. I have a SIP softphone running in my Android smartphone. It is hosted on Asterisk1 and with the SH2 no longer worked. After installing the smart hub I was no longer seeing any SIP messages arriving from the public Internet making their way through the hub into the local network and so the soft phone didn't work when I turned off the wi-fi on the Android smartphone. This problem was solved by turning off 'Smart Setup' in the Smart Hub browser. Strangely I can no longer find a link to the ‘Smart Setup’ page in the SH2 menus. I now get to it using :- http://192.168.1.254/smart_setup.htm
The Firewall is set to default - "Allow all outgoing connections and block all unsolicited incoming traffic. Games and application sharing is allowed".
After turning off 'Smart Setup' the external SIP messages could be seen arriving on the local network in the house and the Softphone was able to register with Asterisk. Another problem was that whenever I made a call from the softphone the Asterisk CLI had some error messages before I saw the call setting up. Essentially they said "Address family for hostname not supported". It was suggested they were due to problems with IPv6. I turned IPv6 off in my Android phone (It was set to use either IPv4 or IPv6. I made it IPv4 only). Those error messages stopped. I have since tried restoring IPv6 on my soft phone but the error messages started coming up again so it is still switched off.
SIP Options [Feb 1 20:02:48] NOTICE[15298]: chan_sip.c:30531 sip_poke_noanswer: Peer '4427238' is now UNREACHABLE! Last qualify: 254 [Feb 1 20:03:12] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:03:26] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:03:40] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:03:54] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:04:08] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:04:22] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:04:36] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:04:50] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:05:04] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:05:18] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:05:32] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:05:46] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:06:00] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:06:14] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:06:28] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:06:42] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:06:56] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:07:10] ERROR[15298]: chan_sip.c:4345 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data [Feb 1 20:07:18] -- Registered SIP '4427238' at 213.205.240.31:47520 [Feb 1 20:07:18] NOTICE[18990]: chan_sip.c:24999 handle_response_peerpoke: Peer '4427238' is now Reachable. (68ms / 2000ms) Then I switch the smart phone back on and the soft phone makes contact with Asterisk and the errors stop. I've just turned off SIP OPTIONS for that extension (by putting qualify=no in the context in sip.conf) and the error messages haven't appeared since.
BT Digital Voice Activated After Digital Voice was activated I had no problems with my landline. I simply plugged the phone into the green socket on the back of the router and all worked fine. I did however have a problem with SIP softphones connected via the public Internet. They stopped working. IAX phones were fine. Outgoing SIP and IAX calls from my Asterisks were fine. The problem (again!) was that SIP messages coming into my SH2 from the public Internet were not traversing the hub into the local network. I suspected that some of the settings I had changed previously had been changed during the upgrade – but on checking found that this was not the case. Here they are:- There is an event log within the SH2 admin facility and I looked in there – I could see SIP messages from when I’d tried the landline earlier – here are some for you to see:-
15:20:29, 05 Jun.
15:20:29, 05 Jun.
15:20:23, 05 Jun.
15:20:23, 05 Jun.
15:20:23, 05 Jun.
15:20:20, 05 Jun.
15:20:20, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun.
15:20:19, 05 Jun. This got me thinking – what ports are BT using for SIP? Maybe they’ve hijacked the ones I’m using to get to my Asterisks (5067 & 5068)? So I decided to change mine… 5067 to 5180 and 5068 to 5181. At first I just added a new Port Forwarding rule in the SH2 and forwarded 5181 to ‘asterisk2’. Then I changed the server setting in one of my softphones from ‘telecom.ddns.net:5068’ to ‘telecom.ddns.net:5181’. Then I tried making a call from that softphone and now I could see the SIP message coming into ‘asterisk2’ and failing because of course Asterisk2 still thought it was 5068. The tasks needed to make all the changes on Asterisk 1 were as follows:- 1) Edit Asterisk config file ‘sip.conf’. [general] ‘change the port below from old 5067 to new 5180
bindport=5180 2) Add a new Port Forwarding rule in your BT SH2 Rule Name Hostname External Ports Internal Ports Protocol
Asterisk1-SIP-5180 asterisk1 5180-5180 5180-5180 TCP/UDP 3) Cisco SPA525G2 & LinkSys SPA 2101 Change the Port number of Proxy for lines hosted on my Asterisks from 5067 to 5180.
4) Softphones Change server address from telecom.ddns.net:5067 to telecom.ddns.net:5180 I guess if you’re hosting SIP lines for other folks then you will need to tell them to do the same! Obviously I had to repeat all of this for my Asterisk2.
Current SH2 settings
Firewall Configuration
Network Settings
IPv4 Configuration
IPv6
Please note: Many of the host names and new port numbers are fictitious for security reasons.
|
||||||||
Last revised: June 06, 2022FM | ||||||||