[asterisk-dev] [Code Review] Added ability to perform SRV lookups for AGI URIs

Olle E Johansson oej at edvina.net
Tue Sep 29 13:35:14 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/378/#review1118
-----------------------------------------------------------


Instead of moving internal structures to srv.h and letting the client handle the list traversal, I would suggest that you move it back and create functions that pick the first and then the next from the current position in the list. Otherwise we will have to copy this code to many places in Asterisk instead of having it in one library function.

Also, do we need to register this srv tag and maybe get an official port for AGI? I would recommend that (but that's up to Digium).

Good work, I really like this idea. Now we might want TLS for FastAGI as well...

- Olle E


On 2009-09-23 15:53:57, _brent_ wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/378/
> -----------------------------------------------------------
> 
> (Updated 2009-09-23 15:53:57)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> With this patch, you can run the Agi() dial plan application with a URI beginning with hagi:// (for HA Agi) to indicate that the host name should be resolved as an SRV service instead of a regular host name.
> 
> Regular Agi still works the same. Hagi URIs should look like this in your dial plan:
> 
>     exten => _X.,1,Agi(hagi://example.com/foo.agi)
> 
> Asterisk will look up _agi._tcp.example.com and will try the normal fastagi routine on each host:port in the result until one accepts the connection or all results fail. 
> 
> 
> This addresses bug 0014775.
>     https://issues.asterisk.org/view.php?id=0014775
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/srv.h 219939 
>   /trunk/main/srv.c 219939 
>   /trunk/res/res_agi.c 219939 
> 
> Diff: https://reviewboard.asterisk.org/r/378/diff
> 
> 
> Testing
> -------
> 
> * Made formatting changes per eliel's comments.
> * Sniffing traffic shows correct DNS lookups, load balancing, and failover.
> * Resulting AGI connections work as expected.
> * Running for 6 months without issue.
> 
> 
> Thanks,
> 
> _brent_
> 
>




More information about the asterisk-dev mailing list