Hi Colin,

It’s great to hear that you are considering using Project Clearwater.

First, let me see if I understand your use-case. I think FS stands for 
FreeSwitch. If I understand correctly, you are looking to set up something like 
this:

[cid:[email protected]]

SIP clients will talk to Project Clearwater, then Project Clearwater will talk 
over some sort of API to your application to:

·         Validate JSON Web Tokens.

·         Determine which instance of FreeSwitch to send a request on to.

I think this should be possible. Our component Bono acts as a SIP edge proxy. 
Our Sprout component acts as a registrar and SIP proxy, and it should be 
possible to extend it using the Sproutlet API to meet your use case.

Your first question was about JSON Web Tokens. Project Clearwater’s registrar 
component currently only supports IMS AKA and SIP Digest authentication, but it 
should be possible to enhance it by:

·         Disabling SIP authentication.

·         Writing a Sproutlet that can take the JSON Web Token from the SIP 
request, and talk to your application to validate it.

·         Configuring Bono to route all requests into the network to the new 
authentication Sproutlet. This blog 
post<http://www.projectclearwater.org/sproutlet-configuration/> describes 
Sproutlet routing in more detail.

·         Getting your new Sproutlet to send all requests on to the domain name 
of the Sprout node that it is on, to force the registrar to come into play.

I would tackle your second challenge the same way – write a second Sproutlet 
which can query your application on each new dialog, and route the request on 
based on the results.

Matt wrote a blog post explaining what Sproutlets are and how they 
work<http://www.projectclearwater.org/tadhack-mini-london-and-sproutlets/> 
here. You can also take a look at the Sproutlet header 
file<https://github.com/Metaswitch/sprout/blob/dev/include/sproutlet.h>, which 
documents the API. Finally, you can see an example Sproutlet 
here<https://github.com/Metaswitch/greeter>.

I hope that helps.

Yours,

Chris

From: Clearwater [mailto:[email protected]] On 
Behalf Of Colin Morelli
Sent: 04 June 2016 14:20
To: [email protected]
Subject: [Project Clearwater] Clearwater as Registrar + Proxy

Hey all,

I've been looking around for a good, horizontally scalable SIP edge proxy, 
transaction-stateful proxy, and registration for a bit. So far CW appears to be 
the best option. I'm trying to understand if it'll work well for my use case, 
where I have FS as a media server (being controlled by my API), and need an 
edge proxy + registrar and stateful proxy.

The first challenge is that for registration, many of my devices register with 
JSON Web Tokens. In my prototype, FS calls my API with all of the headers in 
the SIP register request and I verify the token in my application. Is this 
something I can do with CW's registrar?

The second "challenge" is selecting the appropriate FS instance for a call. 
Ideally each time a new dialog is created CW can call out to my application to 
see which FS instance to proxy that request to. I have some business rules 
around where to place certain calls.

I'd love any pointers to the docs (if available) on how I can accomplish these 
things, or examples from your own experiences if anyone else has had similar 
requirements. Thanks in advance.

Best,
Colin
_______________________________________________
Clearwater mailing list
[email protected]
http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org

Reply via email to