Stop event processing when call is auto-rejected

This commit is contained in:
Juha Heinanen
2024-09-20 17:58:23 +03:00
parent 1e93130f58
commit 7e36c2a9b7
3 changed files with 14 additions and 1 deletions

View File

@ -179,7 +179,7 @@ static void event_handler(enum ua_event ev, struct bevent *event, void *arg)
ua = uag_find_msg(msg);
// There is no call yet and call is thus used to hold SIP message
call = (struct call *)msg;
len = re_snprintf(event_buf, sizeof event_buf, "%s,%r", prm, &msg->from.auri);
len = re_snprintf(event_buf, sizeof event_buf, "%s,%r,%ld", prm, &msg->from.auri, (long)event);
break;
case UA_EVENT_CALL_INCOMING:
len = re_snprintf(event_buf, sizeof event_buf, "call incoming,%s", prm);
@ -1290,6 +1290,16 @@ JNIEXPORT void JNICALL Java_com_tutpro_baresip_Api_sip_1treply(
(*env)->ReleaseStringUTFChars(env, reason, native_reason);
}
JNIEXPORT void JNICALL Java_com_tutpro_baresip_Api_bevent_1stop(
JNIEnv *env, jobject obj, jlong event)
{
(void)env;
(void)obj;
re_thread_enter();
bevent_stop((struct bevent *)event);
re_thread_leave();
}
JNIEXPORT void JNICALL Java_com_tutpro_baresip_Api_calls_1mute(
JNIEnv *env, jobject obj, jboolean mute)
{