SIP media source changed and IAX2


I have encountered one problem:

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.

Anyone can help?


You can download my program on Android market by searching “MPhoneGG”.

Although the control frame with subclass type 26 does not happen often, I still want to find out.

Currently, when client receive such packet, I programmed the client to response invalid packet and then the call will be disconnected.

Any idea?

It’s an RTP thing, not a SIP thing.

I believe IAX forwards the internal Asterisk control messages.

Whether it needs to forward this one depends on whether it also passes timestamps and sequence numbers.

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.