Empty call-id and channel on busy/congestion/failed/etc

When placing an outgoing SIP call that fails to connect due to the recipient being busy or the line being congested etc., the SIPCALLID variable as well as the CDR(channel) record fails to reflect the same details shown in Asterisk’s console/log. SIPCALLID is empty, and the channel CDR is set to OutgoingSpoolFailure. I understand that this is intentional, but it hampers attempts to track failure causes as there are no call details to log and use to correlate to Asterisk’s full log. Asterisk always assigns a call-id and SIP/PEER-<identifier> type of channel “internally” during every outgoing call dialog irregardless of success or failure, and it would be great if there was a way to get these values even when an outgoing call fails to connect. Any ideas or advice?

1 Like

Same problem here. Could we somehow save the information before Asterisk removes it?