Optional Inbound Destination (Inbound trunk overflow)

We want to assign a limit of 20 channels to a specific DID (trunk) and then overflow additional calls to another DID (in a2billing) to charge the additional calls by the minute.

For the 20 channels limit we are ok. We have an inbound route set to the customer’s trunk as destination that is limited to 20 channels. However inbound routes does not allow multiple destinations so I see no way to add a second (overflow) inbound route from the Gui.

I tried to create the syntax outside the GUI but when the calls fail on trunk 19 it fails as fast busy and does not jump to the next line.
i.e. [2012-10-08 13:18:07] VERBOSE[31242] app_dial.c: – SIP/xxxLync-00028eeb is circuit-busy

exten => _X.,n(TEST),Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => _X.,n,Set(CALLERPRES()=allowed_not_screened)
exten => _X.,n,Goto(ext-trunk,19,1)
exten => _X.,n(dest-ext),Goto(a2billing-did,${EXTEN},1)
exten => _X.,n,hangup

I realize this is not a standard request and possibly not how FreePBX is designed but I am sure it can work so any help would be greatly appreciated.

What if I change the above line?
exten => _X.,n,Goto(ext-trunk,19,1)
exten => _X.,n,Macro(dialout-trunk,19,${EXTEN},)

Bump :slight_smile:

there does not appear to be enough information in what you posted to provide an answer to why what you have done isn’t working or if it’s even getting there.

Part of the issue is that you have not even provided any details of how you limited the trunk … basically a lot of missing information.

The net of it though, if you want to do this, you’ll probably have to create a unique context that throttles the trunk and when the max is hit, it sends the calls to your new destination. The one thing you need to be careful of is whether you are limiting ‘attempted but not yet answered calls’ to 20 or all calls whether answered or not…