Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:alias-example [2011/04/22 20:31]
87.93.81.21
tutorials:alias-example [2013/06/08 08:42] (current)
jh [In-Dialog Requests]
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-The benefits ​of using add_contact_alias() and handle_ruri_alias() functions instead of conventional NAT traversal solutions ​are: +The benefit ​of using add_contact_alias() and handle_ruri_alias() functions instead of conventional NAT traversal solutions ​is that Request-URI in requests to UAs behind NATs is always what UAs expectIn the example below only functions related to signaling are shown. ​ Proxying of media using either Mediaprxy or RTP Proxy can be easily added. ​ In addition to handling NAT traversal, the example uses add_contact_alias() and handle_ruri_alias() functions for re-use of tcp/tls sessions between proxy and UAs.
- +
-  * Request-URI in requests to UAs behind NATs is always what UAs expect +
-  * Re-use of tcp sessions between proxy and UAs (optional) +
- +
-In the example below only functions related to signaling are shown. ​ Proxying of media using either Mediaprxy or RTP Proxy can be easily added. +
 ===== Non-Register Initial Requests ===== ===== Non-Register Initial Requests =====
  
Line 77: Line 71:
 route [IN_DIALOG_REQUESTS] { route [IN_DIALOG_REQUESTS] {
  
-    if (REQUEST_COMES_FROM_BEHIND_NAT || ((@via[2] == ""​) && (proto != UDP))) {+    if (REQUEST_COMES_FROM_BEHIND_NAT || (is_first_hop() && (proto != UDP))) {
         route(ADD_CONTACT_ALIAS);​         route(ADD_CONTACT_ALIAS);​
     }     }

Navigation

Wiki

Other

Personal Tools