sdp a=inactive during initial offer

Hi Asterisk community,

I am integrating Asterisk like below.

Terminal#1 ↔ IMS ↔ Asterisk ↔ SIP trunk ↔ Public network ↔ Terminal#2

My terminal#1 sends sdp with a=inactive during the initial offer.

In this case, my Asterisk changes this attribute to sendrecv when forwarding it to SIP trunk. On the other hand, the Asterisk forwards back the answer with a=inactive to the IMS even though SIP trunk sends sdp with a=sendrecv to Asterisk. As a result, Terminal#1 and Terminal#2 cannot hear any voice.

My expectation is that,

  • Asterisk sends the sdp with a=inactive to SIP trunk, or
  • If Asterisk sends the sdp with a=sendrecv to SIP trunk, and if the SIP trunk return a=sendrecv to Asterisk, then it forwards the attribute as it is.

Is it possible to for Asterisk do this handling?

FYI: Similar negotiation flow is written in rfc3264, 10.2 one of n code selection.

https://datatracker.ietf.org/doc/html/rfc3264

That is not supported, you would be looking at code modifications.

Part of your problem here is that you are talking of forwarding, when Asterisk is a back to back user agent, not a SIP proxy.

Also, Asterisk would treat a transition to a=inactive, after the channel was answered, as hold, and, by default, Asterisk sends music on hold to the other party, but keeps their stream as a=sendrecv. so any changes in the handling of a=inactive before answer woudl have a wider impact, and would likely require additional options to allow the current behavour to be retained as default.

Thanks for the answers. Understood that it is not supported now and it would be difficult to implement this feature.