I had same problem and solved. Refer below codes.
PBoolean MYExternalRTPChannel::OnSendingPDU(H245_H2250LogicalChannelParameters& param) const
{
// SONY
if(payloadCode>=96)
{
param.IncludeOptionalField(H245_H2250LogicalChannelParameters::e_dynamicRTPPayloadType);
param.m_dynamicRTPPayloadType = payloadCode;
param.IncludeOptionalField(H245_H2250LogicalChannelParameters::e_mediaPacketization);
param.m_mediaPacketization.SetTag(H245_H2250LogicalChannelParameters_mediaPacketization::e_rtpPayloadType);
H245_RTPPayloadType & rtpPacketization = param.m_mediaPacketization;
rtpPacketization.m_payloadDescriptor.SetTag(H245_RTPPayloadType_payloadDescriptor::e_oid);
((PASN_ObjectId &)rtpPacketization.m_payloadDescriptor) = OpalPluginCodec_Identifer_H264_Aligned;//OpalPluginCodec_Identifer_H264_Generic;
rtpPacketization.IncludeOptionalField(H245_RTPPayloadType::e_payloadType);
rtpPacketization.m_payloadType = payloadCode;
}
else
{
}
return H323_ExternalRTPChannel::OnSendingPDU(param);
}