--- linphone-svn/linphone/coreapi/exevents.c 2010-01-06 17:26:58.000000000 +0100 +++ linphone-r807_pc/coreapi/exevents.c 2010-01-07 09:50:35.000000000 +0100 @@ -126,11 +126,14 @@ lc->vtable.show(lc); lc->vtable.display_status(lc,_("Call terminated.")); gstate_new_state(lc, GSTATE_CALL_END, NULL); - if (lc->vtable.bye_recv!=NULL){ - char *from; - osip_from_to_str(ev->request->from,&from); - lc->vtable.bye_recv(lc,from); - osip_free(from); + if (lc->vtable.bye_recv!=NULL && ev->request!=NULL){ + if(ev->request->from!=NULL) + { + char *from; + osip_from_to_str(ev->request->from,&from); + lc->vtable.bye_recv(lc,from); + osip_free(from); + } } if (lc->call!=NULL){ linphone_call_destroy(lc->call); @@ -1158,8 +1161,9 @@ linphone_subscription_closed(lc,ev); break; case EXOSIP_CALL_RELEASED: - ms_message("CALL_RELEASED\n"); - linphone_call_released(lc, ev->cid); + ms_message("CALL_RELEASED replaced by terminated\n"); + //linphone_call_released(lc, ev->cid); + linphone_call_terminated(lc,ev); break; case EXOSIP_REGISTRATION_FAILURE: ms_message("REGISTRATION_FAILURE\n");