hi,
… and one more improvement:
I suggest it would be good, if eXosip_call_terminate would
stop retransmitting the INVITE request.
this would be useful especially for the following scenario:
you have 2 alternative outbound-proxies configured,
and try to reach the first – but it is not reachable.
then your app switches to the second outbound-proxy and tries the same
call via the second proxy – but the retransmissions to the first proxy are still ongoing !
then it could happen, that by chance a retransmission of the first INVITE gets answered – in case
proxy1 comes up – but the app’s intention was to use proxy2 !
I would suggest instead of:
if (jd == NULL || jd->d_dialog == NULL) {
OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: No established dialog!\n"));
return OSIP_WRONG_STATE;
}
to write the following:
if (jd == NULL || jd->d_dialog == NULL) {
OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL, "eXosip: stopping INVITE retransmissions by deleting transaction!\n"));
/* remove transaction from osip list */
osip_remove_transaction(excontext->j_osip, tr);
/* remove transaction from call list */
_eXosip_remove_transaction_from_call(tr, jc);
/* free the transaction */
_eXosip_delete_reserved (tr);
_eXosip_dnsutils_release (tr->naptr_record);
tr->naptr_record = NULL;
osip_transaction_free (tr);
return OSIP_SUCCESS;
}
what do you think ?
br,
christoph