This is working for Success Calls but not working for Failed calls. Kindly help as I need to map actual error codes send from Sip trunk provider.I am getting below SIP messages with error code in logs
<— SIP read from UDP:10.10.10.10:7656 —>
SIP/2.0 480 Temporarily Unavailable
Firstly you should be using at least Asterisk 18. Secondly, there is no such thing as a SIP trunk as far as Asterisk is concerned. The same logic would apply to any SIP peer.
The channel private structure for the outgoing leg no longer exists at the point where you are calling SIP_HEADER, and you are probably also calling it on the wrong channel. However I believe the numeric part of the data is captured, and can be accessed using the HANGUPCAUSE function.
Hello David
I am able to receive these headers in Success calls. Numeric part was also captured in HANUPCAUSE but only in success calls.
How i can fetch these headers and how i can fetch channel details in failed calls.