I executed “sudo amportal chown” and restarted asterisk but the problem is still here (the music on hold works correctly).
[2015-05-23 12:02:25] VERBOSE[9102] netsock2.c: == Using SIP RTP TOS bits 184
[2015-05-23 12:02:25] VERBOSE[9102] netsock2.c: == Using SIP RTP CoS mark 5
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk-sip-SIP-0xxxxxx38:1] Set("SIP/SIP-0xxxxxx38-00000001", "GROUP()=OUT_2") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk-sip-SIP-0xxxxxx38:2] Goto("SIP/SIP-0xxxxxx38-00000001", "from-trunk,0xxxxxx38,1") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Goto (from-trunk,0xxxxxx38,1)
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:1] Set("SIP/SIP-0xxxxxx38-00000001", "__FROM_DID=0xxxxxx38") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:2] Gosub("SIP/SIP-0xxxxxx38-00000001", "app-blacklist-check,s,1()") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@app-blacklist-check:1] GotoIf("SIP/SIP-0xxxxxx38-00000001", "0?blacklisted") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@app-blacklist-check:2] Set("SIP/SIP-0xxxxxx38-00000001", "CALLED_BLACKLIST=1") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@app-blacklist-check:3] Return("SIP/SIP-0xxxxxx38-00000001", "") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:3] Set("SIP/SIP-0xxxxxx38-00000001", "CDR(did)=0xxxxxx38") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:4] ExecIf("SIP/SIP-0xxxxxx38-00000001", "1 ?Set(CALLERID(name)=3xxxxxxxx9)") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:5] Set("SIP/SIP-0xxxxxx38-00000001", "CHANNEL(musicclass)=default") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:6] Set("SIP/SIP-0xxxxxx38-00000001", "__MOHCLASS=default") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:7] Set("SIP/SIP-0xxxxxx38-00000001", "__CALLINGPRES_SV=allowed_not_screened") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:8] Set("SIP/SIP-0xxxxxx38-00000001", "CALLERPRES()=allowed_not_screened") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [0xxxxxx38@from-trunk:9] Goto("SIP/SIP-0xxxxxx38-00000001", "ivr-1,s,1") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Goto (ivr-1,s,1)
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:1] Set("SIP/SIP-0xxxxxx38-00000001", "TIMEOUT_LOOPCOUNT=0") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:2] Set("SIP/SIP-0xxxxxx38-00000001", "INVALID_LOOPCOUNT=0") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:3] Set("SIP/SIP-0xxxxxx38-00000001", "_IVR_CONTEXT_ivr-1=") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:4] Set("SIP/SIP-0xxxxxx38-00000001", "_IVR_CONTEXT=ivr-1") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:5] Set("SIP/SIP-0xxxxxx38-00000001", "__IVR_RETVM=") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:6] GotoIf("SIP/SIP-0xxxxxx38-00000001", "0?skip") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:7] Answer("SIP/SIP-0xxxxxx38-00000001", "") in new stack
[2015-05-23 12:02:25] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:8] Wait("SIP/SIP-0xxxxxx38-00000001", "1") in new stack
[2015-05-23 12:02:26] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:9] Set("SIP/SIP-0xxxxxx38-00000001", "IVR_MSG=custom/ivr_rec_ok") in new stack
[2015-05-23 12:02:26] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:10] Set("SIP/SIP-0xxxxxx38-00000001", "TIMEOUT(digit)=3") in new stack
[2015-05-23 12:02:26] VERBOSE[9440] func_timeout.c: -- Digit timeout set to 3.000
[2015-05-23 12:02:26] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:11] ExecIf("SIP/SIP-0xxxxxx38-00000001", "1?Background(custom/ivr_rec_ok)") in new stack
[2015-05-23 12:02:26] WARNING[9440] file.c: File custom/ivr_rec_ok does not exist in any format
[2015-05-23 12:02:26] WARNING[9440] file.c: Unable to open custom/ivr_rec_ok (format 0x8 (alaw)): No such file or directory
[2015-05-23 12:02:26] WARNING[9440] pbx.c: ast_streamfile failed on SIP/SIP-0xxxxxx38-00000001 for custom/ivr_rec_ok
[2015-05-23 12:02:26] VERBOSE[9440] pbx.c: -- Executing [s@ivr-1:12] WaitExten("SIP/SIP-0xxxxxx38-00000001", "5,") in new stack
[2015-05-23 12:02:31] VERBOSE[9440] pbx.c: == Spawn extension (ivr-1, s, 12) exited non-zero on 'SIP/SIP-0xxxxxx38-00000001'
[2015-05-23 12:02:31] VERBOSE[9440] pbx.c: -- Executing [h@ivr-1:1] Hangup("SIP/SIP-0xxxxxx38-00000001", "") in new stack
[2015-05-23 12:02:31] VERBOSE[9440] pbx.c: == Spawn extension (ivr-1, h, 1) exited non-zero on 'SIP/SIP-0xxxxxx38-00000001'