<div dir="ltr">I am originating call using early media option.<div><br></div><div>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.</div><div><br></div><div>I figured out that it is happening due to sip_hangup() checks:</div><div><br></div><div><div><b><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>if (p->invitestate < INV_COMPLETED && ast_channel_state(p->owner) != AST_STATE_UP) {</b></div><div><b><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>needcancel = TRUE;<br></b></div><div><b><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>ast_debug(4, "Hanging up channel in state %s (not UP)\n", ast_state2str(ast_channel_state(ast)));</b></div><div><b><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>}</b></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>And <b>ast_channel_state(p->owner) == AST_STATE_UP</b><br><br></div><div>I guess that early media option puts channel state in AST_STATE_UP</div><div><br></div><div>So, is there a way to not set up channel state to <b>AST_STATE_UP</b> in early media? Or the state check could be removed?</div><div><br></div><div>Thank you,</div><div><br></div><div>Valter</div></div></div></div></div></div></div></div></div></div>
</div></div>