I had been having trouble getting my SIP connections to persist for more than a few seconds following a restart. I was pursuing this in another call ([freePBX trunk to inbound route works - for about 20 seconds only]
I thought I’d attempt a real basic “Hello World” type install / config in order to isolate the problem.
All starts ok.
1 SIP registrations.
which seems ok.
All I want to do is see Asterisk / PBX pickup a call and do something with it. I don’t care what. I thought the simplest of “Hello World” tests would be to do a Text to Speech announcement or maybe forward to a misc destination.
So the connection is being “forbidden”. I thought I’d hide some IP/account/password info with “???” just in case! Is this paranoia!
I’m hoping as this is a real basic install that I’ve done nothing to mess with, we can solve this one quickly so I might proceed (cautiously) building on what’s gone before. Unfortunately I’m falling at the first hurdle!
I really thought I could just specify a trunk, specify the SIP settings and then handle the Inbound route accordingly.
External calls to the DID receive an immediate not here -> voicemail message.
I’ve configured everything through the GUI. No editing of conf files.
In the OUTGOING TRUNK PEER DETAILS I HAVE host=sip.voipfone.net
and against the INCOMING PEER I just have the REGISTER STRING as
REGISTER and NOTIFY calls seem to be made ok - it’s the INVITE which is “forbidden”.
Please help! Between the other call and this I’ve spent over a week on this and not really got anywhere.
VOIP services are from voipfone (sip.voipfone.net) and I’ve tried to use the settings in SIP that they document for freePBX
It seems to register ok as Chan_Sip Registry says
1 SIP regsitration
On previous installs I’ve messed around in the conf files to the point I really haven’t had a clue what I’d changed and what I hadn’t. In this case, this is a clean install where I’m happy to change anything to get FreePBX talking to my SIP provider correctly.
My network is windows host with a Linux guest, running Asterisk. Guest virtual machine has 2 virtual network cards. One bridged to the host (for external DNS / IP) and one as Host Only so the host can provide a local IP address and communicate. Seems to be fine in that everything can talk to everything… but not from freepbx to Voipfone it seems!
I would LOVE some help. I’ve been on this pretty much full time for a week and have got nowhere but in a complete jumble.
I did an fwconsole restart. Nothing too weird in the full log (I reckon anyways). Here’s all the WARNINGS and ERRORS.
[2019-04-01 18:45:56] WARNING res_hep_rtcp.c: res_hep is not loaded or running; declining module load
[2019-04-01 18:45:56] NOTICE pbx_ael.c: File /etc/asterisk/extensions.ael not found; AEL declining load
[2019-04-01 18:45:56] ERROR pbx_dundi.c: Unable to load config dundi.conf
[2019-04-01 18:45:56] WARNING app_voicemail.c: maxsilence should be less than minsecs or you may get empty messages
[2019-04-01 18:45:56] WARNING app_flite.c: Flite: Unable to read config file flite.conf. Using default settings
[2019-04-01 18:45:56] NOTICE func_odbc.c: Unable to load config for func_odbc: func_odbc.conf
Placing an incoming call (goes straight to voicemail in error) results in
[2019-04-01 18:49:26] ERROR[C-00000000] rtp_engine.c: No RTP engine was found. Do you have one loaded?
[2019-04-01 18:49:26] NOTICE[C-00000000] chan_sip.c: Failed to authenticate device “07951408???” <sip:firstname.lastname@example.org.???>;tag=VF25f1c4cf891284fdd3b77cee263e
Because of the “RTP engine not found” error I checked that pbx was activated and all updates applied. They were.
The sngrep packet capture was done on the FreePBX VM yes.
Outgoing calls are fine… well… I’m not sure I’m testing properly… If I run a softphone on the host machine… I can dial out. My test number is 111 which is NHS DIRECT and that gets me straight through. Can’t see how I could do a better test i.e. direct from Asterisk?
Wow - I looked into that error (ironically that has not been the error I’ve been seeing most of the time) and another support note advised setting the sip_channel_driver to BOTH. I think that is the default but for some reason I’d changed it to chan_sip only.
Had to reboot the pbx server but then… as if by magic … no nasty logs, call gets diverted…
Very very happy.
Will do a few more checks but hopefully this is the last you will hear from me.
Like I said… the destination for these calls is not important… I simply wanted to get PBX to redirect them to somewhere.
I had two possible test routes. One was to the “MISCELLANEOUS DESTINATION” “NHS” which is simply the number 111. This seemed the simplest of tests.
The other destination I set up was to “Hello It’s Lenny” sound files. This was a custom destination [Lenny} which as I couldn’t get the NHS 111 to work… well… .seemed a while off.
What I am seeing now is that the call IS re-routed but it’s routed to Lenny. Lenny answers… even though the inbound route is clearly set to direct to NHS 111
I have no clue where the Lenny custom destination is being called from. I’m wondering if this fundamental gap in my knowledge has been the root of all my problems. How is the inbound call being routed to Lenny?
Possibly, the route isn’t matching and you’re hitting a default route.
More likely, maybe the misc destination isn’t working right, because the internal code for Lenny conflicts with 111. Try pointing the route to Feature Code Admin, Echo Test and see if that works correctly. If that also fails, post a log of the call.
I’ve found that the trunk / inbound destination routes reliably for a few hours and then… nothing… calls start going to the internal number, ringing out and then voicemail.
Weirdly the full log only shows
[2019-04-03 04:02:01] Asterisk 13.22.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2018-07-25 22:30:39 UTC
[2019-04-03 04:02:01] VERBOSE logger.c: Asterisk Queue Logger restarted
[2019-04-03 04:02:01] VERBOSE asterisk.c: Remote UNIX connection disconnected
which implies things stopped working at 4:02am this morning - which matches my experience i.e. worked last night, didn’t work this morning.
I haven’t managed to see a pattern yet… but I’d say it’s happened every day for 3 days, each time following several hours of functioning correctly.
I’ll open a new thread if advised to do so but it may well be connected with previous problems and I would appreciate you carrying on the journey with me!
There’s nothing in the system (except for logrotate) that would cause the full log to clear. One thing that will do this is “nefarious” activity (someone logging into your system and wiping out your logs). My next step (which you can dismiss as “overly cautious”) would be to check your CDR and CEL databases to see what kind of activity you see in there, and to check with your provider to make sure nothing “himky” is going on.
Well… it took about 3 hours and it’s happened. Inbound calls no longer going to the custom destination. They were half an hour ago. Calls now go straight to the phone number dialled, they are not intercepted by the inbound route I defined.
Full log has not had any entries for a couple of hours (since before it stopped working). The nearest I can see to any problems being reported is
[2019-04-03 13:49:48] NOTICE chan_sip.c: Peer ‘Voipfone_SIP_OUT’ is now UNREACHABLE! Last qualify: 63
[2019-04-03 13:49:59] NOTICE chan_sip.c: Peer ‘Voipfone_SIP_OUT’ is now Reachable. (24ms / 2000ms)
but like I said… that was a while before things stopped working anyway.
With no logs it’s hard to know where to start. Any ideas?
Yeah and I’ve had symptoms of networking problems before. I’m trying not to mess too much with the network settings as this is the closest I’ve had it to working …well… ever…
Here’s my setup.
Router gateway 192.168.1.1
Host (Windows) 192.168.86.99
and virtual ethernet via VirtualBox 192.168.215.3
Guest (Linux) IP 192.168.86.46 (via Bridged adaptor)
ASTERISK SIP SETTINGS
EXTERNAL IP ADDRESS
LOCAL NETWORKS 127.0.0.1/24 and 192.168.86.0/24
Asterisk seems to survive for anything from a few minutes to a few hours but eventually disconnects and no longer routes internal calls - leaving them to go to the default extension and ultimately voicemail.
I have the asterisk firewall enabled, including responsive firewall. I’ve moved the interfaces from “Trusted” to to “INTERNET (default firewall)” zones to see if that helps asterisk survive for longer.