[asterisk-users] Calls running forever / CDRs inaccurate

2023-05-05 Thread Markus

Hi list!

Running Asterisk 20.0.0 on CentOS 7, logging CDRs using 
cdr_adaptive_odbc to mariadb-server-5.5.68 (via 
mariadb-connector-odbc-3.1.7-ga-rhel7)


Using chan_sip.

I'm facing the problem when there is a sudden spike of calls, some of 
the calls that are being made during those spikes hang forever 
basically. This looks like this:


[root@voip]# asterisk -rx 'core show channels verbose' |sort -r -k 9 | 
grep -v Outgoing


Channel  Context  ExtensionPrio State 
Application  Data  CallerIDDuration 
Accountcode PeerAccount BridgeID
SIP/customer01 customer-voipin 49xxx 26 RingDial 
SIP/+49xxx@provider4912:49:05


So, the longest currently active call is in state "Ringing" for 12 hours 
49 minutes.


It could be also that a call is in state "Up" for an arbitrary duration 
(10, 15, 20+ hours). A cron script is restarting Asterisk every night, 
and this is the moment these calls are cleared, otherwise they'd 
hang/run forever.


Now, the problem is, that this is causing a billing discrepancy. I've 
had calls with billsec 20+ hours and state "Up" in the CDRs. The 
termination providers (there are multiple) are ending the calls after 
max. 120 minutes, so the issue is not there but in the local Asterisk.


Any recommendations on how I could debug, or even fix, this?

Maybe a workaround to help with the billing discrepancy?

In theory, if I set TIMEOUT(absolute) to maybe 2 hours and 2 minutes, I 
could find and delete those ghost calls in the CDRs at the end of the 
month, before sending the invoice to the customer, but that's not a good 
solution either (because losing money). But maybe still better than 
overcharging the customer thousands of minutes?! :)


This behavior happens every day on approx. 5-200 calls. (At the end of a 
day I could have 200 hanging/ghost calls).


Help! :)

Lastly, a "core show channel" on a hanging call, obfuscated:

[root@voip asterisk]# asterisk -rx 'core show channel 
SIP/customer01-dfa4'

 -- General --
   Name: SIP/customer01-dfa4
   Type: SIP
   UniqueID: voip-1683277216.81923
   LinkedID: voip-1683277216.81923
  Caller ID: 49xx
 Caller ID Name: (N/A)
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
DNID Digits: 49x
   Language: en
  State: Ring (4)
  NativeFormats: (alaw)
WriteFormat: alaw
 ReadFormat: alaw
 WriteTranscode: No
  ReadTranscode: No
 Time to Hangup: 0
   Elapsed Time: 13h4m11s
  Bridge ID: (Not bridged)
 --   PBX   --
Context: customer-voipin
  Extension: 49x
   Priority: 26
 Call Group: 0
   Pickup Group: 0
Application: Dial
   Data: SIP/+49@provider
 Call Identifer: [C-85c3]
  Variables:
PROGRESSTIME_MS=
PROGRESSTIME=
RINGTIME_MS=
RINGTIME=
DIALEDTIME_MS=
DIALEDTIME=
ANSWEREDTIME_MS=
ANSWEREDTIME=
DIALEDPEERNAME=
DIALEDPEERNUMBER=
DIALSTATUS=
SIPADDHEADER02=X-Something: something
AUTO_MONITOR=wav,/var/spool/asterisk/monitor/20230505110016-customer-DE-EXTEN-49xxx-CLINUM-49x-CLINAME--PAICLEAN--CLICLEAN-49x-OCLINUM--OCLINAME-,mX
MONITOR_EXEC=/var/lib/asterisk/2wav2mp3.sh
CALLFILENAME=20230505110016-customer-DE-EXTEN-49xxx-CLINUM-49-CLINAME--PAICLEAN--CLICLEAN-49xx-OCLINUM--OCLINAME-
SIPADDHEADER01=P-Asserted-Identity: 
CLICLEAN=49xx
CLILEN=12
SIPCALLID=85b9164eeb2211eda29c008cfa0447f8@x.x.x.x
SIPDOMAIN=x.x.x.x
SIPURI=sip:49x@x.x.x.x:5061
  CDR Variables:
level 1: customer=customer
level 1: country=DE
level 1: dnid=49
level 1: clid="" <49x>
level 1: src=49
level 1: dst=49
level 1: dcontext=customer-voipin
level 1: channel=SIP/customer01-dfa4
level 1: dstchannel=SIP/provider-dfa6
level 1: lastapp=Dial
level 1: lastdata=SIP/+49@provider
level 1: start=1683277216.169426
level 1: answer=0.00
level 1: end=0.00
level 1: duration=47051
level 1: billsec=0
level 1: disposition=1
level 1: amaflags=3
level 1: uniqueid=voip-1683277216.81923
level 1: linkedid=voip-1683277216.81923
level 1: sequence=64906

 -- Streams --
Name: audio-0
Type: audio
State: sendrecv0
Group: -1
Formats: (alaw)
Metadata:

Thank you!
Markus

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Opus: No translation path after upgrade ubuntu focal => jammy

2023-05-05 Thread Joshua C. Colp
On Fri, May 5, 2023 at 6:23 AM Benoît Panizzon 
wrote:

> Hey!
>
> I just upgraded our machines from Ubuntu focal to jammy.
>
> A separate package asterisk-opus does not exist any more.
>
> https://launchpad.net/ubuntu/+source/asterisk-opus/+changelog
>
> It looks like this is now included in the default packages.
>
> Required modules are loaded:
>
> *CLI> module show like opus
> Module Description
> Use Count  Status  Support Level
> format_ogg_opus_open_source.so OGG/Opus audio   0
> Running  core
> res_format_attr_opus.soOpus Format Attribute Module 1
> Running  core
>
> *CLI> module show like resample
> Module Description
> Use Count  Status  Support Level
> codec_resample.so  SLIN Resampling Codec0
> Running  core
>
> Core show codecs shows:
>
>   31 audio opus opus (Opus Codec)
>
> *CLI> core show translation paths opus
>
> Shows no translation path to/from any other codec.
>
> What could I be missing?
>

There is no codec_opus module loaded, thus no transcoding of it.

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Opus: No translation path after upgrade ubuntu focal => jammy

2023-05-05 Thread Benoît Panizzon
Hey!

I just upgraded our machines from Ubuntu focal to jammy.

A separate package asterisk-opus does not exist any more.

https://launchpad.net/ubuntu/+source/asterisk-opus/+changelog

It looks like this is now included in the default packages.

Required modules are loaded:

*CLI> module show like opus
Module Description  Use 
Count  Status  Support Level
format_ogg_opus_open_source.so OGG/Opus audio   0   
   Running  core
res_format_attr_opus.soOpus Format Attribute Module 1   
   Running  core

*CLI> module show like resample
Module Description  Use 
Count  Status  Support Level
codec_resample.so  SLIN Resampling Codec0   
   Running  core

Core show codecs shows:

  31 audio opus opus (Opus Codec)

*CLI> core show translation paths opus

Shows no translation path to/from any other codec.

What could I be missing?

-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users