Custom Dialplan - Softphone doesn't record but DISA does

I have written some custom dialplan that allows passing in a set of numbers with a * between them. The issue is that when a softphone dials the custom number and hits the dialplan the call is not recorded. I have tried setting call recording to forced my trunk, outbound route, and softphone extension with no luck. When dialing in using DISA if I dial the custom dialplan code manually the call successfully records. Any idea why the softphone call might not be recording?

You need to show us this custom stuff and what it does. We can’t just guess.

It just cuts the numbers apart and then dials them using -
same => n,Dial(SIP/Outgoing_Trunk/1${numToCall})

When you dial to SIP/xxx/yyyy you are bypassing all of the PBX generated dialplan. Try dialing to channel:


Thanks Igaetz it does record the call when dial is used that way. The only problem with that method is it seems to block me from setting the CID and the CID is always being set to the number on my trunk. Is there anyway I can set the CID to the users extension? Possibly it can only be done in macro-dialout-trunk-predial-hook?

I’ve posted about Caller ID before, and your logs should be helping you narrow down where the jam up is, but here are some pointers:

Thanks for the feedback cynjut. I am certain it’s just the caller ID set on my trunk that is causing the issue. If I remove the CID from the trunk it will pass through correct from the dialplan.
same => n,Set(CALLERID(num)=${jakesExtNum})

The only con to this is that it breaks any normal dialing but gets the custom dialplan I have fully working.

If a trunk has a CID set but with option Allow Any CID, normal calls should use the extension CID, unless the Outbound Route has Override Extension set.

When I look in the pbxact GUI Outbound CID is not set on my extension or outbound route. CID is set on the trunk as suggested by the GUI. Outbound routes has Override Extension set to “No”. Trunk CID Options is set to “Allow Any CID”.

When calling using -
same => n,Dial(Local/1${numToCall}@from-internal)

The CID will always be the CID defined on the trunk. If I remove the CID from the trunk it will allow the CID set by.
same => n,Set(CALLERID(num)=${jakesExtNum})

And just to reiterate setting CID also works when dialing using SIP and a softphone but as lgaetz suggests this is where the conflict occurs where the call cannot record.The call can record using SIP with DISA for whatever unspecified reason.

I will keep trying to dig around and see if there is some CID or other setting in the pbx that I can use with local dial and get the CID to work.

Each extension should have Outbound CID set appropriately. The trunk CID is intended only as a backup.

1 Like

How do these specialized calls get to the PBX? Did you change the context the extension is using? How does this custom context of yours tie into the rest of the dialplan?

Also, can we get some verbose log output so we can see how this call is actually being processed through Asterisk and the dialplan?

I was finally able to figure it out how to get the CID to work with the local dial. You have to hook into the macro-predial like I thought earlier.

I was able to come to this solution after reading a nice write up by Igaetz at -

Also his other answer here helped me pass data via a channel variable -

Thanks everyone for the assistance.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.