[asterisk-dev] Pinetree :: For Asterisk SIP trunks behind a SIP proxy

Alex Balashov abalashov at evaristesys.com
Fri Sep 4 01:13:02 CDT 2009


What if I want to match the 3rd Via, or the 4th Via, or the nth Via?

Olle E. Johansson wrote:

> Hackers!
> 
> In the middle of the debate about peer matching, I'm adding another  
> recipe to the pot: Peer matching behind a SIP proxy.
> 
> Many of us implement asterisk behind SIP proxys for load balancing or  
> failover or both. That means that all messages to Asterisk is sent by  
> the proxy and all peer matching on IP/port fails. Asterisk simply  
> doesn't know how to separate the devices behind the proxy.
> 
> With my new code, you can add a rule to the SIP proxy [peer] section,  
> saying "don't match me, match who sent to me". The way Asterisk does  
> that, is by reading the second VIA header. This is the device that  
> sent the message to Asterisk - another proxy or an endpoint. You can  
> also be very strict and say "match last via" - which always will be  
> the other endpoint.
> 
> The benefit of all this is that all Asterisk features now work -  
> accountcode, codec settings, authentication. You can provision  
> different SIP trunks with different features, even though Asterisk is  
> hidden by a proxy.
> 
> For outbound calls, you use the outbound proxy setting as before.
> 
> This is in my branch oej/pinetree-trunk and soon on reviewboard.
> 
> Developed with sponsorship from a service provider, used in production  
> for a few months now.
> 
> Cheers,
> /O
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev


-- 
Alex Balashov - Principal
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775



More information about the asterisk-dev mailing list