I have implemented PJSIP client for handling VOIP Calls.
During the call if network changes i am sending re-invite such as:
unsigned int count = 1;
pjsua_call_id call_id = PJSUA_INVALID_ID;
pjsua_enum_calls(&call_id, &count);
pjsua_call_reinvite(call_id,PJSUA_CALL_UPDATE_CONTACT, NULL);
Problem : After sending re-invite, I can see the INVITE packet contains old contact header value due to which if party B disconnecting call SIP Server sending buy on old contact address.
Solution : Contact Header value should be updated after sending re-invite so SIP Server can send bye on latest address.