[asterisk-users] Hangup-handler on failed calls

Joel Serrano joel at gogii.net
Tue Feb 25 18:01:29 CST 2020


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200225/ad6fdbaf/attachment.html>


More information about the asterisk-users mailing list