[asterisk-dev] StopMonitor() reverts itself after SIP transfer: bug or feature?

Kirill 'Big K' Katsnelson kkm at adaptiveai.com
Tue Jan 12 02:19:20 CST 2010


I am recording the first leg of a call using Monitor(), and want to stop 
recording after transfer. Monitor() is called with the "b" option.

After SIP transfer, the dialplan is entered in a context defined by 
TRANSFER_CONTEXT. In that context, I call StopMonitor(). Recording is 
promptly stopped, ${MONITOR_EXEC} is run, a-ok. That is, until the call 
is bridged again, which resumes recording. After the second leg 
completes, ${MONITOR_EXEC} is called again, and the resulting file is 
overwritten: instead of the leg before transfer, I am getting the 
recording of the leg after transfer. D-oh!

Internally. Monitor() with the "b" option sets a channel variable 
AUTO_MONITOR to the string value "wav,<<filename-base>>,X". Presence of 
this variable in a channel causes monitor to engage in ast_bridge_call() 
[features.c]. StopMonitor does not attempt to unset the variable.

This is in 1.6.1.6 that I am upgrading to 1.6.2.0 soon; the same 
AUTO_MONITOR stunt is in the latest trunk code however: once set, once 
checked, never reset.

Is that by design?

  -kkm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5589 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20100112/e70f76b6/attachment.bin 


More information about the asterisk-dev mailing list