Forum Discussion

Rod_Barton_7864's avatar
Rod_Barton_7864
Icon for Nimbostratus rankNimbostratus
May 15, 2013

Get SDP Session Attribute from SIP INVITE

Hi All,

 

Hoping someone can help me.......

 

I need to look at the data in the SDP Session Attribute of a SIP INVITE.

 

I seen the SDP::field and SDP::media methods but I don't seam to be able to get the field I am looking for.

 

The in the SIP INVITE the field is "Session Attribute " of the message body, the data on the wire is "a=sendrecv"

 

I have tried SDP::field connection_address and this works fine, when I try SDP::field session_attribute I get nothing returned.

 

Does anyone have any idea how to access this field?

 

 

Thanks for your help.

 

 

1 Reply

  • Try:

    SDP::field a

    or:

    SDP::field a 0

    if you expect the 'a' field to pop up more than once and specifically want the first instance.

    The SDP parser knows only a few fields by their fully-qualified name (e.g., connection_address as you note).