[asterisk-users] Starting call recording using a dynamic feature to call a macro
Gareth Blades
list-asterisk at skycomuk.com
Thu Apr 29 05:47:59 CDT 2010
Ignore me I figured it out. The dangers of copy and paste.
After looking through the code line by line I noticed the 'b' parameter
to monitor(). Fine to use before the dial command but shouldnt be used
when a call is in progress.
Gareth Blades wrote:
> I have got call recording working on our 1.4.30 asterisk box together
> with a recording pause ability and being able to play different audio to
> each party at the start and end of the pause. This all works perfectly
> but one wish is to have the audio files have a beep or something in them
> so when you listen later you can tell where the audio was paused.
>
> So I changed things around so that instead of pausing and unpausing the
> recording was stopped and then started again with a new file. An AGI
> script would then join and mix the files together. The problem that I am
> having is that I can stop the recording but when I ran the monitor
> command again the recording didnt start.
> So I decided to start with a simpler test and just have recording off by
> default and then use #2 to start it but that doesnt work either. I
> wondered if it was something to do with the native bridging so set
> canreinvite=no on the test handsets I am using but no change.
>
> Any ideas?
>
>
>
> features.conf
> [applicationmap]
> pauseMonitor => #1,peer/callee,Macro,recpause,monitor-disabled
> startMonitor => #2,peer/callee,Macro,recstart
> unpauseMonitor => #3,peer/callee,Macro,recunpause,monitor-enabled
>
>
> extensions.conf
> [macro-recpause]
> exten => s,1,Playback(disabled)
> exten => s,n,PauseMonitor
>
> [macro-recunpause]
> exten => s,1,Playback(enabled)
> exten => s,n,UnpauseMonitor
>
> [macro-recstart]
> exten => s,1,Set(FNAME=callrec_${MACRO_EXTEN}_${UNIQUEID}_GWTEST_${EPOCH})
> exten => s,n,Monitor(wav,${FNAME},b)
>
> [internal]
> exten => 100,1,Dial(SIP/100,20)
> exten => 110,1,Answer
> exten =>
> 110,n,Set(DYNAMIC_FEATURES=pauseMonitor#unpauseMonitor#startMonitor)
> exten => 110,n,Set(FNAME=callrec_${EXTEN}_${UNIQUEID}_GWTEST_${EPOCH})
> ;exten => 110,n,Monitor(wav,${FNAME},b)
> exten => 110,n,Dial(SIP/110,20)
> exten => 110,n,Hangup
>
>
> log :-
> -- Executing [110 at internal:1] Answer("SIP/100-00000004", "") in new
> stack
> -- Executing [110 at internal:2] Set("SIP/100-00000004",
> "DYNAMIC_FEATURES=pauseMonitor#unpauseMonitor#testfeature#startMonitor")
> in new stack
> -- Executing [110 at internal:3] Set("SIP/100-00000004",
> "FNAME=callrec_110_1272534191.4_GWTEST_1272534191") in new stack
> -- Executing [110 at internal:4] Dial("SIP/100-00000004",
> "SIP/110|20") in new stack
> -- Called 110
> -- SIP/110-00000005 is ringing
> -- SIP/110-00000005 answered SIP/100-00000004
> -- Packet2Packet bridging SIP/100-00000004 and SIP/110-00000005
> -- Packet2Packet bridging SIP/100-00000004 and SIP/110-00000005
> -- Executing [s at macro-recstart:1] Set("SIP/100-00000004",
> "FNAME=callrec_110_1272534191.4_GWTEST_1272534203") in new stack
> -- Executing [s at macro-recstart:2] Monitor("SIP/100-00000004",
> "wav|callrec_110_1272534191.4_GWTEST_1272534203|b") in new stack
> -- Packet2Packet bridging SIP/100-00000004 and SIP/110-00000005
> == Spawn extension (internal, 110, 5) exited non-zero on
> 'SIP/100-00000004'
>
More information about the asterisk-users
mailing list