[asterisk-dev] GSoC 2010: Testing the SDP parser in chan_sip
Tilghman Lesher
tlesher at digium.com
Sun Apr 4 21:05:42 CDT 2010
On Sunday 04 April 2010 12:34:17 Loren Sands-Ramshaw wrote:
> Hello all,
>
> I'm wondering whether I'm on the right track in my general thinking?
>
> - Look at process_sdp and the functions it calls to find unit test
> candidates, and refactor in order to create unit test candidates where
> appropriate.
> - Create tests that give input to these functions and then verify that
> the functions executed correctly - not only checking that the state is
> set correctly (looks like mainly sip_pvt) but also that things are set
> up correctly (eg- both that the ast_rtp_instance has good values and
> that the port was opened). Also check correct return values and
> logging in the case of bad input.
> - Write code to generate session descriptions with varying errors and
> varying combinations of session, time, and media type/value pairs,
> exercising the range of possible configurations listed in SDP's RFC.
>
> Also, where would you recommend I gather real-world examples of
> session descriptions from?
The natural way is to run a SIP client against an Asterisk server and listen
to the wire with a tool like wireshark. As far as gathering real world
examples, you can probably do much of this yourself for various softphone
clients. For hardphones, I'm sure you don't want to have to obtain one of
each, so after retrieving sample SDP messages from each softphone, you
could email various lists (SIP implementors, Asterisk users, and even the
manufacturers themselves) to request sample dumps. Some manufacturers
may even send you a phone if they believe you're going to increase
Asterisk compatibility with their phones.
> Are there common deviations from the RFC
> that Asterisk supports or wants to support?
Not for SDP, no. Generally, we've gone with a simple implementation more
from a cause of ease of implementation, not for intentional deviation from the
standard. That's bit us in many cases, which is why we're keen on having this
project worked on.
--
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list