aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/smpp_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-05-28 20:58:02 +0200
committerHarald Welte <laforge@gnumonks.org>2013-05-28 20:59:25 +0200
commitc75ed6d593ddfa29fd86b19c842eadf5410d8181 (patch)
treedc7351519ef2ada805b57d47e27130ca568586bc /openbsc/src/libmsc/smpp_vty.c
parent27d5e65640568adb7272ee1081d751d4de607eb2 (diff)
SMPP: Add new 'dcs_transparent' ESME setting
If an ESME has the dcs_transparent config flag, then the TP-DCS of MO-SMS is transparently passed to SMPP and not converted to SMPP specific data_coding values. This is needed in cases where ESMEs actually care about the exact TP-DCS, as the conversion from TP-DCS to SMPP data_coding is not bijective.
Diffstat (limited to 'openbsc/src/libmsc/smpp_vty.c')
-rw-r--r--openbsc/src/libmsc/smpp_vty.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/smpp_vty.c b/openbsc/src/libmsc/smpp_vty.c
index 4c64a3cf1..adea9590e 100644
--- a/openbsc/src/libmsc/smpp_vty.c
+++ b/openbsc/src/libmsc/smpp_vty.c
@@ -361,6 +361,29 @@ DEFUN(cfg_esme_no_osmo_ext, cfg_esme_no_osmo_ext_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_esme_dcs_transp, cfg_esme_dcs_transp_cmd,
+ "dcs-transparent",
+ "Enable the transparent pass-through of TP-DCS to SMPP DataCoding")
+{
+ struct osmo_smpp_acl *acl = vty->index;
+
+ acl->dcs_transparent = 1;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_esme_no_dcs_transp, cfg_esme_no_dcs_transp_cmd,
+ "no dcs-transparent", NO_STR
+ "Disable the transparent pass-through of TP-DCS to SMPP DataCoding")
+{
+ struct osmo_smpp_acl *acl = vty->index;
+
+ acl->dcs_transparent = 0;
+
+ return CMD_SUCCESS;
+}
+
+
static void dump_one_esme(struct vty *vty, struct osmo_esme *esme)
{
char host[128], serv[128];
@@ -419,6 +442,8 @@ static void config_write_esme_single(struct vty *vty, struct osmo_smpp_acl *acl)
vty_out(vty, " deliver-src-imsi%s", VTY_NEWLINE);
if (acl->osmocom_ext)
vty_out(vty, " osmocom-extensions%s", VTY_NEWLINE);
+ if (acl->dcs_transparent)
+ vty_out(vty, " dcs-transparent%s", VTY_NEWLINE);
llist_for_each_entry(r, &acl->route_list, list)
write_esme_route_single(vty, r);
@@ -457,6 +482,8 @@ int smpp_vty_init(void)
install_element(SMPP_ESME_NODE, &cfg_esme_no_defaultroute_cmd);
install_element(SMPP_ESME_NODE, &cfg_esme_osmo_ext_cmd);
install_element(SMPP_ESME_NODE, &cfg_esme_no_osmo_ext_cmd);
+ install_element(SMPP_ESME_NODE, &cfg_esme_dcs_transp_cmd);
+ install_element(SMPP_ESME_NODE, &cfg_esme_no_dcs_transp_cmd);
install_element(SMPP_ESME_NODE, &ournode_exit_cmd);
install_element_ve(&show_esme_cmd);