Follow me ends while in conversation about accepting call

I’m trying out Fellowme() with 5 phones. One to make the call, one to receive the call and three for followme() It is working OK as long as I don’t take to much time to pick-up the phones. While in dialog on the third phone in the row the call is ended in the middle of the conversation. I call phone 5555 with phone 5556

This is cli output

 == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [s@hotdesking:4] Hangup("Local/5558@test-0000002e;2", "") in new stack
  == Spawn extension (hotdesking, s, 4) exited non-zero on 'Local/5558@test-0000002e;2'
    -- <Local/5557@test-0000002d;1> Playback of the call-from file appears to be done.
    -- <Local/5557@test-0000002d;1> Playing '/var/spool/asterisk/followme.1478733326.5819.slin' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of name file appears to be done.
    -- <Local/5557@test-0000002d;1> Playing 'followme/options.gsm' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of the next step file appears to be done.
    -- <Local/5557@test-0000002d;1> We've been waiting for digits longer than we should have.
    -- <Local/5557@test-0000002d;1> Playing 'followme/call-from.gsm' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of the call-from file appears to be done.
    -- <Local/5557@test-0000002d;1> Playing '/var/spool/asterisk/followme.1478733326.5819.slin' (language 'en')
    -- We've hit our timeout for this step. Dropping unanswered calls and starting the next step.
    -- calling Local/5559@test/m
    -- Executing [5559@test:1] Answer("Local/5559@test-0000002f;2", "") in new stack
    -- Local/5559@test-0000002f;1 answered SIP/5558-00000b19
    -- Starting playback of followme/call-from
    -- <Local/5559@test-0000002f;1> Playing 'followme/call-from.gsm' (language 'en')
    -- Executing [5559@test:2] Set("Local/5559@test-0000002f;2", "NUMBER_TO_CALL=5559") in new stack
    -- Executing [5559@test:3] Goto("Local/5559@test-0000002f;2", "hotdesking,s,1") in new stack
    -- Goto (hotdesking,s,1)
    -- Executing [s@hotdesking:1] NoOp("Local/5559@test-0000002f;2", "start hotdesking routine") in new stack
    -- Executing [s@hotdesking:2] GotoIf("Local/5559@test-0000002f;2", "0?1111,1") in new stack
    -- Executing [s@hotdesking:3] Dial("Local/5559@test-0000002f;2", "SIP/5559") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/5559
    -- SIP/5559-00000b1d is ringing
    -- <Local/5559@test-0000002f;1> Playback of the call-from file appears to be done.
    -- <Local/5559@test-0000002f;1> Playing '/var/spool/asterisk/followme.1478733326.5819.slin' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of name file appears to be done.
    -- <Local/5557@test-0000002d;1> Playing 'followme/options.gsm' (language 'en')
    -- <Local/5559@test-0000002f;1> Playback of name file appears to be done.
    -- <Local/5559@test-0000002f;1> Playing 'followme/options.gsm' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of the next step file appears to be done.
    -- <Local/5559@test-0000002f;1> Playback of the next step file appears to be done.
    -- <Local/5557@test-0000002d;1> We've been waiting for digits longer than we should have.
    -- <Local/5557@test-0000002d;1> Playing 'followme/call-from.gsm' (language 'en')
    -- <Local/5557@test-0000002d;1> Playback of the call-from file appears to be done.
    -- <Local/5557@test-0000002d;1> Playing '/var/spool/asterisk/followme.1478733326.5819.slin' (language 'en')
    -- <Local/5559@test-0000002f;1> We've been waiting for digits longer than we should have.
    -- <Local/5559@test-0000002f;1> Playing 'followme/call-from.gsm' (language 'en')
    -- We've hit our timeout for this step. Dropping unanswered calls and starting the next step.
    -- No more steps left.
    -- Stopped music on hold on SIP/5558-00000b19
  == Spawn extension (hotdesking, s, 3) exited non-zero on 'Local/5557@test-0000002d;2'
  == Spawn extension (hotdesking, s, 3) exited non-zero on 'Local/5559@test-0000002f;2'
    -- Executing [5555@test:5] NoOp("SIP/5558-00000b19", "Nobody picked uop the phone") in new stack
    -- Executing [5555@test:6] Hangup("SIP/5558-00000b19", "") in new stack
  == Spawn extension (test, 5555, 6) exited non-zero on 'SIP/5558-00000b19'

I see the followme related voice prompts pass by on the screenfor 5557 and 5559 when no phone is picked up and when the third phone answers the call the connection ends after Press one… in the middle of the conversation. Am I missing a setting or something else or is it just incompatible with the hot desk routine I’m using?

This is what I have in my extensions.conf:

[test]
exten => _XXXX,1,Answer()
exten => _XXXX,n, Set(NUMBER_TO_CALL=${EXTEN})
exten => _XXXX,n,Goto(hotdesking,s,1)

exten => _5555,1,Answer
exten => _5555,2,Dial(SIP/${PHONE${EXTEN}},10)
exten => _5555,3,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?:4:5)
exten => _5555,4,Followme(${PHONE${EXTEN}},a)
exten => _5555,5,NoOp(Nobody picked uop the phone)
exten => _5555,6,Hangup

exten => _5556,1,Answer
exten => _5556,2,Dial(SIP/${PHONE${EXTEN}},10)
exten => _5556,3,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?:4:5)
exten => _5556,4,Followme(${PHONE${EXTEN}},a)
exten => _5556,5,NoOp(Nobody picked uop the phone)
exten => _5556,6,Hangup

[globals]
PHONE5556 => 5556
PHONE5557 => 5557
PHONE5558 => 5558
PHONE5559 => 5559
PHONE1111 => 1111
; etc. etc.


[hotdesking]

exten => s,1(begin), NoOp(start hotdesking routine)
exten => s,n, GotoIf($[ "${NUMBER_TO_CALL}" : "1111"]?1111,1)
exten => s,n, Dial(SIP/${PHONE${NUMBER_TO_CALL}},15)
exten => s,n, Hangup()

I see a couple things wrong with your [test] context.

1, Your _XXXX pattern match priority 2 has a space between the priority and the command, I think that will cause that priority not to execute.

2, You are trying to create a pattern match for extensions 5555 and 5556 but there is no pattern, Remove the _ infront of those extensions if you are not trying to make a pattern match for them or make them into a match like _555[56] which would handle both extensions.

Personally I wouldn’t use a GotoIf, I’d use a ExecIf instead

ExecIf($["${DIALSTATUS}" = “NOANSWER”]?Followme(${PHONE${EXTEN}},a))

Thans for your respons. _5555 and _5556 are indeed not that briliant typos overlooked by me. I always use a space between the priority and the command, except as I’m using a label, and that never causes a problem.

What is the advantage of a ExecIf over GotoIf ?

The dialplan is just shorter and IMHO cleaner without the GotoIf, The FollowMe will still only execute on a no answer response and you don’t have to use hard coded priority numbers (or labels, If you had used labels there instead of priority numbers).

exten => _555[56],1,NoOP()
same =>           n,Dial(SIP/${PHONE${EXTEN}},10)
same =>           n,ExecIf($["${DIALSTATUS}" = "NOANSWER"]?Followme(${PHONE${EXTEN}},a))
same =>           n,Hangup()
1 Like