On Tue, May 2, 2017, at 06:47 PM, Valter Nogueira wrote: > I am originating call using early media option. > > Whe I issue a hangup (like in hangup request sip/...) before the b-leg > answer, it don't send a SIP CANCEL and the call keeps going on. > > I figured out that it is happening due to sip_hangup() checks: > > * if (p->invitestate < INV_COMPLETED && ast_channel_state(p->owner) != > AST_STATE_UP) {* > > * needcancel = TRUE;* > * ast_debug(4, "Hanging up channel in state %s (not UP)\n", > ast_state2str(ast_channel_state(ast)));* > * }* > > And *ast_channel_state(p->owner) == AST_STATE_UP* > > I guess that early media option puts channel state in AST_STATE_UP > > So, is there a way to not set up channel state to *AST_STATE_UP* in early > media? Or the state check could be removed?
Early media doesn't change the channel state to AST_STATE_UP. This only occurs if the channel is actually answered. I'd suggest providing more details about the precise scenario including any dialplan. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev