Summary: | ASTERISK-12548: parking an outbound calls loses GROUP() channel count information | ||
Reporter: | Philippe Lindheimer (p_lindheimer) | Labels: | |
Date Opened: | 2008-08-10 09:48:32 | Date Closed: | 2011-06-07 14:07:28 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_features |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | When you make an outbound call and count the channel with the GROUP() count feature (so you can limit the calls to that channel), and then subsequently park the call, the channel is removed from that list of counted calls. And retrieving the call, it is still gone. ****** STEPS TO REPRODUCE ****** The call is counted with the following dialplan line before dialing and the specific repro uses a SIP phone extension 222 to dial out a SIP trunk to a pstn provider, and then the sip extension 222 parks the call: exten => _NXXNXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},,) relevant code inside of macro-dialout-trunk: exten => s,1,Set(DIAL_TRUNK=${ARG1}) exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK}) make the call and then check the group count at the CLI: group show channels Channel Group Category SIP/222-08c7b808 OUT_4 (default) 1 active channel Here is the relevant output of "sip show channels" Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message 67.228.99.67 1425XXXXXX 387807003a7 00103/00000 0x1c0004 (ulaw| No Tx: ACK And here is the relevant output of "show channels" Channel Location State Application(Data) SIP/telasip-gw-08adf (None) Up Bridged Call(SIP/222-08c7b808) SIP/222-08c7b808 s@macro-dialout-trun Up Dial(SIP/telasip-gw/1425XXXXXX 2 active channels 1 active call Now park the call using defined Asterisk transfer key to parking feature and then show channels again: group show channels Channel Group Category 0 active channels here is the relevant part of "sip show channels" while parked: Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message 67.228.99.67 1425XXXXXX 387807003a7 00103/00000 0x1c0004 (ulaw| No Tx: ACK here is the relevant part of "show channels" after parking: Channel Location State Application(Data) SIP/222-08a217d0 71@from-internal:1 Up ParkedCall(71) SIP/telasip-gw-08adf (None) Up Bridged Call(SIP/222-08a217d0) 2 active channels 1 active call retrieve the call from the parking slot and "group show channels" continues to show un-active channels. here is the relevant part of "sip show channels" after retrieving: Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message 67.228.99.67 1425XXXXXX 387807003a7 00103/00000 0x1c0004 (ulaw| No Tx: ACK and here is the relevant part of "show channels" after retrieving: Channel Location State Application(Data) SIP/222-08a217d0 71@from-internal:1 Up ParkedCall(71) SIP/telasip-gw-08adf (None) Up Bridged Call(SIP/222-08a217d0) 2 active channels 1 active call | ||
Comments: | By: Philippe Lindheimer (p_lindheimer) 2008-08-10 09:58:03 I added detailed repro steps and copied CLI output of: group show channels sip show channels show channels before parking, after parking and after retrieving - why aren't they visible in the ticket? Well I also included this and it is easy to reproduce and examine locally. Here is the relevant dialplan segments: Outbound dialing using: exten => _NXXNXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},,) the relevant part of dialout-trunk to count the calls that is not retained after the call is parked: exten => s,1,Set(DIAL_TRUNK=${ARG1}) exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK}) And when the call is first made, the call is counted: CLI> group show channels Channel Group Category SIP/222-0875a3e0 OUT_4 (default) 1 active channel Once parked, that goes away. (If they system retained my repro steps you can see details of the state of the channel during each step). By: Philippe Lindheimer (p_lindheimer) 2008-08-10 10:00:19 cross reference bug reported to freepbx.org http://freepbx.org/trac/ticket/3040 By: Philippe Lindheimer (p_lindheimer) 2008-08-12 16:09:48 after some discussion with Jared Smith, it looks like we are using GROUP() a bit wrong. When I change the code to: exten => s,n,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK}) that solves the problem, only leaving a slight race condition in case 2 calls are going out at the same time, since the count is not incremented until the call is dialed. But this seems to clarify that this is not necessarily a bug as first thought. So if it all looks clean to you, I guess you can go ahead and close the ticket. |