Skip to content
Permalink
Browse files

Make preloaded Route header optional.

New configuration parameter 'use_preloaded_route'

Preload Route header with the outbound proxy only if this parameter is set to *true*
  • Loading branch information
jmillan committed Dec 7, 2012
1 parent defeabe commit 24fcdbbbd3423f11c5417f926930c3004b17d669
Showing with 12 additions and 1 deletion.
  1. +1 −1 src/SIPMessage.js
  2. +11 −0 src/UA.js
@@ -47,7 +47,7 @@ JsSIP.OutgoingRequest = function(method, ruri, ua, params, extraHeaders, body) {
//ROUTE
if (params.route_set) {
this.setHeader('route', params.route_set);
} else {
} else if (ua.configuration.use_preloaded_route){
this.setHeader('route', ua.transport.server.sip_uri);
}

@@ -627,6 +627,8 @@ JsSIP.UA.prototype.loadConfig = function(configuration) {
connection_recovery_min_interval: 2,
connection_recovery_max_interval: 30,

use_preloaded_route: false,

// Session parameters
no_answer_timeout: 60,
stun_server: 'stun.l.google.com:19302',
@@ -778,6 +780,8 @@ JsSIP.UA.configuration_skeleton = (function() {
"connection_recovery_min_interval",
"connection_recovery_max_interval",

"use_preloaded_route",

"register_min_expires",

// Mandatory user configurable parameters
@@ -956,6 +960,13 @@ JsSIP.UA.configuration_check = {
return true;
}
},
use_preloaded_route: function(use_preloaded_route) {
if(typeof use_preloaded_route !== 'boolean') {
return false;
} else {
return true;
}
},
hack_via_tcp: function(hack_via_tcp) {
if(typeof hack_via_tcp !== 'boolean') {
return false;

0 comments on commit 24fcdbb

Please sign in to comment.
You can’t perform that action at this time.