Fabio Moretti
2013-Jun-13 14:31 UTC
[asterisk-users] Problem with CEL logging and channel bridging
Hi, I've already post this to the forum three days ago, sorry if it's sounds like a crosspost, but I've got no replies, so I'm trying other channels :) This is the link to the forum post if someone prefer to reply here: http://forums.asterisk.org/viewtopic.php?f=1&t=86985 I'm using Asterisk 1.8.20.0 (the freepbx build) with CEL logging activated. I'm using CEL because in our pbx we have different queues and trunks serving different customers (we are an inbound call center) and we need to detect when and how we have to bill our customers. I'm facing an issue with the call transfer, for example I have: - call entering a queue - operator answer the call - operator make an outgoing call to reach the customer - operator put in communication the ingoing call with the outgoing this result in various channel to be created/destroyed, and I'm using bridge events to detect what is going on with the call. In this case I have (I've hidden CHAN_START,ANSWER and HANGUP events because they have no useful information in this case): +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ | id | eventtype | eventtime | exten | context | channame | appname | appdata | peer | +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ | 965224 | BRIDGE_START | 2013-06-10 10:15:18 | 20 | ext-queues | DAHDI/i1/96034296-30a3 | Queue | 20,t,, | Local/1004 at from-queue-00019c34;1 | | 965226 | BRIDGE_START | 2013-06-10 10:15:18 | s | macro-dial-one | Local/1004 at from-queue-00019c34;2 | Dial | SIP/1004,"",trM(auto-blkvm) | SIP/1004-000040ce | | 965340 | BRIDGE_UPDATE | 2013-06-10 10:16:08 | s | macro-dialout-trunk | Local/1004 at from-queue-00019c34;2 | Dial | IAX2/issuegroup/110,300, | IAX2/issuegroup-17175 | | 965513 | BRIDGE_END | 2013-06-10 10:18:15 | 20 | ext-queues | DAHDI/i1/96034296-30a3 | Queue | 20,t,, | Local/1004 at from-queue-00019c34;1 | | 965515 | BRIDGE_END | 2013-06-10 10:18:15 | s | macro-dialout-trunk | Local/1004 at from-queue-00019c34;2 | Dial | IAX2/issuegroup/110,300, | IAX2/issuegroup-17175 | +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ The first BRIDGE_START is the connection between the inbound call (DAHDI/i1/96034296-30a3) and the local phone (Local/1004 at from-queue-00019c34;1), the second BRIDGE_START is the connection between the local phone (Local/1004 at from-queue-00019c34;2) and the outgoing call (SIP/1004-000040ce) that is going out by a IAX trunk. After that I have a BRIGDE_UPDATE event where no field make me know which channel is being updated, I only have the channame (Local/1004 at from-queue-00019c34;2) that is the channel being bridged out and the outgoing channel (IAX2/issuegroup-17175), but I have no information that in fact the ingoing call (DAHDI/i1/96034296-30a3) is being bridged to the outgoing channel. I have no other event (TRANSFER or something like that) to know what is going on. In my cel.conf I have: apps=queue events=CHAN_START,CHAN_END, APP_START,APP_END, ANSWER,HANGUP, BRIDGE_START,BRIDGE_END,BRIDGE_UPDATE, BLINDTRANSFER,ATTENDEDTRANSFER,TRANSFER, PICKUP, FORWARD, PARK_START,PARK_END, LINKEDID_END Should I change something in my configuration or it's wrong to rely on bridges to follow a call? What kind of event should I follow to be sure to catch where the call is going? Thank you for any suggestion!
Fabio Moretti
2013-Jun-17 13:56 UTC
[asterisk-users] Problem with CEL logging and channel bridging
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> <div class="moz-cite-prefix">Il 13/06/2013 11:31, Fabio Moretti scrisse:<br> </div> <blockquote cite="mid:51B9D7C8.2060004@tecytal.com" type="cite"> <pre wrap="">Hi, I've already post this to the forum three days ago, sorry if it's sounds like a crosspost, but I've got no replies, so I'm trying other channels :)</pre> </blockquote> <br> ok, definitely CEL is a big question mark for most of us.<br> <br> can someone point me to in deep CEL documentation or to an open source code that use it so I can study more? not asterisk code, please, I tried but I find really hard find how and then events are generated.<br> <br> thanks<br> <br> <div class="moz-signature">-- <br> <table style="font-family: sans-serif; color: rgb(143, 143, 143); font-size: 10px;" cellpadding="3" cellspacing="3"> <tbody> <tr> <td style="border-right: 1px solid rgb(191, 191, 191);"> <img src="http://www.tecytal.com/imgs/tecytal-logo-email.jpg" moz-do-not-send="true"> </td> <td> <span style="font-weight: bold; font-size: 1.15em; color: rgb(95, 95, 95); line-height: 1.8em;"> Fabio Moretti </span> <br> <span>Gerente de Sistemas</span> <br> <span> <a href="http://www.tecytal.com" style="text-decoration: none; color: rgb(231, 37, 25);">www.tecytal.com</a> </span> <br> <span> 0800 8780 <br> (+598) 248 77921 </span> </td> </tr> </tbody> </table> </div> </body> </html>
Matthew Jordan
2013-Jun-17 14:13 UTC
[asterisk-users] Problem with CEL logging and channel bridging
On Thu, Jun 13, 2013 at 9:31 AM, Fabio Moretti <fmoretti at tecytal.com> wrote:> Hi, I've already post this to the forum three days ago, sorry if it's > sounds like a crosspost, but I've got no replies, so I'm trying other > channels :) > > This is the link to the forum post if someone prefer to reply here: > http://forums.asterisk.org/viewtopic.php?f=1&t=86985 > > I'm using Asterisk 1.8.20.0 (the freepbx build) with CEL logging > activated. I'm using CEL because in our pbx we have different queues and > trunks serving different customers (we are an inbound call center) and > we need to detect when and how we have to bill our customers. > I'm facing an issue with the call transfer, for example I have: > - call entering a queue > - operator answer the call > - operator make an outgoing call to reach the customer > - operator put in communication the ingoing call with the outgoing > this result in various channel to be created/destroyed, and I'm using > bridge events to detect what is going on with the call. In this case I > have (I've hidden CHAN_START,ANSWER and HANGUP events because they have > no useful information in this case): > > > +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ > > | id | eventtype | eventtime | exten | context > | channame | appname | appdata > | peer | > > > +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ > > | 965224 | BRIDGE_START | 2013-06-10 10:15:18 | 20 | ext-queues > | DAHDI/i1/96034296-30a3 | Queue | 20,t,, > | Local/1004 at from-queue-00019c34;1 | > > | 965226 | BRIDGE_START | 2013-06-10 10:15:18 | s | macro-dial-one > | Local/1004 at from-queue-00019c34;2 | Dial | > SIP/1004,"",trM(auto-blkvm) | SIP/1004-000040ce | > > | 965340 | BRIDGE_UPDATE | 2013-06-10 10:16:08 | s | > macro-dialout-trunk | Local/1004 at from-queue-00019c34;2 | Dial | > IAX2/issuegroup/110,300, | IAX2/issuegroup-17175 | > > | 965513 | BRIDGE_END | 2013-06-10 10:18:15 | 20 | ext-queues > | DAHDI/i1/96034296-30a3 | Queue | 20,t,, > | Local/1004 at from-queue-00019c34;1 | > > | 965515 | BRIDGE_END | 2013-06-10 10:18:15 | s | > macro-dialout-trunk | Local/1004 at from-queue-00019c34;2 | Dial | > IAX2/issuegroup/110,300, | IAX2/issuegroup-17175 | > > > +--------+---------------+---------------------+-------+---------------------+----------------------------------+---------+-----------------------------+----------------------------------+ > > > The first BRIDGE_START is the connection between the inbound call > (DAHDI/i1/96034296-30a3) and the local phone > (Local/1004 at from-queue-00019c34;1), the second BRIDGE_START is the > connection between the local phone (Local/1004 at from-queue-00019c34;2) > and the outgoing call (SIP/1004-000040ce) that is going out by a IAX trunk. > After that I have a BRIGDE_UPDATE event where no field make me know > which channel is being updated, I only have the channame > (Local/1004 at from-queue-00019c34;2) that is the channel being bridged out > and the outgoing channel (IAX2/issuegroup-17175), but I have no > information that in fact the ingoing call (DAHDI/i1/96034296-30a3) is > being bridged to the outgoing channel. > I have no other event (TRANSFER or something like that) to know what is > going on. > ><snip> I think you have two questions here: what is the BRIDGE_UPDATE event telling you, and how do you know the DAHDI channel is communicating with the IAX trunk. A BRIDGE_UPDATE event occurs when a masquerade has happened and the participants in a bridge have been updated. In this particular case, the BRIDGE_UPDATE event is telling you that Local/1004 at from-queue-00019c34;2 is no longer bridged with SIP/1004-000040ce, but is in fact now bridged with the IAX trunk IAX2/issuegroup-17175. That is, the IAX trunk has taken the place of the SIP channel. Since you were already informed that a bridge started between that Local channel half and the SIP channel, the event only needs to tell you who got replaced - which is what it does. So, how do you know that Local/1004 at from-queue-00019c34;2 is associated with DAHDI/i1/96034296-30a3? By definition, Local channels *always* exist in pairs - the two channels together make up one path of communication. The two halves are denoted by a common name with a suffix of ';1' and ';2' - the first half gets the ';1'; the second half gets the ';2'. When both halves are answered, you know that audio will be forwarded from one half to the other and vice versa. Since you know that DAHDI/i1/96034296-30a3 is in a bridge with Local/1004 at from-queue-00019c34;1 and Local/1004 at from-queue-00019c34;2* *is in a bridge with IAX2/issuegroup-17175, you automatically know that DAHDI/i1/96034296-30a3 and IAX2/issuegroup-17175 can communicate (at least once everyone has Answered). The system you build on top of CEL has to understand the semantics of Local channels and tie the two together. Matt -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130617/2d87fb69/attachment.htm>