We have had a tricky problem recently that meant that I had to get to grips with Asterisks configuration files, usually the GUI handles pretty much everything.
The problem was that we were using custom context to direct certain extension to certain routes, which works brilliantly! We were also using account codes for extensions for outbound call accounting, which also worked great! We then needed different MOH for different outbound routes, unfortunately for extensions that were using account codes this broke the custom MOH function within a route and it always played the default MOH. This wasn't acceptable as the company we were sharing the PBX with for simplicity have had customised MOH created to sell their services.
The solution was to modify the extensions_custom_asternic_outbound_freepbx.conf file so it has the following entry;
[queuedial]
; this piece of dialplan is just a calling hook into the [qlog-queuedial] conte$
; outbound dialing - replace as needed - just fill in the same variables.
exten => _X.,1,Set(QDIALER_QUEUE=${CDR(accountcode)})
exten => _X.,n,Set(QDIALER_AGENT=${AMPUSERCIDNAME})
exten => _X.,n,Set(QDIALER_CHANNEL=${OUT_${DIAL_TRUNK}}/${EXTEN})
exten => _X.,n,Set(QueueName=${QDIALER_QUEUE})
exten => _X.,n,MixMonitor(${QDIALER_QUEUE}-${UNIQUEID}.wav,b,/usr/local/parselo$
exten => _X.,n,SetMusicOnHold(FusionMOH)
exten => _X.,n,Goto(qlog-queuedial,${EXTEN},1)
This then forces any outbound calls that utilise the FreePBX custom extensions file and thus the extensions_custom_asternic_outbound_freepbx.conf as it is an #include in this file to use the MOH that you specify and not the default.
No comments:
Post a Comment