[asterisk-dev] AMI Bridge action and what happens in the context of the pbx

Stephen Davies stephen.l.davies at gmail.com
Mon Apr 8 08:34:43 CDT 2019


Hi,

I need help of advice in a tricky question around the behaviour of the AMI
Bridge action when working with channels which were in the PBX and
connected to applications.  And what happens when the bridge clears.

The timeline goes like so:

- The one channel - from phone 0267806 (callerid 201) was running Echo, we
got here with a channel that is in the pbx and was Redirected a couple of
times using AMI Redirect action:

SIP/xxx-local-000002cf!xxx-forward!*26641!2!Up!Echo!!201!!!3!158!!1554725636.6512
- The other channel is to phone 0267805 and was connected via a Local
channel pair into Meetme; this was setup using Originate.  There is a pbx
here too.
      SIP/197.155.250.189:5060-000002d0!xxx-phone!0267805!1!Up!AppDial!(Outgoing
Line)!0878209509!!!3!171!6a5cc37d-fcf0-40f8-baff-abef38c8a932!1554725787.6523

In the context of the PBX both of the "xxx-forward" and "xxx-phone"
contexts have an h extension.

I call AMI Action Bridge to bridge the two channels, the result being the
expected new bridge:

ct-dev01*CLI> bridge show 6a5cc37d-fcf0-40f8-baff-abef38c8a932
Id: 6a5cc37d-fcf0-40f8-baff-abef38c8a932
Type: basic
Technology: simple_bridge
Num-Channels: 2
Channel: SIP/a.b.c.d:5060-000002d0
Channel: SIP/xxx-local-000002cf

So far so good, the channels get bridged, party 0267806 can talk to 0267805.

My problem is what happens when 0267805 BYEs the call.

At that point:

1) On the channel that initiated the hangup the h extension isn't called
2) On the other channel (the one that was originally the DESTINATION of a
dial) the PBX starts executing at step to of the default context for that
dialed channel:

[Apr  8 14:22:47] VERBOSE[19679] bridge_channel.c: Channel
SIP/xxx-local-000002cf left 'simple_bridge' basic-bridge
<6a5cc37d-fcf0-40f8-baff-abef38c8a932>

[Apr  8 14:22:47] VERBOSE[19036][C-0000050d] bridge_channel.c: Channel
SIP/197.155.250.189:5060-000002d0 left 'simple_bridge' basic-bridge
<6a5cc37d-fcf0-40f8-baff-abef38c8a932>
[Apr  8 14:22:47] VERBOSE[19036][C-0000050d] pbx.c: Executing
[0267805 at xxx-phone:3] SIPAddHeader("SIP/197.155.250.189:5060-000002d0",
"X-xxx-Callid: 1554725787.31261713") in new stack
[Apr  8 14:22:47] VERBOSE[19036][C-0000050d] pbx.c: Executing
[0267805 at xxx-phone:4] SIPAddHeader("SIP/197.155.250.189:5060-000002d0",
"X-xxx-Uniqueid: ") in new stack
[Apr  8 14:22:47] VERBOSE[19036][C-0000050d] pbx.c: Executing
[0267805 at xxx-phone:5] SIPAddHeader("SIP/197.155.250.189:5060-000002d0",
"X-xxx-Server: ") in new stack
[Apr  8 14:22:47] VERBOSE[19036][C-0000050d] pbx.c: Executing
[0267805 at xxx-phone:6] Dial("SIP/197.155.250.189:5060-000002d0",
"SIP/0267805 at a.b.c.d:5060,3600,ortM(xxx-answered^0^1554725787.6519^^^^0001)")
in new stack

Thanks for help and pointers!

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20190408/d03f1ab3/attachment.html>


More information about the asterisk-dev mailing list