[Asterisk-code-review] chan sip: Send stasis message on invite with replaces (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Oct 12 17:23:18 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10448 )

Change subject: chan_sip:  Send stasis message on invite with replaces
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

Eventually a similar patch will need to be done for res_pjsip_refer.c as it will not send the pickup event either.

https://gerrit.asterisk.org/#/c/10448/1/channels/chan_sip.c
File channels/chan_sip.c:

https://gerrit.asterisk.org/#/c/10448/1/channels/chan_sip.c@25687
PS1, Line 25687: 		RAII_VAR(struct ast_channel_snapshot *, chan_snapshot, NULL, ao2_cleanup);
               : 		RAII_VAR(struct ast_channel_snapshot *, target_snapshot, NULL, ao2_cleanup);
RAII_VAR should only be used when there are multiple exit points from the block.  In this case there is only one exit point.


https://gerrit.asterisk.org/#/c/10448/1/channels/chan_sip.c@25695
PS1, Line 25695: 		ast_send_call_pickup_stasis_message(replaces_chan, chan_snapshot, target_snapshot);
This should not be called unconditionally.  ast_bridge_transfer_acquire_bridge() can return no bridge even though the channel is really in a bridge.  It does this for channels that are in a ConfBridge.  In this case the call is not a pickup.  You can check this by calling ast_channel_get_bridge().

Beware that ast_channel_get_bridge() must be called with the channel locked and that it returns a bridge ref.



-- 
To view, visit https://gerrit.asterisk.org/10448
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieb1442027a3ce6ae55faca47bc095e53972f947a
Gerrit-Change-Number: 10448
Gerrit-PatchSet: 1
Gerrit-Owner: Jasper Hafkenscheid <jasper.hafkenscheid at wearespindle.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 12 Oct 2018 22:23:18 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181012/8cf010e0/attachment.html>


More information about the asterisk-code-review mailing list