Call forwarding to outside number with recording

We have a few numbers coming into the PBX that we want forwarded out to to outside sales people. They are using a single 800# that distributes the calls to them. We also want to record these call. After some research I setup a custom extension. Any help would be appreciated.

Local/8005551212@outbound-allroutes

This works and records the call. The only issue is the first call rings through fine, but additional calls just ring, and hang up. Here is the debug from the system. It seems it is not pushing out the call. The extension is set for call waiting.

Current setup is incoming route - time conditions - extension - to dial prefix above.

Good call…

-- Executing [s@macro-dialout-trunk:16] ExecIf("Local/8005551212@outbound-allroutes-0001c792;2", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:17] Macro("Local/8005551212@outbound-allroutes-0001c792;2", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Local/8005551212@outbound-allroutes-0001c792;2", "") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("Local/8005551212@outbound-allroutes-0001c792;2", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:19] ExecIf("Local/8005551212@outbound-allroutes-0001c792;2", "0?Set(CONNECTEDLINE(num,i)=8005551212)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("Local/8005551212@outbound-allroutes-0001c792;2", "0?Set(CONNECTEDLINE(name,i)=CID:6785075555)") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("Local/8005551212@outbound-allroutes-0001c792;2", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:22] Dial("Local/8005551212@outbound-allroutes-0001c792;2", "SIP/carrier-outbound/8005551212,300,Tt") in new stack

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/carrier-outbound/8005551212
– SIP/carrier-outbound-0000f8d1 is making progress passing it to Local/8005551212@outbound-allroutes-0001c792;2
– Local/8005551212@outbound-allroutes-0001c792;1 is making progress passing it to SIP/carrierity-inbound-0000f8d0
– SIP/carrier-outbound-0000f8d1 requested media update control 26, passing it to Local/8005551212@outbound-allroutes-0001c792;2
– SIP/carrier-outbound-0000f8d1 answered Local/8005551212@outbound-allroutes-0001c792;2
– Local/8005551212@outbound-allroutes-0001c792;1 answered SIP/carrierity-inbound-0000f8d0
– Executing [h@macro-dialout-trunk:1] Macro(“Local/8005551212@outbound-allroutes-0001c792;2”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/8005551212@outbound-allroutes-0001c792;2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Local/8005551212@outbound-allroutes-0001c792;2”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“Local/8005551212@outbound-allroutes-0001c792;2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘Local/8005551212@outbound-allroutes-0001c792;2’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘Local/8005551212@outbound-allroutes-0001c792;2’
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘Local/8005551212@outbound-allroutes-0001c792;2’ in macro ‘dialout-trunk’
== Spawn extension (outbound-allroutes, 8005551212, 6) exited non-zero on 'Local/8005551212@outbound-allroutes-0001c792;2’
localhost*CLI>

call that just rings…

-- Executing [s@macro-dialout-trunk:15] ExecIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
-- Executing [s@macro-dialout-trunk:16] ExecIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:17] Macro("Local/8005551212@outbound-allroutes-0001c795;2", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Local/8005551212@outbound-allroutes-0001c795;2", "") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:19] ExecIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?Set(CONNECTEDLINE(num,i)=8005551212)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?Set(CONNECTEDLINE(name,i)=CID:6785075555)") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("Local/8005551212@outbound-allroutes-0001c795;2", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:22] Dial("Local/8005551212@outbound-allroutes-0001c795;2", "SIP/carrier-outbound/8005551212,300,Tt") in new stack

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/carrier-outbound/8005551212
localhostCLI>
localhost
CLI>
localhostCLI>
localhost
CLI>
localhostCLI>
localhost
CLI>
localhost*CLI>

== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘Local/8005551212@outbound-allroutes-0001c795;2’ in macro ‘dialout-trunk’
== Spawn extension (macro-dial-one, s, 43) exited non-zero on ‘SIP/carrierity-inbound-0000f8d5’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 16) exited non-zero on ‘SIP/carrierity-inbound-0000f8d5’ in macro ‘exten-vm’
== Spawn extension (from-did-direct, 5001, 2) exited non-zero on ‘SIP/carrierity-inbound-0000f8d5’
– Executing [h@from-did-direct:1] Macro(“SIP/carrierity-inbound-0000f8d5”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/carrierity-inbound-0000f8d5”, “1?theend”) in new stack
== Spawn extension (outbound-allroutes, 8005551212, 6) exited non-zero on ‘Local/8005551212@outbound-allroutes-0001c795;2’
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/carrierity-inbound-0000f8d5”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“SIP/carrierity-inbound-0000f8d5”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/carrierity-inbound-0000f8d5’ in macro ‘hangupcall’
== Spawn extension (from-did-direct, h, 1) exited non-zero on ‘SIP/carrierity-inbound-0000f8d5’
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/carrierity-inbound-0000f8d5

I’ll ignore that this appears to have been produced using a FreePBX dialplan, although that may become a problem later (we don’t support their dialplans here).

You don’t actually have any debug output enabled and your verbosity is probably not up to the level 5 officially required for support. What I think one can reasonably say is the problem lies in the SIP peer, not in Asterisk.

If you were submitting a bug report, you would need to enable the debug logging category, set debug level 5 and verbose level 5, do “sip set debug on”, and capture the logging from the log, rather than the screen. You would then need to to capture everything starting at the first outbound INVITE until the final BYE.

(Some people prefer not to do the sip set debug on, as it produces rather a lot of output. You have to balance the possibility that people won’t look a it because it will take too much time to dig through the logs, against that they may say there still isn’t enough information to work on.)