For a connected call: the caller leg is IAX2, the callee leg is SIP leg. I found that asterisk sometimes sends IAX2 control protocol with subclass 26 sent to IAX2 client. It indicates /*!< Media source has changed and requires a new RTP SSRC */.
However, as far as I know, /*!< Media source has changed and requires a new RTP SSRC */ is specific to SIP.
Why does asterisk send control frame (subclass 26) to IAX2 client?
The worst thing is that IAX2 specification does not specify how to handle such received packet.
yes. It is passed as a control message. It has the correct format of a full frame.
The problem is that I do not know how to handle such frame because it is not defined in IAX2 specification.
I have three ways to handle:
(1)Reply Invalid message, but this response will disconnect the call once asterisk receive invalid response. Of course, I would like to continue the call.
(2)Just reply a simple ACK message. It does not work. If only a simple ACK message replied, asterisk keeps sending the same control message and finally, the call will be disconnected.
(3)Not supported message. But according to the IAX2 specification, not supported message is not used to response to control message but IAX2 protocol message.