CDR report: App is "Background", Destination is "s [ivr-1]" for a 5-hour call

Recently changed SIP providers and ported our 877-vanity number over, so I was watching our system’s “FreePBX Status Page closely” when I noticed a call with a 5 hour duration, and counting - but couldn’t find anyone on the phone… and especially couldn’t find anyone that came in at 5am and jumped on a call.
I tried digging into the call details, but using the “sip show channelstats” command it wasn’t showing the other end of the call’s IP address, so I was really confused. I did about 30 minutes of troubleshooting before finally “making the call” (pun intended) to restart Asterisk and reset/disconnect the call.
After the call was disconnected, and with Asterisk restarted I could generate a CDR that showed more details - but only to find that to be more confusing.
Can anyone tell me what this CDR detail means? What other places, like log files, can I look to see what happened?
I reached out to my SIP provider to see if that can determine if I was billed for the time, but haven’t heard anything back yet.

Here’s the line in my report:
[list]
[*]Call Date Recording System CallerID Outbound CallerID DID App Destination Disposition Duration Userfield Account

[*]2014-05-22 05:03:38 1400749418.1751 NPANXXXXXX BackGround s [ivr-1] ANSWERED 359:57
[/list]

(Sorry I suck at formatting)

Possible reasons the call may not have disconnected:

  1. Your router or firewall is misconfigured, such that a NAT association can time out, causing a BYE from the provider to not be received.
  2. A temporary network problem prevented the BYE from being received by your PBX.
  3. The caller did not disconnect, e.g. his phone was not properly hung up.
  4. A malicious caller intentionally kept the call up for as long as possible; see http://voipsecurityblog.typepad.com/files/toll-free-traffic-pumping_11-7-13-.pdf .

You need to review your system to make sure that all calls get eventually disconnected at your end. If your DID was not redacted, you have a problem now. Calling the 701 number results in the PBX answering the call and playing a UK-style ringback tone indefinitely. I assume that the toll-free number would route the same way.

Ensure that your system ends a call if there is no response to a SIP timer, or if no RTP is received for a specified time. Also, set an absolute maximum call duration, e.g. two hours or whatever is suitable for your business.

Make sure that a caller can’t stay indefinitely in an IVR, e.g. by repeatedly choosing a “return to main menu” option. It should not be possible to stay indefinitely in a queue – if unanswered within a specified time, the call should be sent to voicemail. And, it should not be possible to stay indefinitely in voicemail; a few seconds of silence should end the recording, set a maximum message length, limit the number of times a caller can review his message, etc.

we have discovered that using the default voicemail settings, it is possible for someone to call, be routed to voice mail, and never hang up and run up a big bill.
all the suggestions in the previous post are good tips. we also set the max limit on voice mail to be 5 minutes and have a cronjob that does an asterisk channel hangup. we run this last item at 8PM after everyone has gone home.

OK first off thanks for all of the info. I can rule out the NAT problem because I’ve been on the same equipment for quite a while, and have been using several different providers, and had never experienced such an issue… and I doubt at this point that a temporary network issue caused this one. But at any rate…
I had no idea this was even a thing (Toll Free Traffic Pumping)!
So I am going to go through and secure my system. I think I see where to set the “maxsecs” and “maxsilence” in the Voicemail Admin. And I can definitely setup a cron job for the channel hangup (thanks bksales). The IVR was set to just repeat indefinitely due to my train of thought being to set this up for users, and not to securely configure the IVR to prevent malicious activity like this, but;
I’m not seeing an easy way, to set a maximum call duration in the GUI besides going into “Advanced Settings | Asterisk Dial Options / Asterisk Outbound Trunk Dial Options” and using the "L(xxxxxxxx:xxxxxxxx) format after the existing Ttr/Tt that is pre-configured (with the x’s representing milliseconds). Seems like I should be able to enter a number into an input box in FreePBX. But in all honesty I’ve only been using FreePBX for about 8 months… and haven’t read the Asterisk documentation front to back either :stuck_out_tongue:

Either way in doing some Googling I’m only finding bits and pieces of information to accomplish all Stewart1’s suggestions.
Maybe it would be good to have a “cookie cutter” set of things to adjust like this somewhere on these forums?
In particular I’m having a problem finding how to do this:
"Ensure that your system ends a call if there is no response to a SIP timer, or if no RTP is received for a specified time."
Any additional help there would be much appreciated. I’ll try to compile this all up into a neat and tidy set of instructions once I finish collecting all of the info.

That code means the call went into the first IVR, you see each IVR gets a number, your first IVR appears to me misconfigured therefore the call never gets terminated and/or is going into a loop, check the IVR settings, the tim out settings and the return setting should be set in a way that they dont keep on looping also make sure to set return after VM to “NO” if you revise the IVR settings I am sure you will find the issues.
Good Luck

I don’t think that person is stuck with this issue for 5 years now :see_no_evil: