Hi folks,

I've just released a supporting library and documentation for an  
approach I've been using to simplify SIP servlets development. It's on  
GitHub:

   http://github.com/rnewman/clj-sip

It uses multimethods and hierarchies to reduce the blow-up of  
dispatching on state and message types that arise in non-trivial SIP  
servlets. (I've noticed that SIP servlets usually end up with hundreds  
of lines of switch statements testing for method names, states, and  
response codes.)

It's not a full-on does-everything library, but it does include a  
bunch of useful tools to build a servlet, including a descriptive  
hierarchy of SIP messages and response codes, so you can write custom  
code that rejects a bunch of requests without repeating yourself:

(def *my-hierarchy*
   (ref (deriving @*sip-hierarchy*
                  (:not-understood
                    :rfc3262-requests
                    :rfc3265-requests
                    :rfc3903-requests))))

...

(req-> [:state :not-understood]
   (.send (.createResponse req 405)))


I don't know if anyone on this list works with SIP servlets, but I  
figured it would be worth sending out a notice. Comments welcome!

-R

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to