Hi,
I have built a simple dialplan to be able to do some ring back features with short and long BLF presses. It’s working for most people but there seems there are a small number of calls where, during the BLF transfer, the inbound call goes somewhere and sits on hold for minutes and my client can’t get the callback. I don’t think it’s my dial plan, but it is my first real dial plan so I am sure it could be enhanced to help these types of things happening in future. I am finding it difficult to find out what’s happening by the logs.
Can anyone confirm my notes below or help me understand where the call might be going, and how, perhaps, the same users are having the same issues.
Background - 150 user PBXact in the cloud with 7 sites (about 20 phones (S500’s and S505’s) per site)
More than one site is having the issue, but its only on very few calls. Could it be a user issue, a faulty phone, a broadband issue at the time of the BLF transfer?
BLF buttons are setup to do Attended Transfer
Short Press BLF injects SP before the BLF Value
My dial plan looks for calls with SP in the first two characters, then sends the call to the Extension (minus the first 2 characters) with a ring back time that is less than the extension voicemail timeout. I also inject some additional text so the Ring back shows the user name of who was unavailable.
First my dial plan
[from-internal-custom]
exten => _SPX.,1,Set(origext=${CALLERID(num)})
same => n,Set(origextname=${DB(AMPUSER/${EXTEN:2}/cidname)})
same => n,Set(timeoutd=20) ; set timeout in seconds
same => n,Dial(Local/${EXTEN:2}@from-internal,${timeoutd},m)
same => n,Set(CALLERID(name)=RB:${origextname}-${CALLERID(name)})
same => n,Dial(Local/${EXTEN:2}@from-internal&Local/${origext}@from-internal,90,m); this calls both phones back but finishes at voicemail of destination
same => n,Hangup()`
Here is a list of the logs showing an inbound call yesterday - the full logs will be uploaded after this first post.
Call in to this number 021111111111
[2019-10-09 12:00:29] VERBOSE[11278][C-00002df2] pbx.c: Executing [02111111111@from-trunk:1] Set("IAX2/sbc3-3141", "__DIRECTION=INBOUND") in new stack
from this number 02020202020
[2019-10-09 12:00:29] VERBOSE[11278][C-00002df2] pbx.c: Executing [in@sub-record-check:3] ExecIf("IAX2/sbc3-3141", "11?Set(FROMEXTEN=02020202020)") in new stack
picked up by extension 805 after 5 seconds
[2019-10-09 12:00:34] VERBOSE[11324][C-00002df2] app_dial.c: SIP/805-00009163 answered Local/805@from-queue-00038a83;2
The recorded audio of this call reveals that they speak for about 20 seconds and then 805 puts the call on hold and the call sits listening to hold music for about 5 minutes before they hang up.
It looks like 805 presses the transfer button which puts the call on hold.
[2019-10-09 12:00:57] VERBOSE[11324][C-00002df2] res_musiconhold.c: Started music on hold, class ‘clientname’, on channel ‘Local/805@from-queue-00038a83;2’
[2019-10-09 12:00:57] VERBOSE[12601] chan_sip.c: Extension Changed 805[ext-local] new state Hold for Notify User
Then 805 presses the BLF of 812 a second later (this is where my dial plan code comes in - Short Press)
(I know they don’t need to press the Transfer button first but I am unsure if it makes a difference? or could this be the cause here? We have tested the code and pressing the transfer button before the short press option doesn’t make a difference - please correct me if I am wrong)
(one thing I can see might be an issue below is [SP812@from-internal:1]… should I try to get my code to also remove SP in it so it would look like [812@from-internal:1])
[2019-10-09 12:00:58] VERBOSE[11611][C-00002df4] pbx.c: Executing [SP812@from-internal:1] Set("SIP/805-00009166", "origext=805") in new stack
[2019-10-09 12:00:58] VERBOSE[11611][C-00002df4] pbx.c: Executing [SP812@from-internal:2] Set("SIP/805-00009166", "origextname=812 User Name - Dept") in new stack
[2019-10-09 12:00:58] VERBOSE[11611][C-00002df4] pbx.c: Executing [SP812@from-internal:3] Set("SIP/805-00009166", "timeoutd=20") in new stack
[2019-10-09 12:00:58] VERBOSE[11611][C-00002df4] pbx.c: Executing [SP812@from-internal:4] Dial("SIP/805-00009166", "Local/812@from-internal,20,m") in new stack
by the looks of the code - and this is where I need help…
It looks like 812 answered the call from 805 a few seconds later
[2019-10-09 12:01:00] VERBOSE[11612][C-00002df4] app_dial.c: SIP/812-00009167 answered Local/812@from-internal-00038a8e;2
[2019-10-09 12:01:00] VERBOSE[11611][C-00002df4] app_dial.c: Local/812@from-internal-00038a8e;1 answered SIP/805-00009166
[2019-10-09 12:01:00] VERBOSE[12601] chan_sip.c: Extension Changed 812[ext-local] new state InUse for Notify User
For some reason 812 didn’t get connected to the call, the call didn’t follow the ring back code and sat on hold until they hung up.
I can see 10 seconds later these logs showing 812 and 805 going idle and hangup. This is where I am stuck, I cant work out where the call sent to, and finally is there anything i can enhance my dialplan code with to stop this happening?
[2019-10-09 12:01:10] VERBOSE[12601] chan_sip.c: Extension Changed 812[ext-local] new state Idle for Notify User 811
[2019-10-09 12:01:10] VERBOSE[11611][C-00002df4] bridge_channel.c: Channel SIP/805-00009166 left 'simple_bridge' basic-bridge <a9d6a425-6ab7-481c-8ba3-5486ec1b0510>
[2019-10-09 12:01:10] VERBOSE[12601] chan_sip.c: Extension Changed 812[ext-local] new state Idle for Notify User 831
[2019-10-09 12:01:10] VERBOSE[12601] chan_sip.c: Extension Changed 812[ext-local] new state Idle for Notify User 830
[2019-10-09 12:01:10] VERBOSE[11611][C-00002df4] pbx.c: Spawn extension (from-internal, SP812, 4) exited non-zero on 'SIP/805-00009166'
[2019-10-09 12:01:10] VERBOSE[11611][C-00002df4] pbx.c: Executing [h@from-internal:1] Macro("SIP/805-00009166", "hangupcall") in new stack
I shall paste the full call log in the next few minutes.
Thanks