No SIP Registration with flowroute

This should not be hard to troubleshoot. First, check that the register string and incoming settings for the trunk are correct. Next, from the Asterisk command line, do
sip set debug on
to see all SIP packets in and out. Or, use tcpdump. See whether Asterisk is sending REGISTER requests with the proper info to the correct address and port at Flowroute.

If not, something is corrupted in PBX data or Asterisk – we’ll look st the generated SIP config files.

If yes, something is behaving strangely on your network. Since outgoing calls work fine, I suspect a SIP ALG is causing trouble. Does White Russian have one? If so, try disabling it. How about the modem? If White Russian doesn’t get a public IP on the WAN interface, your modem is configured as a router and may be causing trouble.

sip show registry:
Host dnsmgr Username Refresh State Reg.Time
sip.flowroute.com:5060 N 23433805 120 Unregistered
1 SIP registrations.

sip show peers:
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
210/210 192.168.1.6 D Yes Yes A 41189 OK (19 ms)
220/220 192.168.1.6 D Yes Yes A 48850 OK (19 ms)
222/222 192.168.1.6 D Yes Yes A 5060 OK (9 ms)
230/230 192.168.1.6 D Yes Yes A 48851 OK (19 ms)
240/240 192.168.1.6 D Yes Yes A 27791 OK (16 ms)
241 (Unspecified) D Yes Yes A 0 UNKNOWN
242 (Unspecified) D Yes Yes A 0 UNKNOWN
RFE_FRte/23433805 216.115.69.144 Yes Yes 5060 Unmonitored
RFS_FRte/23433805 216.115.69.144 Yes Yes 5060 Unmonitored
9 sip peers [Monitored: 5 online, 2 offline Unmonitored: 2 online, 0 offline]

The register string and PEER settings have been reviewed by flowroute.
with sip debug on where would I see the sip packets?
I’ve sent two tcpdump files to flowroute. They say that no registrations are coming from my system.

With SIP debug on, you should see SIP packets at the command line. Make an outgoing call and confirm that you do. Then, force a reload (submit a null change and press Apply Config) and you should see REGISTER requests go out, and maybe some replies coming back.

Also, repeat the
sip show registry
command within 30 seconds of the reload; it will often show something more informative than “Unregistered”.

I looked in Admin, Module Admin and saw that OSS PBX End Point Manager was “disabled; pending upgrade”. So I tried to update it and got the following error message:

Error(s) installing endpointman:
Failed to install OSS PBX End Point Manager due to the following conflicting module(s): EndPoint Manager

Is the command line you refer to account specific? I am logged in via SSH with my personal account and SU’ed to root. with sip debug on I made an outgoing call and saw nothing on root’s command line.

I saved and reloaded my trunk then immediately sent sip show registry. No new information showed up in the CLI window.

This has nothing to do with your issue. I assume you can call phone to phone.

We are talking about Asterisk commands not shell commands. You must be root to attach to Asterisk “asterisk -r” you need to do as we say so we can help.

Send output of ‘sip show registry’

Set debug with ‘sip set debug peer xxxx’ where xxxx is the name (case sensitive) of your SIP trunk (do a show sip peers to get exact name)

Yes, I can call from one extension to another.

asterisk -r has been sent on the command line.

I made an outgoing call and a great deal of information appeared on the screen.

I then did a sip show registry and I got the same information as before, “Unregistered”.

When you made the outgoing call, did you see SIP packets?
SIP requests start with a word in all caps, such as INVITE or REGISTER.
SIP responses start with SIP/2.0 followed by a three digit number.

After the output from the outgoing call was over, force the reload. Do you see any REGISTER packets?

I see:
INVITE…
SIP/2.0 100 Trying
SIP/2.0 Proxy Authentication Required
Transmitting (NAT) to …
ACK …
Audio is at …

I copied the text to a file and searched for “REGISTER” the only string found was “Unregistered”

I’m stumped. Look through the file for error messages that might indicate why registration was not attempted. Also, go to Reports → Asterisk Logfiles and check ‘full’ and ‘freepbx.log’ for such messages.
If no luck, try shutting down and restarting Asterisk, to see if it registers or attempts to register at least once. If it doesn’t, there may be a useful message in one of the logs. If still no luck, repeat the above, this time rebooting the entire server.

If you can’t get registration to work, you can set up an Inbound Route on Flowroute that points to your server as a SIP URI, then link a DID to that route. For this to be a long-term solution, you need a static public IP address on your cable modem. But even if you don’t, it would be useful for testing or maybe short-term actual use, since dynamic addresses on cable don’t change very often.

Possibly, deleting the Flowroute trunk, rebooting and adding it back will help. You may have to re-adjust inbound and outbound routes that were using the old trunk.

It may be useful to test a trunk on another service, to learn whether your trouble is with registration in general, or specific to Flowroute. Unfortunately, the “good” providers of which I’m aware (credible alternatives to Flowroute), either require a nonstandard setup, or don’t use registration at all. My recommendation is Localphone. Setup is simple and well documented; even with an unfunded account you can send incoming calls via SIPBroker.

Sorry that I don’t have any real insight as to what may be wrong.

I searched though the text of the outgoing call. There were no messages that indicated any sort of error or problem except one line that said "[2014-06-12 19:49:06] WARNING[2408][C-00000000]: Ext. s:6 @ from-sip-external: “Rejecting unknown SIP connection from 23.95.12.250"”

Flowroute is suggesting that I reload FreePBX from scratch. I started to do that but had trouble getting the system to boot from USB. So I removed the HDD and discovered it was one of those damn Seagate 7200.11 with the screwed up firmware. So now I am updating the firmware on the drive and running diagnostics… It never ends.

Do you suggest I just reformat and reload FreePBX or are there more possibilities to be researched.

The unknown connection was likely from a hacker scanning for an open system and unrelated to your trouble.
By “text of the outgoing call”, please confirm that you forced a reload while still recording said text, i.e. the reload neither attempted to send a REGISTER nor provoked any error related to it.

Before reloading from scratch, it’s IMO worth a shot to reboot everything, unless you have already tried that.

If you do start from scratch, there is a chance that you’ll provoke the trouble again. If so, you want to find out what causes it. Put in the Flowroute trunk first, make sure it’s registered, then issue a sip show registry after every major addition.

If your present system works fine except for the failed registration, you may want to try a quick test with SIP URI routing from Flowroute. If that works reliably, you could run production that way for a while, and at your leisure work on the “new” system, e.g. after hours.

can you post your trunk settings please? by the way - a really dump question - is your trunk enabled? if we believe what the flowroute guys are saying after looking at the tcpdump, then the issue is truly got to be in asterisk - tcpdump captures what is on the NIC so chasing router or other network issues, at least at this point, is pointless. I think there are two options: 1. your install is screwed up - solution - reload from scratch or 2) your trunk definitions are wrong.

OK, Progress-I think.
I’ve been on the phone with flowroute. Before they all went home for the weekend I set up “URI: sip:RFE@70.***.***.***:5060;transport=udp” as a route. When I call the DID associated with this new URI SIP route, flowroute says that the call is delivered to my IP but no response is received.
BUT
If I am watching 'Reports, FreePBX System Status" I see one active call and one internal call under the FreePBX Statistics window.
The call is not delivered to my ring group, instead I get a recording that says the number is not in service and then my trunk name is read back.
What does this mean? The call is obviously getting into the system. Why is it not being delivered?
The trunk seems to be doing its job, so I am going to try deleting the incoming routes and recreating them.
Does anyone else have any other ideas?

Since data are received in the PBX with incoming calls now that I am using URI SIP routes can the problem still be in the trunk configuration?
with SIP debugging on I see packets, of course I don’t know what they mean. One block of data seems to be directed back at flowroute, it reads (in part):

<— Transmitting (NAT) to 216.115.69.144:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 216.115.69.144;branch=z9hG…

You are making something really simple into a space mission.

Where did you enter that SIP URI?

Is there any chance that IPTABLES is active on your box?

For the inbound route to work the SIP packet must match the trunk so in the logs you should see sip/mytrunk also must be in from-trunk context.

IMO, you are very close to the cheese. It’s almost certain that the trouble with SIP URI incoming is one of two things:

  1. Flowroute is sending the call from an IP address that does not match the incoming settings in your trunk. If this is happening, the logs will show “unknown peer” messages indicating where the calls came from, and Flowroute should be able to give you a list of IP addresses (or host names) from which calls can come. If there are several, you can add a dummy trunk for each additional, or add a section to sip_custom.conf for each, similar to:
    [Flowroute2]
    host=12.34.56.78
    type=friend
    insecure=port,invite
    context=from-trunk

  2. The “user” part of the SIP URI (in your example, it was “RFE”) does not match the DID Number in your Inbound Route. Try temporarily setting your Default route to ring an extension.

The Inbound Routes section of the Flowroute manager website.

Is there any chance that IPTABLES is active on your box?

It could be, but you would need to tell me how to check for it. On your instructions I’ve disabled it twice. The system has been rebooted several times since, so if it is configured to be active it likely is.

For the inbound route to work the SIP packet must match the trunk so in the logs you should see sip/mytrunk also must be in from-trunk context.

The user part of the SIP URI (the part between “sip:” and “@70.”) is the name of the trunk.

In the information captured during the incoming call the “From:” line reads:

From: sip:ping@invalid;tag=…

Both the “host=” and the “fromdomain=” lines in the trunk’s PEER Details are set to sip.flowroute.com, but the “Via” and “Record-Route” lines in the captured packets point to 216.115.69.144 and 216.115.69.131. According to flowroute their primary registration server is 216.115.69.144. I don’t know what the .133 address is. So is there a DNS problem??

  1. The “user” part of the SIP URI (in your example, it was “RFE”) does not match the DID Number in your Inbound Route. Try temporarily setting your Default route to ring an extension.

No it does not. It matches the name of my trunk. I wasn’t clear on what the ‘user’ part of the SIP URL represented, so I tried setting it to my Trunk Name and then to the DID Number from my Incoming Route. Flowroute said to use the Trunk Name, but to be honest, she did not seem sure about it.