Hum I feel a little alone on this topic !!
Well I crafted a Parking slot State query so to speak that works in the respect of showing busy if the slot is in use.
exten => s,n,Noop(*** HIDDENVISION PARKING STATE TEST ***)
exten => s,n,ExecIf($[ ${DEVICE_STATE(park:11@parkedcalls)} = INUSE ]?Busy)
I have been trying to find a logical place to put it to pre-process any attempt to park a call either manually from an extension or directly from a Queue.
Tried in “extensions_custom.conf” file
but it would appear this may be processed after the original plan so I put some bits in just after the start of macro-parked-call of “extensions-additional”.
But I only see these when I go to pickup the parked call by dialing 11.
May be something in the naming !
This was in the “extensions_additional.conf”
[macro-parked-call]
include => macro-parked-call-custom
exten => s,1,Macro(user-callerid,)
exten => s,n,Noop(*** HIDDENVISION PARKING STATE TEST ***)
exten => s,n,ExecIf($[ ${DEVICE_STATE(park:11@parkedcalls)} = INUSE ]?Busy)
Plus all the normal stuff.!
In this position it shows busy when I try to pickup the parked call.
With that I get
- pbx.c: – Executing [s@macro-parked-call:2] NoOp( “*** HIDDENVISION parked-call-macro ***”)
- pbx.c: – Executing [s@macro-parked-call:3] ExecIf(“1?Busy”)
- app_macro.c: == Spawn extension (macro-parked-call, s, 3) exited non-zero in macro ‘parked-call’
- pbx.c: == Spawn extension (from-internal, 11, 1) exited non-zero
- pbx.c: – Executing [h@from-internal:1] Hangup()
Trimmed for clarity
I am doing it manually, on an off line box, placing those check state lines in various parts of the extensions_additional.conf but still have not found the entry point for 10@from-internal.
Not sure if the context will change if same call placed from a Queue.
This is the log of placing a call to the full parking lot from an extension(6201).
pbx.c: – Executing [10@from-internal:1] Park(“SIP/6201-0000002d”, “”)
features.c: No more parking spaces in default
file.c: – <SIP/6201-0000002d> Playing 'pbx-parkingfailed.ulaw’
pbx.c: – Executing [10@from-internal:2] NoCDR(“SIP/6201-0000002d”, “”)
then goes off to hangup or play unable to connect (I forget)
Again trimmed for easy reading but that is the full flow to the point of failure…
This was a log from the attempt from the Queue.
Cool, different context.!
[29195] pbx.c: – Executing [10@from-queue:1] Set(“Local/10@from-queue-00000004;2”, “QAGENT=10”)
[29195] pbx.c: – Executing [10@from-queue:2] Goto(“Local/10@from-queue-00000004;2”, “1,1”)
[29195] pbx.c: – Goto (from-queue,1,1)
[29195] pbx.c: – Executing [1@from-queue:1] Goto(“Local/10@from-queue-00000004;2”, “from-internal,10,1”)
[29195] pbx.c: – Goto (from-internal,10,1)
[29195] pbx.c: – Executing [10@from-internal:1] Park(“Local/10@from-queue-00000004;2”, “”)
[29194] app_queue.c: – Local/10@from-queue-00000004;1 answered SIP/6201-00000034
[29194] file.c: – <Local/10@from-queue-00000004;1> Playing ‘queue-reporthold.ulaw’ (language ‘en’)
[29194] res_musiconhold.c: – Stopped music on hold on SIP/6201-00000034
[29195] features.c: No more parking spaces in default
[29195] file.c: – <Local/10@from-queue-00000004;2> Playing ‘pbx-parkingfailed.ulaw’ (language ‘en’)
[29195] pbx.c: – Executing [10@from-internal:2] NoCDR(“Local/10@from-queue-00000004;2”, “”)
[29195] pbx.c: – Executing [10@from-internal:3] Progress(“Local/10@from-queue-00000004;2”, “”)
[29195] pbx.c: – Executing [10@from-internal:4] Wait(“Local/10@from-queue-00000004;2”, “1”)
[29195] pbx.c: – Executing [10@from-internal:5] Progress(“Local/10@from-queue-00000004;2”, “”)
[29195] pbx.c: – Executing [10@from-internal:6] Playback(“Local/10@from-queue-00000004;2”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”)
[29195] file.c: – <Local/10@from-queue-00000004;2> Playing ‘silence/1.ulaw’ (language ‘en’)
[29195] file.c: – <Local/10@from-queue-00000004;2> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
[29195] file.c: – <Local/10@from-queue-00000004;2> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)
[29195] pbx.c: – Executing [10@from-internal:7] Wait(“Local/10@from-queue-00000004;2”, “1”)
[29195] pbx.c: – Executing [10@from-internal:8] Congestion(“Local/10@from-queue-00000004;2”, “20”)
[29194] pbx.c: – Executing [h@from-internal:1] Hangup(“SIP/6201-00000034”, “”)
[29194] features.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/6201-00000034’
[29195] pbx.c: == Spawn extension (from-internal, 10, 8) exited non-zero on ‘Local/10@from-queue-00000004;2’
[29195] pbx.c: – Executing [h@from-internal:1] Hangup(“Local/10@from-queue-00000004;2”, “”)
[29195] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘Local/10@from-queue-00000004;2’
[29194] pbx.c: == Spawn extension (from-internal, 1, 40) exited non-zero on ‘SIP/6201-00000034’
I am only showing the failure not much point in the working logs.
Any call put in the queue when the parking lot is empty gets pushed to parking as expected but fails if the parking is FULL.
I am thinking this is perhaps one thing I should find for myself but not able to find it so far. Could any kind folk advise where I may stick it.?
Hv.