Re: [asterisk-users] Hangup-handler on failed calls

2020-02-26 Thread Joel Serrano
Found a workaround... In case anyone else runs into something similar:

Setting congestion=yes in cdr.conf changes the writing behavior, and
instead of having one CDR with disposition=FAILED, I have all the CDRs with
disposition=CONGESTION, and as I can link them together with the
linkedid or the uniqueid plus the sequence, I can grab the fields from the
row that has them.





On Tue, Feb 25, 2020 at 4:01 PM Joel Serrano  wrote:

> Hello,
>
> I have a setup with asterisk 16.8.0, I'm facing a problem where calls that
> fail (CONGESTION) don't have filled in some extra fields we add to the CDRs
> in the database.
>
> We use cdr_adaptive_odbc with MySQL as backend.
>
> To simplify the scenario:
>
> [sub-hanguphandler]
> exten => s,1,Set(CDR(foo)=${bar})
> same => n,Return()
>
> [default]
> exten => _X.,1,NoOp(New test call)
> same => n,Set(CHANNEL(hangup_handler_push)=sub-hanguphandler,s,1)
> same => n,Dial(...)
> same => n,Hangup()
>
>
> With the above config:
>
> 1- An answered call: foo is filled in db
> 2- A cancelled call: foo is filled in db
> 3- A failed call: foo is NOT filled in db
>
> In all 3 cases, with verbose logs enabled I can see
> the sub-hanguphandler subroutine is being executed, so it's confusing.
>
> I would understand if the hangup handler is NOT executed for failed calls,
> but seeing it in the logs and then seeing the field empty in the db doesn't
> make sense to me.
>
> Any tips on where/how I can troubleshoot this?
>
>
> Thanks,
> Joel.
>
-- 
_
-- 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] PJSIP crashes

2020-02-26 Thread Saint Michael
>
> I have no control over the SIP calls I receive. PJSIP should log a warting
> and continue. It is causing the CPU usage to spike dramatically.
>
-- 
_
-- 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