No CDRs generating when Playback cannot complete as dialed

CDRs are generating but when I call a outbound number for outbound trunk it says “cannot complete as dialed” and the no CDRs were generated for this call leg. however this call hits my server. please see the logs.

[2017-06-20 17:59:38] NOTICE[2474]: chan_sip.c:24586 handle_response_peerpoke: Peer ‘300’ is now Reachable. (195ms / 2000ms)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] ResetCDR(“SIP/300-0000000d”, “”) in new stack
– Executing [[email protected]:2] NoCDR(“SIP/300-0000000d”, “”) in new stack
– Executing [[email protected]:3] Progress(“SIP/300-0000000d”, “”) in new stack
– Executing [[email protected]:4] Wait(“SIP/300-0000000d”, “1”) in new stack
– Executing [[email protected]:5] Playback(“SIP/300-0000000d”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <SIP/300-0000000d> Playing ‘silence/1.ulaw’ (language ‘en’)
– <SIP/300-0000000d> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
– <SIP/300-0000000d> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)
– Executing [[email protected]:1] Macro(“SIP/300-0000000d”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/300-0000000d”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/300-0000000d”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/300-0000000d”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/300-0000000d’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/300-0000000d’
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected

can anyone suggest.

one more thing I am using twilio trunking.

If the call doesn’t complete, it will not generate the log file. I would make sure that the NXXNXXXXXX outbound route is set up to go through the trunk you’ve created. It’s likely either a route issue or a trunk issue.

But the logs must be generated when call hits the server whether its completed or not but it will appear in the cdrs with cause code with which it fails. Thats what all the voip switches do. Is there any way that i can enable cdrs for this type of call.

You don’t have an outbound route with a dial pattern that matches the digits you are dialing.

Hi Lorne,

I can understand that but is there any way that we can generate the CDRs for call failure.

Thanks.
Faisal

No supported way, but you could rewrite the [bad-number] context in /etc/asterisk/extensions_override_freepbx.conf and have it work the way you want.

This outcome doesn’t violate the “Rule of Least Astonishment” for me. The call never leaves the PBX and is never connected to another endpoint, so there are no call details to record. It’s only “half a call”, so it kind of makes sense that the CDR (which is for full calls) wouldn’t get updated. This is the way that “bad calls” have been handled for years, and in fact you can see the CDR being deliberately cancelled at the top of your log file extract.

As @lgaetz suggested, you could copy the existing [bad-number] context from the extensions_additional.conf (I think) file to the extensions_override_freepbx.conf file and remove the lines that turn off the CDR generation. This will give you a CDR for every bad key combination that anyone on any phone hits in your system.

Ahan! that makes sense.

Let me try this.

Thanks for the advises everyone.

This community is really a helping community. really love you guys and your efforts.

1 Like

I feel the same way about it @faisalkhan! It’s the first community I actually wanted to give something back to :sunglasses:

2 Likes