<p dir="ltr">Hi Mark, </p>
<p dir="ltr">These new bridge events in Asterisk 12 are also all logged on CEL?</p>
<p dir="ltr">Tks</p>
<div class="gmail_quote">Em 16/10/2013 18:54, "Mark Michelson" <<a href="mailto:mmichelson@digium.com">mmichelson@digium.com</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10/16/2013 04:29 PM, jg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Whenever 2 channels form a bridge, I see a duplicate pair of "Bridge" events (Asterisk 11.5.1), like<br>
<br>
Event: Bridge<br>
Privilege: call,all<br>
Bridgestate: Link<br>
Bridgetype: core<br>
Channel1: SIP/Sn370-0000002a<br>
Channel2: Local/voicemailmain@from-<u></u>internal-00000008;1<br>
Uniqueid1: 1381958063.58<br>
Uniqueid2: 1381958063.59<br>
CallerID1: *7001<br>
CallerID2: asterisk<br>
<br>
Event: Bridge<br>
Privilege: call,all<br>
Bridgestate: Unlink<br>
Bridgetype: core<br>
Channel1: SIP/Sn370-0000002a<br>
Channel2: Local/voicemailmain@from-<u></u>internal-00000008;1<br>
Uniqueid1: 1381958063.58<br>
Uniqueid2: 1381958063.59<br>
CallerID1: *7001<br>
CallerID2: asterisk<br>
<br>
Event: Bridge<br>
Privilege: call,all<br>
Bridgestate: Link<br>
Bridgetype: core<br>
Channel1: SIP/Sn370-0000002a<br>
Channel2: Local/voicemailmain@from-<u></u>internal-00000008;1<br>
Uniqueid1: 1381958063.58<br>
Uniqueid2: 1381958063.59<br>
CallerID1: *7001<br>
CallerID2: asterisk<br>
<br>
...<br>
<br>
Event: SoftHangupRequest<br>
Privilege: call,all<br>
Channel: Local/voicemailmain@from-<u></u>internal-00000008;2<br>
Uniqueid: 1381958063.60<br>
Cause: 16<br>
<br>
Event: Hangup<br>
Privilege: call,all<br>
Channel: Local/voicemailmain@from-<u></u>internal-00000008;2<br>
Uniqueid: 1381958063.60<br>
CallerIDNum: *7001<br>
CallerIDName: Snom 370 öäü<br>
ConnectedLineNum: asterisk<br>
ConnectedLineName: <unknown><br>
AccountCode:<br>
Cause: 0<br>
Cause-txt: Unknown<br>
<br>
Event: Bridge<br>
Privilege: call,all<br>
Bridgestate: Unlink<br>
Bridgetype: core<br>
Channel1: SIP/Sn370-0000002a<br>
Channel2: Local/voicemailmain@from-<u></u>internal-00000008;1<br>
Uniqueid1: 1381958063.58<br>
Uniqueid2: 1381958063.59<br>
CallerID1: *7001<br>
CallerID2: asterisk<br>
<br>
The "Bridge" events are symmetric with respect to "Link" and "Unlink", but initially there is a quick "Link" and "Unlink" that does not seem to serve any purpose.<br>
<br>
Is this an artifact of the manager interface?<br>
<br>
jg<br>
</blockquote>
<br>
In all versions prior to Asterisk 12, the Bridge event is...less than useful. What you're seeing here isn't really an artifact of the manager interface so much as that Asterisk is exposing too much of its internals. In the case of the bridging, there is a 3-deep series of for loops that control a bridge. The outer-most one is what is responsible for executing DTMF and timed features on channels in a bridge. The second-tier one is the one that emits these Link and Unlink events. So what happens is that any time the second-tier loop is broken and the outermost one takes control, you'll see a Bridge Unlink event. This second-tier loop can be broken by such things as receiving specific control frame types, receiving DTMF, and certain timeouts. I can't tell what's happening in your particular case, partially because the Bridgetype field on those Bridge events will always say "core" even if the bridge type should be something else. All of this is to say that aside from the initial Bridge Link event, using Bridge events to try to figure out whether channels are actually bridged is not advised.<br>

<br>
In Asterisk 12, however, a different bridging framework is used, so instead of seeing two-party Bridge events, you now have bridge-centric events that give you an accurate picture of the bridge. You have events like BridgeCreate, when a bridge is created; BridgeEnter, when a channel enters a bridge; BridgeLeave, when a channel exits a bridge; and BridgeDestroy, when a Bridge is destroyed. With this, you get a much more accurate and clear picture of the state of the system and are also not restricted to seeing Bridge events only on two-party calls.<br>

<br>
Mark Michelson<br>
<br>
______________________________<u></u>_________________<br>
asterisk-app-dev mailing list<br>
<a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.<u></u>com</a><br>
<a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-<u></u>bin/mailman/listinfo/asterisk-<u></u>app-dev</a><br>
</blockquote></div>