[asterisk-bugs] [Asterisk 0010196]: my asterisk comes down in flames randomly, it appears to be related to chanspy

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Nov 14 08:38:28 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10196 
====================================================================== 
Reported By:                renemendoza
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10196
Category:                   Applications/app_chanspy
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:            1.4.7  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             07-12-2007 16:24 CDT
Last Modified:              11-14-2007 08:38 CST
====================================================================== 
Summary:                    my asterisk comes down in flames randomly, it
appears to be related to chanspy
Description: 
i have almost as much chan_spy calls as zap->sip calls i am doing no
transcoding

Asterisk 1.4.7
Zaptel 1.4.3
PowerEdge 2950 2 3Ghz dual core Xeon processors
8 Gigabits RAM


i have around 14 calls and 6 out of them might be chan_spy calls
doing very light recording
using queues and local channels

asterisk crashes randomly
sometimes stays up for days sometimes it crashes more than once a day
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0010209 ast_check_hangup does not return true a...
====================================================================== 

---------------------------------------------------------------------- 
 renemendoza - 11-14-07 08:38  
---------------------------------------------------------------------- 
i have yet to test the audiohooks branch but so far what has helped me is
not using chan spy at all, instead i am using ZapBarge and some dial plan
variable tricks to make it work in the scenario i was using ChanSpy (i.e.
Zap to Sip calls). It all revolves to setting the AstDB key for the SIP
extension number of the connected call to the relevant zap channel. There
is also a key for every zap channel that also has a reference to the sip
channel.

i have modified my dial plan to make it more suitable for general usage as
my scenario is ZAP->queue->sip
  here is the relevant dialplan:

;incoming zap call
exten => _XXXX,1,Answer
exten => _XXXX,n,Set(__ZAPCHANNEL=${CUT(CHANNEL|-|1):4}) ;which channel
did the call came tru
exten => _XXXX,n,Dial(SIP/${EXTEN}|20|gM(connect^${ZAPCHANNEL}^${EXTEN}))

exten => _XXXX,n,Set(DB(${EXTEN}/conexion)=)
exten => _XXXX,n,Hangup
exten => t,1,Hangup


;it is very important to clean after the call has ended
exten => h,1,Set(SIPCHANNEL=${DB(${ZAPCHANNEL}/conexion)})
exten => h,n,Set(DB(${SIPCHANNEL}/conexion)=)
exten => h,n,Set(DB(${ZAPCHANNEL}/conexion)=)

;when the call has connected

[macro-connect]
exten =>s,1,NoOp(${ZAPCHANNEL})
exten =>s,n,Set(DB(${ARG2}/conexion)=${ZAPCHANNEL})
exten =>s,n,Set(SIPCHANNEL=${CUT(CHANNEL|-|1):4})
exten =>s,n,Set(DB(${ZAPCHANNEL}/conexion)=${SIPCHANNEL})


;this is the context for barging in uset enters *10 and the 4 digits sip
extension

exten => _*10XXXX,1,Set(TARGET=${DB(${EXTEN:3}/conexion)})
exten => _*10XXXX,n,GotoIf($["${TARGET}"=""]?no:si)
exten => _*10XXXX,n(no),Playback(the-number-u-dialed&not-yet-connected)
exten => _*10XXXX,n,Hangup
exten => _*10XXXX,n(si),ZapBarge(${TARGET}) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-14-07 08:38  renemendoza    Note Added: 0073638                          
======================================================================




More information about the asterisk-bugs mailing list