"Iñaki Baz Castillo" <[EMAIL PROTECTED]> wrote: > Hi, is there any guideline explaining the steps to create a SIP stack? I meant > something as: > - First create the transport layer code. > - Then create the transaction layer. > - etc... > > Or is RFC3261 the best guideline?
Your mileage may vary, of course, but this is what I did: * Wrote parsing facilities for messages, headers, etc. (I wrote a recursive descent parser, because Delphi (6) doesn't come with a parser generator or regular expression support. I imagine that an LALR parser would allow you to finish this phase very quickly.) * Wrote the transaction layer (because it's nice and small and well-laid out) * Wrote the transport layer * Spent by far the majority of my time writing the transaction-user layer. RFC 3261 is definitely the best guideline, and it is intimidatingly long! I gave it a read-through first, trying to get a general picture of the whole standard in my head, and then started implementing bits chapter by chapter. I chose to start with the parser because it was something I knew I could easily do, just to get the ball rolling. One big difference about my starting point and yours is that I was already fluent in Delphi, not writing the stack to learn a new language. I think if I had to start another stack implementation for the purposes of learning a language I'd still follow the same process as above. One thing that helped me a great deal was mocking the layer below where I was working: for instance, when I started writing the transaction layer, I wrote a mock transport layer that just stored sent messages, and allowed you to "send" messages to the transport layer. frank _______________________________________________ Sip-implementors mailing list [email protected] https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
