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

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

The res_pjsip_multihomed module aggressively changes messages to contain the 
address information of the interface they will be going out on. In reality this 
is a good thing because it has the right address but in practice it upsets the 
testsuite. Why? Stuff in the testsuite likes to bind Asterisk to multiple 
loopback addresses. Since there is only one loopback interface with 127.0.0.1 
the code which determines the source deduces it to always be 127.0.0.1 which 
can mean Asterisk will talk to itself and hilarity.

The attached code makes things a bit less aggressive. First if the transport a 
message is going out on is bound to any (0.0.0.0) it will always modify the 
message. Second if the source address and the transport local address match 
then the message will always be modified (note that the transport may have 
changed from the original during this process if the source told us to). If 
none of these happen then the message will not be modified. This happens if 
PJSIP is explicitly bound to something but tells us our source will be 
something different. We now side with the transport instead of the system.


Diffs
-----

  /branches/12/res/res_pjsip_multihomed.c 410669 

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


Testing
-------

Ran tests that were failing because of this, they now pass!
Ran normal calls which should trigger rewriting, and stuff got rewritten.


Thanks,

Joshua Colp

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to