< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] creating a SipMessage using SipMessage::make, SDP fmtp line appears at the top of the attribute list


Sadly, the attributes are in a HashMap. There is no way to control the order of output.

I checked the spec and no order is required. Nevertheless, I believe you when you say a vendor has trouble parsing the SDP produced.

All I can suggest is that you ask them what order they need and why. If they really are strict (and have a good reason), you may have to patch SdpContents.cxx AttributeHelper::encode, or talk devel into it.

On the other hand, if it is generally agreed that attribute stability is desired (not my leaning), then we can change from a HashMap to a list and sacrifice some look up speed.

david


On 10/4/05, Justin Matthews <justin.matthews@xxxxxxx> wrote:
Hello,

When creating a SipMessage from a string using SipMessage::make() that
contains SDP:

v=0
o=MyUser 2403208976 2403208976 IN IP4 192.168.2.4
s=SIP Call
c=IN IP4 192.168.2.4
t=0 0
m=audio 18382 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

Calling the following:

sdp = my_cast_macro(resip::SdpContents*,resipMsg_.getContents());
...
resip::SipMessage &inviteMsg =
dum_->makeInviteSession(msg->resipMsg_.header(h_To),appDialogSet->userProfil
e_,sdp,appDialogSet);
...
dum->Send(inviteMsg)

Results in the following SDP on the wire:

v=0
o=MyUser 2403208976 2403208976 IN IP4 192.168.2.4
s=SIP Call
c=IN IP4 192.168.2.4
t=0 0
m=audio 18382 RTP/AVP 0 101
a=fmtp:101 0-15
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000

The fmtp attribute entry appears at the top of the list.  I believe that a
vendor is having problems parsing this.  Does anyone know how to get the
fmtp attribute to be listed at the bottom of the list?

Thanks,

-Justin

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel