[asterisk-dev] Coming changes to ari.conf

Paul Belanger paul.belanger at polybeacon.com
Sat Jul 13 15:22:30 CDT 2013


On 13-07-12 06:05 PM, David M. Lee wrote:
> On Jul 12, 2013, at 4:13 PM, Paul Belanger <paul.belanger at polybeacon.com> wrote:
>
>> Any chance you an also add the CORS patch to the AMI HTTP interface? Right now we run a thin proxy in front of our Asterisk boxes simply for this functionality.
>
> Well, someone could :-D The code is in two functions in
> res/res_stasis_http.c (process_cors_request and handle_options). It
> could be extracted, with a bit of finagling.
>
> I'm curious in what context you need it, though. Are you accessing AMI
> HTTP from a browser app? I thought CORS was pretty much used
> exclusively by browsers, due to their same-origin policy.
>
Ya, we basically connect to the AMI via web sockets to parse Asterisk 
events.  It is not the best setup, but works for what we need right now.

I imagine other people will likely do the same, and as a result you'll 
need to run a CORS proxy if you want to do this.

-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: 
https://twitter.com/pabelanger



More information about the asterisk-dev mailing list