[asterisk-users] Problem with CEL logging and channel bridging

Matthew Jordan mjordan at digium.com
Mon Jun 17 09:13:29 CDT 2013


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>


More information about the asterisk-users mailing list