Yealink Forums
Call Forward on T21P E2 not working - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Phone specific topic (/forumdisplay.php?fid=12)
+---- Forum: T2xP Series (/forumdisplay.php?fid=21)
+---- Thread: Call Forward on T21P E2 not working (/showthread.php?tid=40850)



Call Forward on T21P E2 not working - gradash - 05-16-2017 07:09 AM

I have elastix server, and T21P E2 phones, when i set Allways Forward to EXTERNAL number on destination phone and then call to it, i hear 2 long call sounds on source phone and then busy sounds... and it displays "Service Unaviable"... but it works with INTERNAL short numbers.


RE: Call Forward on T21P E2 not working - jolouis - 05-16-2017 04:18 PM

Is your elastix server setup to allow outbound dialing without a prefix or anything? Check the server logs and see if it shows you why the outbound calls are failing.

(or turn on verbose mode and see what happens on the server when you try to call the phone).

Elastix works by sending the call to the phone, then the phone replies "No forward the call to XXXX number", so the server tries to dial XXXX number and connect original caller to that second call. It sounds like the second call is failing to go through for some reason, and thus you're getting busy as a response (which just means can't connect).


RE: Call Forward on T21P E2 not working - gradash - 05-17-2017 09:22 AM

(05-16-2017 04:18 PM)jolouis Wrote:  Is your elastix server setup to allow outbound dialing without a prefix or anything? Check the server logs and see if it shows you why the outbound calls are failing.

(or turn on verbose mode and see what happens on the server when you try to call the phone).

Elastix works by sending the call to the phone, then the phone replies "No forward the call to XXXX number", so the server tries to dial XXXX number and connect original caller to that second call. It sounds like the second call is failing to go through for some reason, and thus you're getting busy as a response (which just means can't connect).

yes, elastix have outbound prefix - 9, but i add forward number already with prefix


RE: Call Forward on T21P E2 not working - gradash - 05-19-2017 06:29 AM

this is what i found in verbose mode:

== Extension Changed 489[ext-local] new state Ringing for Notify User 643
-- Called SIP/489
-- Connected line update to SIP/643-00000000 prevented.
-- Got SIP response 302 "Moved Temporarily" back from 172.16.201.13:5060
-- Now forwarding SIP/643-00000000 to 'Local/926008034@from-internal' (thanks to SIP/489-00000001)
[2017-05-19 09:21:16] NOTICE[8548][C-00000000]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/926008034@from-internal-00000000;1

-- Executing [926008034@from-internal:1] Macro("Local/926008034@from-internal-00000000;2", "user-callerid,LIMIT,EXTERNAL,") in new stack
== Extension Changed 489[ext-local] new state Idle for Notify User 643


RE: Call Forward on T21P E2 not working - jolouis - 05-19-2017 12:49 PM

(05-19-2017 06:29 AM)gradash Wrote:  this is what i found in verbose mode:

== Extension Changed 489[ext-local] new state Ringing for Notify User 643
-- Called SIP/489
-- Connected line update to SIP/643-00000000 prevented.
-- Got SIP response 302 "Moved Temporarily" back from 172.16.201.13:5060
-- Now forwarding SIP/643-00000000 to 'Local/926008034@from-internal' (thanks to SIP/489-00000001)
[2017-05-19 09:21:16] NOTICE[8548][C-00000000]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/926008034@from-internal-00000000;1

-- Executing [926008034@from-internal:1] Macro("Local/926008034@from-internal-00000000;2", "user-callerid,LIMIT,EXTERNAL,") in new stack
== Extension Changed 489[ext-local] new state Idle for Notify User 643

Perfect now you need the rest of that trace. The last line you pasted is the first step in the PBX trying to call out to the forwarded number... what you need to do is see what happened after that point, as my guess is it will fail when actually trying to dial out.

Have you confirmed that you can dial 926008034 directly from another phone and it rings through properly?


RE: Call Forward on T21P E2 not working - gradash - 05-22-2017 08:00 AM

(05-19-2017 12:49 PM)jolouis Wrote:  Have you confirmed that you can dial 926008034 directly from another phone and it rings through properly?

yep

and here is full log for that call:
Code:
Extension Changed 489[ext-local] new state Ringing for Notify User 643
    -- Called SIP/489
    -- Connected line update to SIP/643-00000000 prevented.
    -- Got SIP response 302 "Moved Temporarily" back from xxx.xx.xxx.xx:5060
    -- Now forwarding SIP/643-00000000 to 'Local/926008034@from-internal' (thanks to SIP/489-00000001)
[2017-05-19 09:21:16] NOTICE[8548][C-00000000]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/926008034@from-internal-00000000;1
    -- Executing [926008034@from-internal:1] Macro("Local/926008034@from-internal-00000000;2", "user-callerid,LIMIT,EXTERNAL,") in new stack
  == Extension Changed 489[ext-local] new state Idle for Notify User 643
    -- Executing [s@macro-user-callerid:1] Set("Local/926008034@from-internal-00000000;2", "TOUCH_MONITOR=1495174876.3") in new stack
    -- Executing [s@macro-user-callerid:2] Set("Local/926008034@from-internal-00000000;2", "AMPUSER=643") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(REALCALLERIDNUM=643)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("Local/926008034@from-internal-00000000;2", "AMPUSER=643") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("Local/926008034@from-internal-00000000;2", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("Local/926008034@from-internal-00000000;2", "AMPUSERCIDNAME=Kristaps Armanis") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("Local/926008034@from-internal-00000000;2", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("Local/926008034@from-internal-00000000;2", "AMPUSERCID=643") in new stack
    -- Executing [s@macro-user-callerid:10] Set("Local/926008034@from-internal-00000000;2", "__DIAL_OPTIONS=tr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("Local/926008034@from-internal-00000000;2", "CALLERID(all)="Kristaps Armanis" <643>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("Local/926008034@from-internal-00000000;2", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(GROUP(concurrency_limit)=643)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("Local/926008034@from-internal-00000000;2", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] Set("Local/926008034@from-internal-00000000;2", "CALLERID(number)=643") in new stack
    -- Executing [s@macro-user-callerid:29] Set("Local/926008034@from-internal-00000000;2", "CALLERID(name)=Kristaps Armanis") in new stack
    -- Executing [s@macro-user-callerid:30] Set("Local/926008034@from-internal-00000000;2", "CDR(cnum)=643") in new stack
    -- Executing [s@macro-user-callerid:31] Set("Local/926008034@from-internal-00000000;2", "CDR(cnam)=Kristaps Armanis") in new stack
    -- Executing [s@macro-user-callerid:32] Set("Local/926008034@from-internal-00000000;2", "CHANNEL(language)=en") in new stack
    -- Executing [926008034@from-internal:2] Set("Local/926008034@from-internal-00000000;2", "MOHCLASS=default") in new stack
    -- Executing [926008034@from-internal:3] Set("Local/926008034@from-internal-00000000;2", "_NODEST=") in new stack
    -- Executing [926008034@from-internal:4] Gosub("Local/926008034@from-internal-00000000;2", "sub-record-check,s,1(out,926008034,)") in new stack
    -- Executing [s@sub-record-check:1] Set("Local/926008034@from-internal-00000000;2", "REC_POLICY_MODE_SAVE=dontcare") in new stack
    -- Executing [s@sub-record-check:2] GotoIf("Local/926008034@from-internal-00000000;2", "1?check") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] Set("Local/926008034@from-internal-00000000;2", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("Local/926008034@from-internal-00000000;2", "1?next") in new stack
    -- Goto (sub-record-check,s,11)
    -- Executing [s@sub-record-check:11] ExecIf("Local/926008034@from-internal-00000000;2", "0?Return()") in new stack
    -- Executing [s@sub-record-check:12] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:13] GotoIf("Local/926008034@from-internal-00000000;2", "1?out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [out@sub-record-check:2] GosubIf("Local/926008034@from-internal-00000000;2", "0?record,1(exten,926008034,643)") in new stack
    -- Executing [out@sub-record-check:3] Return("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [926008034@from-internal:5] Macro("Local/926008034@from-internal-00000000;2", "dialout-trunk,2,26008034,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("Local/926008034@from-internal-00000000;2", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("Local/926008034@from-internal-00000000;2", "DIAL_NUMBER=26008034") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("Local/926008034@from-internal-00000000;2", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("Local/926008034@from-internal-00000000;2", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:8] GotoIf("Local/926008034@from-internal-00000000;2", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:9] GotoIf("Local/926008034@from-internal-00000000;2", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("Local/926008034@from-internal-00000000;2", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(REALCALLERIDNUM=643)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?normcid") in new stack
    -- Executing [s@macro-outbound-callerid:4] Set("Local/926008034@from-internal-00000000;2", "USEROUTCID=643") in new stack
    -- Executing [s@macro-outbound-callerid:5] GotoIf("Local/926008034@from-internal-00000000;2", "0?bypass") in new stack
    -- Executing [s@macro-outbound-callerid:6] Set("Local/926008034@from-internal-00000000;2", "USEROUTCID=67359508") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("Local/926008034@from-internal-00000000;2", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("Local/926008034@from-internal-00000000;2", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("Local/926008034@from-internal-00000000;2", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [s@macro-outbound-callerid:14] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CALLERID(all)=67359508)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:18] Set("Local/926008034@from-internal-00000000;2", "CDR(outbound_cnum)=67359508") in new stack
    -- Executing [s@macro-outbound-callerid:19] Set("Local/926008034@from-internal-00000000;2", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("Local/926008034@from-internal-00000000;2", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("Local/926008034@from-internal-00000000;2", "OUTNUM=26008034") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("Local/926008034@from-internal-00000000;2", "custom=SIP/c4_sip-trunk") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("Local/926008034@from-internal-00000000;2", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("Local/926008034@from-internal-00000000;2", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CONNECTEDLINE(num,i)=26008034)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CONNECTEDLINE(name,i)=CID:67359508)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("Local/926008034@from-internal-00000000;2", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("Local/926008034@from-internal-00000000;2", "SIP/c4_sip-trunk/26008034,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/c4_sip-trunk/26008034
[2017-05-19 09:21:17] WARNING[8522][C-00000000]: chan_sip.c:23294 handle_response_invite: Received response: "Forbidden" from '<sip:67557568@xxx.xxx.xxx.xxx>;tag=as4971449e'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:23] NoOp("Local/926008034@from-internal-00000000;2", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
    -- Executing [s@macro-dialout-trunk:24] GotoIf("Local/926008034@from-internal-00000000;2", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("Local/926008034@from-internal-00000000;2", "RC=21") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("Local/926008034@from-internal-00000000;2", "21,1") in new stack
    -- Goto (macro-dialout-trunk,21,1)
    -- Executing [21@macro-dialout-trunk:1] Goto("Local/926008034@from-internal-00000000;2", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] NoOp("Local/926008034@from-internal-00000000;2", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:2] Set("Local/926008034@from-internal-00000000;2", "CALLERID(number)=643") in new stack
    -- Executing [926008034@from-internal:6] Macro("Local/926008034@from-internal-00000000;2", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("Local/926008034@from-internal-00000000;2", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("Local/926008034@from-internal-00000000;2", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <Local/926008034@from-internal-00000000;2> Playing 'all-circuits-busy-now.gsm' (language 'en')
    -- Local/926008034@from-internal-00000000;1 is making progress passing it to SIP/643-00000000
    -- <Local/926008034@from-internal-00000000;2> Playing 'pls-try-call-later.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:5] Congestion("Local/926008034@from-internal-00000000;2", "20") in new stack
    -- Local/926008034@from-internal-00000000;1 is circuit-busy
[2017-05-19 09:21:21] WARNING[8549][C-00000000]: channel.c:4863 ast_prod: Prodding channel 'Local/926008034@from-internal-00000000;2' failed
  == Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'Local/926008034@from-internal-00000000;2' in macro 'outisbusy'
  == Spawn extension (from-internal, 926008034, 6) exited non-zero on 'Local/926008034@from-internal-00000000;2'
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dial-one:44] ExecIf("SIP/643-00000000", "0?MacroExit()") in new stack
    -- Executing [h@from-internal:1] Hangup("Local/926008034@from-internal-00000000;2", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/926008034@from-internal-00000000;2'
    -- Executing [s@macro-dial-one:45] ExecIf("SIP/643-00000000", "0?Set(DIALSTATUS=)") in new stack
    -- Executing [s@macro-dial-one:46] GosubIf("SIP/643-00000000", "0?s-CONGESTION,1()") in new stack
    -- Executing [s@macro-dial-one:47] MacroExit("SIP/643-00000000", "") in new stack
    -- Executing [s@macro-exten-vm:8] Set("SIP/643-00000000", "SV_DIALSTATUS=CONGESTION") in new stack
[2017-05-19 09:21:21] ERROR[8549][C-00000000]: cdr_csv.c:314 csv_log: Unable to re-open master file /var/log/asterisk//cdr-csv//Master.csv : Permission denied
    -- Executing [s@macro-exten-vm:9] GosubIf("SIP/643-00000000", "0?docfu,1()") in new stack
    -- Executing [s@macro-exten-vm:10] GosubIf("SIP/643-00000000", "0?docfb,1()") in new stack
    -- Executing [s@macro-exten-vm:11] Set("SIP/643-00000000", "DIALSTATUS=CONGESTION") in new stack
    -- Executing [s@macro-exten-vm:12] ExecIf("SIP/643-00000000", "0?MacroExit()") in new stack
    -- Executing [s@macro-exten-vm:13] GotoIf("SIP/643-00000000", "1?s-CONGESTION,1") in new stack
    -- Goto (macro-exten-vm,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-exten-vm:1] GotoIf("SIP/643-00000000", "0?exit,1") in new stack
    -- Executing [s-CONGESTION@macro-exten-vm:2] PlayTones("SIP/643-00000000", "congestion") in new stack
[2017-05-19 09:21:21] ERROR[8549][C-00000000]: cdr_sqlite3_custom.c:267 write_cdr: attempt to write a readonly database. SQL: INSERT INTO cdr (calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,dis​position,amaflags,accountcode,uniqueid,userfield,test,src,dst) VALUES ('2017-05-19 09:21:16','643','from-internal','Local/926008034@from-internal-00000000;2','SIP/c4_sip-trunk-00000002','Congestion','20','5','0','FAILED','DOCUMENTATION','','1495174876.3','​','','643','926008034').
    -- Executing [s-CONGESTION@macro-exten-vm:3] Congestion("SIP/643-00000000", "10") in new stack
  == Spawn extension (macro-exten-vm, s-CONGESTION, 3) exited non-zero on 'SIP/643-00000000' in macro 'exten-vm'
  == Spawn extension (from-internal, 489, 2) exited non-zero on 'SIP/643-00000000'
    -- Executing [h@from-internal:1] Hangup("SIP/643-00000000", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/643-00000000'
[2017-05-19 09:21:21] ERROR[8548][C-00000000]: cdr_csv.c:314 csv_log: Unable to re-open master file /var/log/asterisk//cdr-csv//Master.csv : Permission denied
[2017-05-19 09:21:21] ERROR[8548][C-00000000]: cdr_sqlite3_custom.c:267 write_cdr: attempt to write a readonly database. SQL: INSERT INTO cdr (calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,dis​position,amaflags,accountcode,uniqueid,userfield,test,src,dst) VALUES ('2017-05-19 09:21:16','"Vasya Pupkin" <643>','from-internal','SIP/643-00000000','SIP/489-00000001','Congestion','10','5','0','FAILED','DOCUMENTATION','','1495174876.0','​','','643','489').
[2017-05-19 09:21:51] WARNING[8522]: db.c:332 ast_db_put: Couldn't execute statment: SQL logic error or missing database
[2017-05-19 09:23:10] WARNING[8522]: db.c:332 ast_db_put: Couldn't execute statment: SQL logic error or missing database
^CAsterisk cleanly ending (0).
Executing last minute cleanups
  == Destroying musiconhold processes
  == Manager unregistered action DBGet
  == Manager unregistered action DBPut
  == Manager unregistered action DBDel
  == Manager unregistered action DBDelTree



RE: Call Forward on T21P E2 not working - gradash - 05-22-2017 08:00 AM

(05-19-2017 12:49 PM)jolouis Wrote:  Have you confirmed that you can dial 926008034 directly from another phone and it rings through properly?

yep


RE: Call Forward on T21P E2 not working - gradash - 05-22-2017 08:05 AM

here is full log for this call:
Code:
== Extension Changed 489[ext-local] new state Ringing for Notify User 643
    -- Called SIP/489
    -- Connected line update to SIP/643-00000000 prevented.
    -- Got SIP response 302 "Moved Temporarily" back from 222.22.222.22:5060
    -- Now forwarding SIP/643-00000000 to 'Local/926008034@from-internal' (thanks to SIP/489-00000001)
[2017-05-19 09:21:16] NOTICE[8548][C-00000000]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/926008034@from-internal-00000000;1
    -- Executing [926008034@from-internal:1] Macro("Local/926008034@from-internal-00000000;2", "user-callerid,LIMIT,EXTERNAL,") in new stack
  == Extension Changed 489[ext-local] new state Idle for Notify User 643
    -- Executing [s@macro-user-callerid:1] Set("Local/926008034@from-internal-00000000;2", "TOUCH_MONITOR=1495174876.3") in new stack
    -- Executing [s@macro-user-callerid:2] Set("Local/926008034@from-internal-00000000;2", "AMPUSER=643") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(REALCALLERIDNUM=643)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("Local/926008034@from-internal-00000000;2", "AMPUSER=643") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("Local/926008034@from-internal-00000000;2", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("Local/926008034@from-internal-00000000;2", "AMPUSERCIDNAME=Vasja Pupkin") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("Local/926008034@from-internal-00000000;2", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("Local/926008034@from-internal-00000000;2", "AMPUSERCID=643") in new stack
    -- Executing [s@macro-user-callerid:10] Set("Local/926008034@from-internal-00000000;2", "__DIAL_OPTIONS=tr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("Local/926008034@from-internal-00000000;2", "CALLERID(all)="Vasja Pupkin" <643>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("Local/926008034@from-internal-00000000;2", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(GROUP(concurrency_limit)=643)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("Local/926008034@from-internal-00000000;2", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] Set("Local/926008034@from-internal-00000000;2", "CALLERID(number)=643") in new stack
    -- Executing [s@macro-user-callerid:29] Set("Local/926008034@from-internal-00000000;2", "CALLERID(name)=Vasja Pupkin") in new stack
    -- Executing [s@macro-user-callerid:30] Set("Local/926008034@from-internal-00000000;2", "CDR(cnum)=643") in new stack
    -- Executing [s@macro-user-callerid:31] Set("Local/926008034@from-internal-00000000;2", "CDR(cnam)=Vasja Pupkin") in new stack
    -- Executing [s@macro-user-callerid:32] Set("Local/926008034@from-internal-00000000;2", "CHANNEL(language)=en") in new stack
    -- Executing [926008034@from-internal:2] Set("Local/926008034@from-internal-00000000;2", "MOHCLASS=default") in new stack
    -- Executing [926008034@from-internal:3] Set("Local/926008034@from-internal-00000000;2", "_NODEST=") in new stack
    -- Executing [926008034@from-internal:4] Gosub("Local/926008034@from-internal-00000000;2", "sub-record-check,s,1(out,926008034,)") in new stack
    -- Executing [s@sub-record-check:1] Set("Local/926008034@from-internal-00000000;2", "REC_POLICY_MODE_SAVE=dontcare") in new stack
    -- Executing [s@sub-record-check:2] GotoIf("Local/926008034@from-internal-00000000;2", "1?check") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] Set("Local/926008034@from-internal-00000000;2", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("Local/926008034@from-internal-00000000;2", "1?next") in new stack
    -- Goto (sub-record-check,s,11)
    -- Executing [s@sub-record-check:11] ExecIf("Local/926008034@from-internal-00000000;2", "0?Return()") in new stack
    -- Executing [s@sub-record-check:12] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:13] GotoIf("Local/926008034@from-internal-00000000;2", "1?out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [out@sub-record-check:2] GosubIf("Local/926008034@from-internal-00000000;2", "0?record,1(exten,926008034,643)") in new stack
    -- Executing [out@sub-record-check:3] Return("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [926008034@from-internal:5] Macro("Local/926008034@from-internal-00000000;2", "dialout-trunk,2,26008034,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("Local/926008034@from-internal-00000000;2", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("Local/926008034@from-internal-00000000;2", "DIAL_NUMBER=26008034") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("Local/926008034@from-internal-00000000;2", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("Local/926008034@from-internal-00000000;2", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:8] GotoIf("Local/926008034@from-internal-00000000;2", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:9] GotoIf("Local/926008034@from-internal-00000000;2", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("Local/926008034@from-internal-00000000;2", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("Local/926008034@from-internal-00000000;2", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(REALCALLERIDNUM=643)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?normcid") in new stack
    -- Executing [s@macro-outbound-callerid:4] Set("Local/926008034@from-internal-00000000;2", "USEROUTCID=643") in new stack
    -- Executing [s@macro-outbound-callerid:5] GotoIf("Local/926008034@from-internal-00000000;2", "0?bypass") in new stack
    -- Executing [s@macro-outbound-callerid:6] Set("Local/926008034@from-internal-00000000;2", "USEROUTCID=67359508") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("Local/926008034@from-internal-00000000;2", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("Local/926008034@from-internal-00000000;2", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("Local/926008034@from-internal-00000000;2", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [s@macro-outbound-callerid:14] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CALLERID(all)=67359508)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:18] Set("Local/926008034@from-internal-00000000;2", "CDR(outbound_cnum)=67359508") in new stack
    -- Executing [s@macro-outbound-callerid:19] Set("Local/926008034@from-internal-00000000;2", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("Local/926008034@from-internal-00000000;2", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("Local/926008034@from-internal-00000000;2", "OUTNUM=26008034") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("Local/926008034@from-internal-00000000;2", "custom=SIP/c4_sip-trunk") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("Local/926008034@from-internal-00000000;2", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("Local/926008034@from-internal-00000000;2", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("Local/926008034@from-internal-00000000;2", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CONNECTEDLINE(num,i)=26008034)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("Local/926008034@from-internal-00000000;2", "1?Set(CONNECTEDLINE(name,i)=CID:67359508)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("Local/926008034@from-internal-00000000;2", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("Local/926008034@from-internal-00000000;2", "SIP/c4_sip-trunk/26008034,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/c4_sip-trunk/26008034
[2017-05-19 09:21:17] WARNING[8522][C-00000000]: chan_sip.c:23294 handle_response_invite: Received response: "Forbidden" from '<sip:67555508@111.11.111.11>;tag=as4971449e'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:23] NoOp("Local/926008034@from-internal-00000000;2", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
    -- Executing [s@macro-dialout-trunk:24] GotoIf("Local/926008034@from-internal-00000000;2", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("Local/926008034@from-internal-00000000;2", "RC=21") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("Local/926008034@from-internal-00000000;2", "21,1") in new stack
    -- Goto (macro-dialout-trunk,21,1)
    -- Executing [21@macro-dialout-trunk:1] Goto("Local/926008034@from-internal-00000000;2", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] NoOp("Local/926008034@from-internal-00000000;2", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:2] Set("Local/926008034@from-internal-00000000;2", "CALLERID(number)=643") in new stack
    -- Executing [926008034@from-internal:6] Macro("Local/926008034@from-internal-00000000;2", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("Local/926008034@from-internal-00000000;2", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("Local/926008034@from-internal-00000000;2", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("Local/926008034@from-internal-00000000;2", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("Local/926008034@from-internal-00000000;2", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <Local/926008034@from-internal-00000000;2> Playing 'all-circuits-busy-now.gsm' (language 'en')
    -- Local/926008034@from-internal-00000000;1 is making progress passing it to SIP/643-00000000
    -- <Local/926008034@from-internal-00000000;2> Playing 'pls-try-call-later.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:5] Congestion("Local/926008034@from-internal-00000000;2", "20") in new stack
    -- Local/926008034@from-internal-00000000;1 is circuit-busy
[2017-05-19 09:21:21] WARNING[8549][C-00000000]: channel.c:4863 ast_prod: Prodding channel 'Local/926008034@from-internal-00000000;2' failed
  == Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'Local/926008034@from-internal-00000000;2' in macro 'outisbusy'
  == Spawn extension (from-internal, 926008034, 6) exited non-zero on 'Local/926008034@from-internal-00000000;2'
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dial-one:44] ExecIf("SIP/643-00000000", "0?MacroExit()") in new stack
    -- Executing [h@from-internal:1] Hangup("Local/926008034@from-internal-00000000;2", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/926008034@from-internal-00000000;2'
    -- Executing [s@macro-dial-one:45] ExecIf("SIP/643-00000000", "0?Set(DIALSTATUS=)") in new stack
    -- Executing [s@macro-dial-one:46] GosubIf("SIP/643-00000000", "0?s-CONGESTION,1()") in new stack
    -- Executing [s@macro-dial-one:47] MacroExit("SIP/643-00000000", "") in new stack
    -- Executing [s@macro-exten-vm:8] Set("SIP/643-00000000", "SV_DIALSTATUS=CONGESTION") in new stack
[2017-05-19 09:21:21] ERROR[8549][C-00000000]: cdr_csv.c:314 csv_log: Unable to re-open master file /var/log/asterisk//cdr-csv//Master.csv : Permission denied
    -- Executing [s@macro-exten-vm:9] GosubIf("SIP/643-00000000", "0?docfu,1()") in new stack
    -- Executing [s@macro-exten-vm:10] GosubIf("SIP/643-00000000", "0?docfb,1()") in new stack
    -- Executing [s@macro-exten-vm:11] Set("SIP/643-00000000", "DIALSTATUS=CONGESTION") in new stack
    -- Executing [s@macro-exten-vm:12] ExecIf("SIP/643-00000000", "0?MacroExit()") in new stack
    -- Executing [s@macro-exten-vm:13] GotoIf("SIP/643-00000000", "1?s-CONGESTION,1") in new stack
    -- Goto (macro-exten-vm,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-exten-vm:1] GotoIf("SIP/643-00000000", "0?exit,1") in new stack
    -- Executing [s-CONGESTION@macro-exten-vm:2] PlayTones("SIP/643-00000000", "congestion") in new stack
[2017-05-19 09:21:21] ERROR[8549][C-00000000]: cdr_sqlite3_custom.c:267 write_cdr: attempt to write a readonly database. SQL: INSERT INTO cdr (calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,dis​position,amaflags,accountcode,uniqueid,userfield,test,src,dst) VALUES ('2017-05-19 09:21:16','643','from-internal','Local/926008034@from-internal-00000000;2','SIP/c4_sip-trunk-00000002','Congestion','20','5','0','FAILED','DOCUMENTATION','','1495174876.3','​','','643','926008034').
    -- Executing [s-CONGESTION@macro-exten-vm:3] Congestion("SIP/643-00000000", "10") in new stack
  == Spawn extension (macro-exten-vm, s-CONGESTION, 3) exited non-zero on 'SIP/643-00000000' in macro 'exten-vm'
  == Spawn extension (from-internal, 489, 2) exited non-zero on 'SIP/643-00000000'
    -- Executing [h@from-internal:1] Hangup("SIP/643-00000000", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/643-00000000'
[2017-05-19 09:21:21] ERROR[8548][C-00000000]: cdr_csv.c:314 csv_log: Unable to re-open master file /var/log/asterisk//cdr-csv//Master.csv : Permission denied
[2017-05-19 09:21:21] ERROR[8548][C-00000000]: cdr_sqlite3_custom.c:267 write_cdr: attempt to write a readonly database. SQL: INSERT INTO cdr (calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,dis​position,amaflags,accountcode,uniqueid,userfield,test,src,dst) VALUES ('2017-05-19 09:21:16','"Vasja Pupkin" <643>','from-internal','SIP/643-00000000','SIP/489-00000001','Congestion','10','5','0','FAILED','DOCUMENTATION','','1495174876.0','​','','643','489').
[2017-05-19 09:21:51] WARNING[8522]: db.c:332 ast_db_put: Couldn't execute statment: SQL logic error or missing database
[2017-05-19 09:23:10] WARNING[8522]: db.c:332 ast_db_put: Couldn't execute statment: SQL logic error or missing database



RE: Call Forward on T21P E2 not working - jolouis - 05-23-2017 09:44 PM

Taken from your log:
Code:
-- Called SIP/c4_sip-trunk/26008034
[2017-05-19 09:21:17] WARNING[8522][C-00000000]: chan_sip.c:23294 handle_response_invite: Received response: "Forbidden" from '<sip:67557568@xxx.xxx.xxx.xxx>;tag=as4971449e'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:23] NoOp("Local/926008034@from-internal-00000000;2", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack

That indicates the system tried to dial out to the forwarded number, assuming a prefix of 9 (which the system removed), and the far end repled "Forbidden" and refused the call. So nothing wrong with the phone or the call forward, it's a problem with the PBX not being able to dial the number.