Forward forwarded call

Hi
I have a problem with forwarding forwarded call. It looks like this.

I call from cellular 603503622 to inbound route 158465414. Then it goes to ringgroup 66414 which has extension 414 but if no one answer it goes to time condition and then to queue. When it is in queue 200 then it goes to extension 400 (secretary phone- Yealink). Secretary sometimes turns on forwarding after 5 rings to her cell and that doesnt work when call comes from queue when no one from ringgroup answers call.
If i make a queue with secretary cell instead of extension number it works but i need to let her decide to forward or not.

– SIP/400-0000003f is ringing
– Local/[email protected];1 is ringing
– Got SIP response 302 “Moved Temporarily” back from 10.42.48.6:5062
– Now forwarding Local/[email protected];2 to ‘Local/[email protected]’ (thanks to SIP/400-0000003f)
[2013-12-12 14:43:10] NOTICE[8353]: app_dial.c:883 do_forward: Not accepting call completion offers from call-forward recipient Local/[email protected];1
– Local/[email protected];1 redirecting info has changed, passing it to SIP/Oxycom-0000003b
– Executing [[email protected]:1] Macro(“Local/[email protected];2”, “user-callerid,LIMIT,”) in new stack
– Executing [[email protected]:1] Set(“Local/[email protected];2”, “AMPUSER=603503622”) in new stack
– Executing [[email protected]:2] GotoIf(“Local/[email protected];2”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“Local/[email protected];2”, “1?Set(REALCALLERIDNUM=603503622)”) in new stack
– Executing [[email protected]:4] Set(“Local/[email protected];2”, “AMPUSER=”) in new stack
– Executing [[email protected]:5] Set(“Local/[email protected];2”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:6] GotoIf(“Local/[email protected];2”, “1?report”) in new stack
– Goto (macro-user-callerid,s,11)
– Executing [[email protected]:11] GotoIf(“Local/[email protected];2”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,24)
– Executing [[email protected]:24] Set(“Local/[email protected];2”, “CALLERID(number)=603503622”) in new stack
– Executing [[email protected]:25] Set(“Local/[email protected];2”, “CALLERID(name)=M0:603503622”) in new stack
– Executing [[email protected]:26] Set(“Local/[email protected];2”, “CHANNEL(language)=pl”) in new stack
– Executing [[email protected]:2] Set(“Local/[email protected];2”, “MOHCLASS=Sanfarm”) in new stack
– Executing [[email protected]:3] Set(“Local/[email protected];2”, “_NODEST=”) in new stack
– Executing [[email protected]:4] Gosub(“Local/[email protected];2”, “sub-record-check,s,1(out,601436221,)”) in new stack
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “1?check”) in new stack
– Goto (sub-record-check,s,6)
– Executing [[email protected]:6] Set(“Local/[email protected];2”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:7] GotoIf(“Local/[email protected];2”, “1?next”) in new stack
– Goto (sub-record-check,s,10)
– Executing [[email protected]:10] ExecIf(“Local/[email protected];2”, “0?Return()”) in new stack
– Executing [[email protected]:11] GotoIf(“Local/[email protected];2”, “1?out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] ExecIf(“Local/[email protected];2”, “0?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [[email protected]:2] GosubIf(“Local/[email protected];2”, “0?record,1(exten,601436221,603503622)”) in new stack
– Executing [[email protected]:3] Return(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:5] Macro(“Local/[email protected];2”, “dialout-trunk,1,601436221,”) in new stack
– Executing [[email protected]:1] Set(“Local/[email protected];2”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]ut-trunk:2] GosubIf(“Local/[email protected];2”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected];2”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“Local/[email protected];2”, “DIAL_NUMBER=601436221”) in new stack
– Executing [[email protected]:5] Set(“Local/[email protected];2”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“Local/[email protected];2”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“Local/[email protected];2”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“Local/[email protected];2”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“Local/[email protected];2”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“Local/[email protected];2”, “outbound-callerid,1”) in new stack
– Executing [[email protected]:1] ExecIf(“Local/[email protected];2”, “1?Set(CALLERPRES()=allowed_not_screened)”) in new stack
– Executing [[email protected]:2] ExecIf(“Local/[email protected];2”, “0?Set(REALCALLERIDNUM=603503622)”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected];2”, “0?normcid”) in new stack
– Executing [[email protected]:4] Set(“Local/[email protected];2”, “USEROUTCID=603503622”) in new stack
– Executing [[email protected]:5] GotoIf(“Local/[email protected];2”, “1?bypass”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [[email protected]:7] Set(“Local/[email protected];2”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“Local/[email protected];2”, “TRUNKOUTCID=+48158101011”) in new stack
– Executing [[email protected]:9] GotoIf(“Local/[email protected];2”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“Local/[email protected];2”, “1?Set(CALLERID(all)=+48158101011)”) in new stack
– Executing [[email protected]:13] ExecIf(“Local/[email protected];2”, “1?Set(CALLERID(all)=603503622)”) in new stack
– Executing [[email protected]:14] ExecIf(“Local/[email protected];2”, “1?Set(CALLERID(all)=+48158465414)”) in new stack
– Executing [[email protected]:15] ExecIf(“Local/[email protected];2”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:12] GosubIf(“Local/[email protected];2”, “1?sub-flp-1,s,1()”) in new stack
– Executing [[email protected]:1] ExecIf(“Local/[email protected];2”, “0?Set(TARGET_FLP_1=436221)”) in new stack
– Executing [[email protected]:2] GotoIf(“Local/[email protected];2”, “0?match”) in new stack
– Executing [[email protected]:3] ExecIf(“Local/[email protected];2”, “0?Set(TARGET_FLP_1=0001436221)”) in new stack
– Executing [[email protected]:4] GotoIf(“Local/[email protected];2”, “0?match”) in new stack
– Executing [[email protected]:5] ExecIf(“Local/[email protected];2”, “0?Set(TARGET_FLP_1=01436221)”) in new stack
– Executing [[email protected]:6] GotoIf(“Local/[email protected];2”, “0?match”) in new stack
– Executing [[email protected]:7] Return(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:13] Set(“Local/[email protected];2”, “OUTNUM=601436221”) in new stack
– Executing [[email protected]:14] Set(“Local/[email protected];2”, “custom=SIP/Oxycom”) in new stack
– Executing [[email protected]:15] ExecIf(“Local/[email protected];2”, “1?Set(DIAL_TRUNK_OPTIONS=M(setmusic^Sanfarm))”) in new stack
– Executing [[email protected]:16] ExecIf(“Local/[email protected];2”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^Sanfarm)M(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“Local/[email protected];2”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“Local/[email protected];2”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“Local/[email protected];2”, “0?Set(CONNECTEDLINE(num,i)=601436221)”) in new stack
– Executing [[email protected]:20] ExecIf(“Local/[email protected];2”, “0?Set(CONNECTEDLINE(name,i)=CID:+48158465414)”) in new stack
– Executing [[email protected]:21] GotoIf(“Local/[email protected];2”, “0?customtrunk”) in new stack
– Executing [[email protected]:22] Dial(“Local/[email protected];2”, “SIP/Oxycom/601436221,300,M(setmusic^Sanfarm)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/Oxycom/601436221
srv-asteriskCLI>
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
– Executing [[email protected]:1] Macro(“SIP/441-0000003d”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/441-0000003d”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/441-0000003d”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/441-0000003d”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/441-0000003d’ in macro ‘hangupcall’
== Spawn extension (macro-dial-one, h, 1) exited non-zero on ‘SIP/441-0000003d’
== Spawn extension (macro-dial-one, s, 45) exited non-zero on ‘SIP/441-0000003d’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 7) exited non-zero on ‘SIP/441-0000003d’ in macro ‘exten-vm’
== Spawn extension (from-internal, 579, 2) exited non-zero on ‘SIP/441-0000003d’
– Remote UNIX connection
– Remote UNIX connection disconnected
[2013-12-12 14:43:42] WARNING[7091]: chan_sip.c:20635 handle_response_invite: Re-invite to non-existing call leg on other UA. SIP dialog ‘[email protected]’. Giving up.
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [[email protected]:23] NoOp(“Local/[email protected];2”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in new stack
– Executing [[email protected]:24] Goto(“Local/[email protected];2”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [[email protected]:1] Set(“Local/[email protected];2”, “RC=34”) in new stack
– Executing [[email protected]:2] Goto(“Local/[email protected];2”, “34,1”) in new stack
– Goto (macro-dialout-trunk,34,1)
– Executing [[email protected]:1] Goto(“Local/[email protected];2”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [[email protected]:3] NoOp(“Local/[email protected];2”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks”) in new stack
– Executing [[email protected]:4] Set(“Local/[email protected];2”, “CALLERID(number)=”) in new stack
– Executing [[email protected]:6] Macro(“Local/[email protected];2”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“Local/[email protected];2”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected];2”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] PlayTones(“Local/[email protected];2”, “congestion”) in new stack
– Local/[email protected];1 is making progress passing it to Local/[email protected];2
– Executing [[email protected]:5] Congestion(“Local/[email protected];2”, “20”) in new stack
– Local/[email protected];1 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [[email protected]:46] ExecIf(“Local/[email protected];2”, “0?Set(DIALSTATUS=)”) in new stack
– Executing [[email protected]:47] GosubIf(“Local/[email protected];2”, “0?s-CONGESTION,1()”) in new stack
– Executing [[email protected]:48] MacroExit(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:8] Set(“Local/[email protected];2”, “SV_DIALSTATUS=CONGESTION”) in new stack
– Executing [[email protected]:9] GosubIf(“Local/[email protected];2”, “0?docfu,1()”) in new stack
– Executing [[email protected]:10] GosubIf(“Local/[email protected];2”, “0?docfb,1()”) in new stack
– Executing [[email protected]:11] Set(“Local/[email protected];2”, “DIALSTATUS=CONGESTION”) in new stack
– Executing [[email protected]:12] ExecIf(“Local/[email protected];2”, “0?MacroExit()”) in new stack
– Executing [[email protected]:13] GotoIf(“Local/[email protected];2”, “1?s-CONGESTION,1”) in new stack
– Goto (macro-exten-vm,s-CONGESTION,1)
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “0?exit,1”) in new stack
– Executing [[email protected]:2] PlayTones(“Local/[email protected];2”, “congestion”) in new stack
– Executing [[email protected]:3] Congestion(“Local/[email protected];2”, “10”) in new stack
– Local/[email protected];1 is circuit-busy
– Nobody picked up in 38000 ms
== Spawn extension (macro-exten-vm, s-CONGESTION, 3) exited non-zero on ‘Local/[email protected];2’ in macro ‘exten-vm’
== Spawn extension (from-internal, 400, 2) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] Hangup(“Local/[email protected];2”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘Local/[email protected];2’
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘Local/[email protected];2’ in macro ‘outisbusy’
== Spawn extension (from-internal, 601436221, 6) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] Hangup(“Local/[email protected];2”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'Local/[email protected];2’
srv-asterisk
CLI>

Regular call forwarding works good. We only have one trunk. Please help…

maybe that will be usefull for someone

*core show channels
Channel Location State Application(Data)
SIP/Oxycom-00000007 [email protected]:8 Up Queue(205,t,)
SIP/Oxycom-0000000c [email protected] Down AppDial((Outgoing Line))
Local/[email protected] [email protected] Ring Dial(SIP/Oxycom/601436221,300,
Local/[email protected] [email protected] Down AppDial((Outgoing Line))
Local/[email protected] [email protected]:1 Ringing AppQueue((Outgoing Line))
Local/[email protected] [email protected]:45 Ring Dial(SIP/400,trM(auto-blkvm))

Do you have the queue setup to allow calls to Call Forward or Follow Me. Its a setting in each queue.

yes
i have Agent Restrictions = Call as Dialed
and btw when i call that queue from local extension then it does forward the call the cellular phone it just doesnt work when the call comes from outside from trunk and goes through ringgroup > queue > extension > forward…
and again it does work when call comes from trunk > ringgroup > queue to cellular

anyone??? i even updated my freepbx and asterisk to 1.8.15 but still no go…
regular forwarding works when calling from outside and then forwarding to outside but doesnt work when calling from outside and then being forwarded to diffrent extension by ringgroup and then being frowarded to outside…

ok got more info, it doesnt have to be a queue, if call comes from tunk to ringgroup > extension > forwarded by phone to other extension > forwarded to cellular wont work. Same thing but at the end forwarded to other local extension works…
it also works this way trunk > ringgroup > extension > forwarded to other extension that picked up call > forwarded to trunk but not by phone but by user - this way it did work but i saw some zombies in log…

I dont have a clue what to do with this

ok my trunk provider found problem!!!
Its Alert-Info gets doubled when forwarding!
http://issues.freepbx.org/browse/FREEPBX-5952
What can i do to make it work??? i dont want to remove alert-info functionality so what can be done?