Dcontext-Field in cdr

Hi,

I have a cdr in mysql. Here I use the field “dcontext” to know where the call is handeled.
One of the handlings is the “blacklist”.

The flow is firstcontext coming in from trunk and finding callednumber.
Second is blacklist-check via GOSUB and RETURN if not blacklisted.
Third is GOTO different company-contexts selected by the callednumber.

The Blacklist flow is:

first come into blacklist-ckeck context and if number is blackisted, i GOTOIF the blacklisted-context.

So my problem:

normally (not blacklisted) I have in the cdr the field dcontext filled with the name of the company-context, it was in at last.

If the number is blacklisted, the call resulted in the blacklisted-context, but in the dcontext-field in cdr is set to “firstcontext”-name.

So it is not easy to see, which calls are blacklisted. Is there a workaround for this?

Thank you

Marius

On Wednesday 25 June 2025 at 11:45:56, marno2703 via Asterisk Community wrote:

I have a cdr in mysql. Here I use the field “dcontext” to know where the
call is handeled. One of the handlings is the “blacklist”.

The flow is firstcontext coming in from trunk and finding callednumber.
Second is blacklist-check via GOSUB and RETURN if not blacklisted.
Third is GOTO different company-contexts selected by the callednumber.

I suggest that instead of trying to explain in English what your dialplan is
doing, you simply show it to us so that we can see what Asterisk sees.

Antony.


The best time to plant a tree is 20 years ago.
The second best time is now.