[asterisk-bugs] [Asterisk 0011764]: MixMonitor doesn't work right with SIP and FLASH on FXS channels

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jan 15 04:50:57 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11764 
====================================================================== 
Reported By:                viniciusfontes
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11764
Category:                   Applications/app_mixmonitor
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.17 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-14-2008 04:20 CST
Last Modified:              01-15-2008 04:50 CST
====================================================================== 
Summary:                    MixMonitor doesn't work right with SIP and FLASH on
FXS channels
Description: 
I want to record *every* call in my Asterisk box, so I use the MixMonitor()
application like this is my extensions.conf:

exten => _0X.,1,Answer()
exten =>
_0X.,n,MixMonitor(${CALLERID(num)}-${STRFTIME(${EPOCH},America/Sao_Paulo,%Y-%m-%d-%H-%M-%S)}-${EXTEN}.wav)
exten => _0X.,n,Dial(IAX2/pabx-canall/${EXTEN},60,tT)

exten => _2XX,1,Answer() exten =>
_2XX,n,MixMonitor(${CALLERID(num)}-${STRFTIME(${EPOCH},America/Sao_Paulo,%Y-%m-%d-%H-%M-%S)}-${EXTEN}.wav)
exten => _2XX,n,Dial(SIP/${EXTEN},60,tT)

The scenario is as following:

1) 201 asks operator for an external call, hangs up. The audio file is
stored correctly. From the CLI:

[Jan 8 16:20:19] -- Executing [200 at default:1] Answer("SIP/201-081d8740",
"") in new stack
[Jan 8 16:20:19] -- Executing [200 at default:2]
MixMonitor("SIP/201-081d8740", "201-2008-01-08-16-20-19-200.wav") in new
stack
[Jan 8 16:20:19] -- Executing [200 at default:3] Dial("SIP/201-081d8740",
"SIP/200|60|tT") in new stack
[Jan 8 16:20:19] == Begin MixMonitor Recording SIP/201-081d8740
[Jan 8 16:20:19] -- Called 200
[Jan 8 16:20:19] -- SIP/200-081fac90 is ringing
[Jan 8 16:20:23] -- SIP/200-081fac90 answered SIP/201-081d8740
[Jan 8 16:20:27] == Spawn extension (default, 200, 3) exited non-zero on
'SIP/201-081d8740'
[Jan 8 16:20:27] == End MixMonitor Recording SIP/201-081d8740



2) 200 dials to the PSTN. So far so good.

[Jan 8 16:20:35] -- Executing [021047020 at default:1]
Answer("SIP/200-081d8740", "") in new stack
[Jan 8 16:20:35] -- Executing [021047020 at default:2]
MixMonitor("SIP/200-081d8740", "200-2008-01-08-16-20-35-021047020.wav") in
new stack
[Jan 8 16:20:35] -- Executing [021047020 at default:3]
Dial("SIP/200-081d8740", "IAX2/pabx-canall/021047020|60|tT") in new stack
[Jan 8 16:20:35] == Begin MixMonitor Recording SIP/200-081d8740
[Jan 8 16:20:35] -- Called pabx-canall/021047020
[Jan 8 16:20:35] -- Call accepted by 200.248.136.140 (format alaw)
[Jan 8 16:20:35] -- Format for call is alaw [Jan 8 16:20:35] --
IAX2/pabx-canall-16384 answered SIP/200-081d8740



3) Extension 200 is a Polycom SoundPoint 301 IP phone. It presses the
Transfer button, putting 021047020 in hold and dialing to 201 who answers
the call:

[Jan 8 16:20:45] -- Started music on hold, class 'default', on
IAX2/pabx-canall-16384
[Jan 8 16:20:51] -- Executing [201 at default:1] Answer("SIP/200-081fac90",
"") in new stack
[Jan 8 16:20:51] -- Executing [201 at default:2]
MixMonitor("SIP/200-081fac90", "200-2008-01-08-16-20-51-201.wav") in new
stack
[Jan 8 16:20:51] -- Executing [201 at default:3] Dial("SIP/200-081fac90",
"SIP/201|60|tT") in new stack
[Jan 8 16:20:51] -- Called 201
[Jan 8 16:20:51] == Begin MixMonitor Recording SIP/200-081fac90
[Jan 8 16:20:51] -- SIP/201-081edf80 is ringing
[Jan 8 16:20:54] -- SIP/201-081edf80 answered SIP/200-081fac90



4) The operator says "here's your call" to 201 and presses Transfer on the
phone once more. The call is transferred correctly, but:
[Jan 8 16:20:57] -- Stopped music on hold on IAX2/pabx-canall-16384
[Jan 8 16:20:57] == Spawn extension (default, 021047020, 3) exited
non-zero on 'SIP/200-081d8740'
[Jan 8 16:20:57] == End MixMonitor Recording SIP/200-081d8740
[Jan 8 16:20:57] == End MixMonitor Recording SIP/200-081fac90


Notice that all the MixMonitor processes stopped!

5) 201 finally hangs up the phone:

[Jan 8 16:21:45] == Spawn extension (default, 201, 3) exited non-zero on
'IAX2/pabx-canall-16384'
[Jan 8 16:21:45] -- Hungup 'IAX2/pabx-canall-16384'



So, all the audio regarding the important part -- the call to the PSTN
itself -- is simply lost.

Although I'm using SIP in this example, the very same thing happens when I
use a TDM2400 with FXS channels and press the FLASH button on the phone to
transfer.

I noticed that if I use Asterisk's built-in transfer features (atxfer,
blindxfer) everything works fine.

Any ideas on workarounds will be welcome as well (IE mapping the FLASH on
the analog phone to the sequence configured on features.conf).
====================================================================== 

---------------------------------------------------------------------- 
 viniciusfontes - 01-15-08 04:50  
---------------------------------------------------------------------- 
Unfortunely happened pretty much the same. Here is my extensions.conf:

[default]

exten =>
_0X.,1,MixMonitor(${CALLERID(num)}-${STRFTIME(${EPOCH},America/Sao_Paulo,%Y-%m-%d-%H-%M-%S)}-${EXTEN}.wav)
exten => _0X.,n,Dial(Local/${EXTEN}@calls/n)

exten =>
_2XX,1,MixMonitor(${CALLERID(num)}-${STRFTIME(${EPOCH},America/Sao_Paulo,%Y-%m-%d-%H-%M-%S)}-${EXTEN}.wav)
exten => _2XX,n,Dial(Local/${EXTEN}@calls/n)


[calls]

exten => _0X.,1,Dial(IAX2/pabx-canall/${EXTEN},60,tT)

exten => _2XX,1,Dial(SIP/${EXTEN},60,tT)



1) 201 calls 200 (the operator) asking to make an external call:

[Jan 15 08:47:21]     -- Executing [200 at default:1]
MixMonitor("SIP/201-081da258", "201-2008-01-15-08-47-21-200.wav") in new
stack
[Jan 15 08:47:21]     -- Executing [200 at default:2]
Dial("SIP/201-081da258", "Local/200 at calls/n") in new stack
[Jan 15 08:47:21]     -- Called 200 at calls/n
[Jan 15 08:47:21]   == Begin MixMonitor Recording SIP/201-081da258
[Jan 15 08:47:21]     -- Executing [200 at calls:1]
Dial("Local/200 at calls-8d08,2", "SIP/200|60|tT") in new stack
[Jan 15 08:47:21]     -- Called 200
[Jan 15 08:47:21] NOTICE[3663]: chan_iax2.c:5258 register_verify: No
registration for peer 'iaxmodem0' (from 127.0.0.1)
[Jan 15 08:47:21] NOTICE[3666]: chan_iax2.c:5258 register_verify: No
registration for peer 'iaxmodem1' (from 127.0.0.1)
[Jan 15 08:47:21]     -- SIP/200-081e6a68 is ringing
[Jan 15 08:47:21]     -- Local/200 at calls-8d08,1 is ringing
[Jan 15 08:47:29]     -- SIP/200-081e6a68 answered Local/200 at calls-8d08,2
[Jan 15 08:47:29]     -- Local/200 at calls-8d08,1 stopped sounds
[Jan 15 08:47:29]     -- Local/200 at calls-8d08,1 answered SIP/201-081da258
[Jan 15 08:47:32]   == Spawn extension (calls, 200, 1) exited non-zero on
'Local/200 at calls-8d08,2'
[Jan 15 08:47:32]   == Spawn extension (default, 200, 2) exited non-zero
on 'SIP/201-081da258'
[Jan 15 08:47:32]   == End MixMonitor Recording SIP/201-081da258

The audio file is recorded ok.

2) 200 makes the external call, puts on hold

[Jan 15 08:47:44]     -- Executing [021047020 at default:1]
MixMonitor("SIP/200-081da258", "200-2008-01-15-08-47-44-021047020.wav") in
new stack
[Jan 15 08:47:44]     -- Executing [021047020 at default:2]
Dial("SIP/200-081da258", "Local/021047020 at calls/n") in new stack
[Jan 15 08:47:44]   == Begin MixMonitor Recording SIP/200-081da258
[Jan 15 08:47:44]     -- Called 021047020 at calls/n
[Jan 15 08:47:44]     -- Executing [021047020 at calls:1]
Dial("Local/021047020 at calls-7cd0,2", "IAX2/pabx-canall/021047020|60|tT") in
new stack
[Jan 15 08:47:44]     -- Called pabx-canall/021047020
[Jan 15 08:47:44]     -- Call accepted by 200.248.136.140 (format alaw)
[Jan 15 08:47:44]     -- Format for call is alaw
[Jan 15 08:47:44]     -- IAX2/pabx-canall-16384 answered
Local/021047020 at calls-7cd0,2
[Jan 15 08:47:44]     -- Local/021047020 at calls-7cd0,1 answered
SIP/200-081da258
[Jan 15 08:47:55]     -- Started music on hold, class 'default', on
Local/021047020 at calls-7cd0,1


3) 200 dials to 201 and transfers the call:

[Jan 15 08:48:01]     -- Executing [201 at default:1]
MixMonitor("SIP/200-081f1c78", "200-2008-01-15-08-48-01-201.wav") in new
stack
[Jan 15 08:48:01]     -- Executing [201 at default:2]
Dial("SIP/200-081f1c78", "Local/201 at calls/n") in new stack
[Jan 15 08:48:01]   == Begin MixMonitor Recording SIP/200-081f1c78
[Jan 15 08:48:01]     -- Called 201 at calls/n
[Jan 15 08:48:01]     -- Executing [201 at calls:1]
Dial("Local/201 at calls-6203,2", "SIP/201|60|tT") in new stack
[Jan 15 08:48:01]     -- Called 201
[Jan 15 08:48:01]     -- SIP/201-08203c10 is ringing
[Jan 15 08:48:01]     -- Local/201 at calls-6203,1 is ringing
[Jan 15 08:48:04]     -- SIP/201-08203c10 answered Local/201 at calls-6203,2
[Jan 15 08:48:04]     -- Local/201 at calls-6203,1 stopped sounds
[Jan 15 08:48:04]     -- Local/201 at calls-6203,1 answered SIP/200-081f1c78
[Jan 15 08:48:09]     -- Stopped music on hold on
Local/021047020 at calls-7cd0,1
[Jan 15 08:48:09]   == Spawn extension (default, 021047020, 2) exited
non-zero on 'SIP/200-081da258'
[Jan 15 08:48:09]   == End MixMonitor Recording SIP/200-081f1c78
[Jan 15 08:48:09]   == End MixMonitor Recording SIP/200-081da258

Again, the MixMonitor processes are ended.

4) Finally 201 hangs up:

[Jan 15 08:48:16] NOTICE[3668]: chan_iax2.c:5258 register_verify: No
registration for peer 'iaxmodem0' (from 127.0.0.1)
[Jan 15 08:48:16] NOTICE[3664]: chan_iax2.c:5258 register_verify: No
registration for peer 'iaxmodem1' (from 127.0.0.1)
[Jan 15 08:48:20]     -- Hungup 'IAX2/pabx-canall-16384'
[Jan 15 08:48:20]   == Spawn extension (calls, 021047020, 1) exited
non-zero on 'Local/021047020 at calls-7cd0,2'
[Jan 15 08:48:20]   == Spawn extension (calls, 201, 1) exited non-zero on
'Local/201 at calls-6203,2'
[Jan 15 08:48:20]   == Spawn extension (default, 201, 2) exited non-zero
on 'Local/021047020 at calls-7cd0,1'


Any further ideas? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-15-08 04:50  viniciusfontes Note Added: 0076957                          
======================================================================




More information about the asterisk-bugs mailing list