[reSIProcate] Extracting sdp information....

Lorenzo webmaster at frascati1.org
Sat Oct 29 05:35:16 CDT 2005


Hi John,

for getting the IP address from the connection information in SDP you must:

1)  take the message and do a msg.getBody() . It will give you a Contents*
2) dynamic cast the pointer into a SdpContents*
3) the .session().connection().getAddress() will give you the IP address 
in Data  format

Bye,

Lorenzo

John Draper ha scritto:

> Hi,
>
> What if I want to extract some information in the "c=" line of a sdp
> record.   Am I going to have to extract the information and
> search for the "c=" record?   or can I get this information
> from the Message I get back from the response...  for instance.
>
> c=IN IP4 192.168.2.15  <--- this IP is the remote client's IP
> address,  right?   Is that the same thing as what I would
> get back from...
>
> Data Hostip = msg.header(h_To).uri().host();*
> char *ip = ip = Hostip.c_str();
>
> Where the SIP stack would automatically pull out this
> information?
>
> Which one would be the most appropriate IP I would
> want to initiate a session with if different?
>
> John
>
> *
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.sipfoundry.org
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>
>
>




More information about the resiprocate-devel mailing list