Refer below function in Linphone SDK Core.
static MSList *match_payloads(const MSList *local, const MSList *remote, bool_t reading_response, bool_t one_matching_codec);
This function is called at initiate_outgoing and initiate_incoming in the same file.
You are able to modify the function by the priority that you want.
Of course you should rebuild the Linphone SDK project after you modified it.
I think this is the most easiest way.
Otherwise, you would be able to use linphone_core_enable_payload_type, but I think this is very bad idea.
This answer is applied to both SDKs of iOS and Android.
Good luck. Have a nice day.