[Asterisk-code-review] stasis: Fix dial masquerade datastore lifetime (asterisk[13])

Matt Jordan asteriskteam at digium.com
Tue May 5 11:53:31 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: stasis: Fix dial masquerade datastore lifetime
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/357/1/main/stasis_channels.c
File main/stasis_channels.c:

Line 411: 	if (caller) {
        : 		if (forwarded) {
        : 			ast_channel_unlock(forwarded);
        : 		}
        : 		ast_channel_unlock(peer);
        : 		remove_dial_masquerade_caller(caller);
        : 		ast_channel_unlock(caller);
        : 	}
It appears as if this will remove the dial masquerade datastore on the first call to ast_channel_publish_dial_forward. That doesn't feel quite right.

Consider the following:

Alice performs a blind transfer of Bob. However, while blind transferring Bob, she doesn't just dial a single endpoint for Charlie - instead, she dials two endpoints:

Dial(PJSIP/Charlie-Home&PJSIP/Charlie-Mobile)

PJSIP/Charlie-Home sends back a 404, and we cancel that dial operation. That calls this function, raising a DialEnd event. We remove the datastore.

Alice then hangs up, causing a masquerade of Bob into Alice's channel. Unfortunately, the dial operation with PJSIP/Charlie-Mobile is still ongoing, and we never raise the DialEnd event for Alice and PJSIP/Charlie-Mobile.

I think we only want to remove this from the caller when all dialled peers have been accounted for.


-- 
To view, visit https://gerrit.asterisk.org/357
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1ef4ca5ca04980028604cc2af5d2992ac3431b3f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list