[asterisk-dev] [Code Review] PineTree:: Matching SIP peers beyond SIP proxy

Olle E Johansson oej at edvina.net
Fri Jul 9 08:16:07 CDT 2010


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

(Updated 2010-07-09 08:16:07.099246)


Review request for Asterisk Developers.


Changes
-------

Updated a bit based on feedback, also resolved some conflicts. Found a potential bug with IPv6 addresses in via headers that we need to handle. Separate issue in issues opened for that, Simon notified...


Summary
-------

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.


Diffs (updated)
-----

  /trunk/channels/chan_sip.c 274865 

Diff: https://reviewboard.asterisk.org/r/348/diff


Testing
-------

Testing in private networks. Have had this code in production with customer for a couple of months, albeit on 1.4.


Thanks,

Olle E




More information about the asterisk-dev mailing list