In my setup, I have connected a PRI PBX to Asterisk. The PBX-extensions are identified by their DID numbers, and share (pool) the 30 channels in the E1 PRI connection. So there is no fixed relation between the channelnumber and the extensionumber.
The PBX is connected to span 2 consisting of channel 32-46,48-62
The PBX-extension in this case is 915, defined as a custom extension.
When I park a call to the PBX-extension, and it times out, it returns to the channelnumber in stead of the extensionnumber.
Since there is no fixed relation between the channel and the extension, the PBX does not know how to route it, and it ends up at the switchboard.
It can be even worse, when at the moment of the call-back the original channel is in use, which might be by an different extension.
A part of the log file
The most significant lines are
17:00:20] VERBOSE[463] logger.c: == Parked IAX2/MYTRUNK on 71@parkedcalls. Will timeout back to extension [from-did-direct] 915, 1 in 45 seconds
And
17:01:05] VERBOSE[28432] logger.c: – Added extension ‘Zap/32’ priority 1 to park-dial
17:01:05] VERBOSE[28432] logger.c: == Timeout for IAX2/MYTRUNK parked on 71. Returning to park-dial,Zap/32,1
The log file
17:00:03] VERBOSE[463] logger.c: – Zap/32-1 answered IAX2/MYTRUNK
17:00:13] VERBOSE[463] logger.c: – Started music on hold, class ‘default’, on IAX2/MYTRUNK
17:00:13] VERBOSE[463] logger.c: – <Zap/32-1> Playing ‘pbx-transfer’ (language ‘en’)
17:00:20] VERBOSE[463] logger.c: – Stopped music on hold on IAX2/MYTRUNK
17:00:20] VERBOSE[463] logger.c: – Started music on hold, class ‘default’, on IAX2/MYTRUNK
17:00:20] VERBOSE[463] logger.c: == Parked IAX2/MYTRUNK on 71@parkedcalls. Will timeout back to extension [from-did-direct] 915, 1 in 45 seconds
17:00:20] VERBOSE[463] logger.c: – <Zap/32-1> Playing ‘digits/7’ (language ‘en’)
17:00:21] VERBOSE[463] logger.c: – <Zap/32-1> Playing ‘digits/1’ (language ‘en’)
17:00:22] VERBOSE[463] logger.c: – Added extension ‘71’ priority 1 to parkedcalls
17:00:22] DEBUG[463] chan_zap.c: Set option AUDIO MODE, value: ON(1) on Zap/32-1
17:00:22] DEBUG[463] chan_zap.c: Not yet hungup… Calling hangup once with icause, and clearing call
17:00:22] DEBUG[463] chan_zap.c: Set option AUDIO MODE, value: OFF(0) on Zap/32-1
17:00:22] VERBOSE[463] logger.c: – Hungup 'Zap/32-1’
17:00:22] VERBOSE[463] logger.c: == Spawn extension (macro-dial, s, 7) exited KEEPALIVE in macro ‘dial’ on 'IAX2/MYTRUNK’
17:00:22] VERBOSE[463] logger.c: == Spawn extension (macro-exten-vm, s, 9) exited KEEPALIVE in macro ‘exten-vm’ on 'IAX2/MYTRUNK’
17:00:22] VERBOSE[463] logger.c: == Spawn extension (from-did-direct, 915, 1) exited KEEPALIVE on 'IAX2/MYTRUNK’
17:01:05] VERBOSE[28432] logger.c: – Stopped music on hold on IAX2/MYTRUNK
17:01:05] VERBOSE[28432] logger.c: – Added extension ‘Zap/32’ priority 1 to park-dial
17:01:05] VERBOSE[28432] logger.c: == Timeout for IAX2/MYTRUNK parked on 71. Returning to park-dial,Zap/32,1
17:01:05] VERBOSE[472] logger.c: – Executing [Zap/32@park-dial:1] Dial(“IAX2/MYTRUNK”, “Zap/32||t”) in new stack
17:01:05] VERBOSE[472] logger.c: – Requested transfer capability: 0x00 - SPEECH
17:01:05] VERBOSE[472] logger.c: – Called 32
17:01:05] DEBUG[28451] chan_zap.c: Queuing frame from PRI_EVENT_PROCEEDING on channel 0/1 span 2
Is there some way I can get Asterisk to dial back by extension in stead of by channel in case of an orphaned parked call, apart from ‘hacking’ the source, which is currently a bit out of my league?