Skip to main content

Changing inbound.include templates

Posted by ci_newman on Wed, 03/04/2009

Hi all,

We are starting to investigate the feature which allows us to limit concurrent calls per tenant. We have successfully got this configured and working as we expect it to do, however the default messages played when the tenant has reached their maximum occupancy are a little unfriendly and I wish to change them to something more simple (especially with inbound calls I want the caller to receive a 'busy' tone).

Following the scripts, I have identified where this message is being called from under the file inbound.include on line(13) for any given route - Sample data:


exten => 1234,1,Set(DIALED_PUBLIC_NUMBER=${EXTEN})
exten => 1234,2,Set(DIALED_NUMBER=${EXTEN})
exten => 1234,3,Set(status=${DB(TL/TENANT/dev_tenant/status)})
exten => 1234,4,GotoIf($["${status}" != "0"]?7)
exten => 1234,5,Playback(ss-noservice)
exten => 1234,6,Congestion
exten => 1234,7,GotoIf($["${TL_ENABLE_MAXCALLS_CHECK}" != "1"]?15)
exten => 1234,8,Set(MAXCALLS=${DB(TL/TENANT/dev_tenant/maxcalls)})
exten => 1234,9,GotoIf($["${MAXCALLS}" = ""]?15)
exten => 1234,10,Set(GROUP(callpaths)=dev_tenant)
exten => 1234,11,NoOp(GROUP_COUNT = ${GROUP_COUNT(dev_tenant@callpaths)})
exten => 1234,12,GotoIf($[${GROUP_COUNT(dev_tenant@callpaths)} > ${MAXCALLS}]?13:15)
exten => 1234,13,Playback(ss-noservice)
exten => 1234,14,Hangup
exten => 1234,15,GotoIfTime(*,*,*,*?from-outside-1234-Catch-all-dev_tenant,${EXTEN},1)

I am aware that I can change line(13) to the following:

exten => 02078502082,13,PlayTones(busy)

And this has the desired results however if I make changes to the inbound route from the Web GUI then the original template line(13) is restored.

Does anyone know how I can make these changes permanent (and even default)?

Cheers!


Submitted by mattdarnell on Wed, 03/04/2009 Permalink

You could grep the directory to see where else ss-noservice is used and if appropriate copy the busy sound file to ss-noservice.

You would have to do it again when ever you installed new sounds. You could even put the copy command into a 5min/hourly/daily cron job so it would work even if you installed new sounds.

-Matt

Submitted by eeman on Wed, 03/04/2009 Permalink

playing tones is not really the best solution unless you can also call the Busy application, and if the Busy application by itself works to the remote caller then dont use Playtones. Ideally you want to send a BUSY call status back to the caller so that there is no toll for that call. By answering a call and playing tones, you are creating an ANSWERED cdr status at every leg. Its more of being a good citizen issue as opposed to actual functionality the end caller would hear the same thing, but one way could incurr a toll or count against their minutes.

Submitted by ci_newman on Thu, 03/05/2009 Permalink

This is a very fair point - I hadn't considered that. My question still remains of how you can get the PBX to make these changes rather than relying on a manual update to the inbound.include file whenever the route is altered. In the meantime I shall look into sending a BUSY call status instead.

Cheers

-Chris