SDP Media Attributes


I have an application that sends additional Media Attributes, but Asterisk remove all of them. There is a way to keep some of the attributes ?


There is no built in way out of the box to arbitrarily pass through such information. Support has to be added based on the format. If it’s not a format attribute then there is no way to pass through stream level attributes.

This is a sample of additional attributes:

a=rtpmap:123 R2S/8000

There’s nothing built in to understand or convey any of that, and no format support for “R2S”. You would have to modify Asterisk.

I am using pjsip, on which source files I can find where I have to implement this change ?

I can’t really state which source files because this spans, well, a good portion of Asterisk. You have to modify PJSIP to understand the information, you have to modify the core to be able to pass the information, if it’s carried on a different media stream type you have to add support for that, and so on. It’s not something that I can tell you how to do.

It also not within the scope of this forum, as it is a developer question. For the reasons jcolp has given, it is unlikely you would get a complete answer on the the developer mailing list or IRC channel, either. The complexity arises because Asterisk is an anything to anything PABX not a SIP only one.