Browse code

sbc:dsm: next_hop options for addCallee with new call mode

Stefan Sayer authored on 21/12/2013 18:23:38
Showing 3 changed files
... ...
@@ -452,6 +452,22 @@ EXEC_ACTION_START(MODSBCActionAddCallee) {
452 452
     if (it != sc_sess->var.end())
453 453
       p.outbound_proxy = it->second;
454 454
 
455
+    it = sc_sess->var.find(varname+"." DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP);
456
+    if (it != sc_sess->var.end())
457
+      p.next_hop = it->second;
458
+
459
+    it = sc_sess->var.find(varname+"." DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_1ST_REQ);
460
+    if (it != sc_sess->var.end())
461
+      p.next_hop_1st_req = (it->second == DSM_TRUE);
462
+
463
+    it = sc_sess->var.find(varname+"." DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_PATCH_RURI);
464
+    if (it != sc_sess->var.end())
465
+      p.patch_ruri_next_hop = (it->second == DSM_TRUE);
466
+
467
+    it = sc_sess->var.find(varname+"." DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_FIXED);
468
+    if (it != sc_sess->var.end())
469
+      p.next_hop_fixed = (it->second == DSM_TRUE);
470
+
455 471
     sbc_call_leg->addCallee(peer, hdrs);
456 472
   } else if (mode == DSM_SBC_PARAM_ADDCALLEE_MODE_LTAG) {
457 473
     string ltag;
... ...
@@ -18,6 +18,11 @@
18 18
 #define DSM_SBC_PARAM_ADDCALLEE_REMOTE_PARTY "remote_party"
19 19
 #define DSM_SBC_PARAM_ADDCALLEE_HDRS           "hdrs"
20 20
 #define DSM_SBC_PARAM_ADDCALLEE_OUTBOUND_PROXY "outbound_proxy"
21
+#define DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP         "next_hop"
22
+#define DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_1ST_REQ "next_hop_1st_req"
23
+#define DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_PATCH_RURI "next_hop_patch_ruri"
24
+#define DSM_SBC_PARAM_ADDCALLEE_NEXT_HOP_FIXED      "next_hop_fixed"
25
+
21 26
 #define DSM_SBC_PARAM_ADDCALLEE_RTP_MODE       "rtp_mode"
22 27
 #define DSM_SBC_PARAM_ADDCALLEE_TRANSPARENT_DLG_ID "transparent_dlg_id"
23 28
 
... ...
@@ -202,6 +202,15 @@ sbc.addCallee(string mode, string varname)
202 202
          $varname.remote_party   - remote party (To) in new call
203 203
          $varname.hdrs           - headers in outgoing INVITE
204 204
          $varname.outbound_proxy - outbound proxy in new call
205
+         $varname.next_hop       - next hop
206
+         $varname.next_hop_1st_req    - next hop for 1st req, "true" or "false"
207
+         $varname.next_hop_patch_ruri - patch ruri with next hop, "true" or "false"
208
+         $varname.next_hop_fixed      - fixed next hop
209
+
210
+         $varname.outbound_proxy - outbound proxy in new call
211
+         $varname.outbound_proxy - outbound proxy in new call
212
+         $varname.outbound_proxy - outbound proxy in new call
213
+
205 214
          $varname.transparent_dlg_id - "yes" or "no": use transparent dlg IDs for new call; default no
206 215
                                         - "no" very much advised if current leg was connected before!
207 216
                                           otherwise local tag in current leg will be overwritten on reply