diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 52e9a4c..087cc4d 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,6 +1,7 @@ 2008-09-11 P. A. Bagyenda * MMSBox HTTP MMSC type added, for inter-mmsbox message relay * MM5 support, basic infrastructure on the MMSC side. + * Added default-vasid config param to mmsbox 'mmsc' group 2008-09-08 P. A. Bagyenda * MMSC admin interface added (start/stop/status of each VASP connection) * MMSC VASP can now have multiple short codes diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index e3c3b21..41d5e1b 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -1869,14 +1869,14 @@ vasp-url - short-code + short-codes Number - Short number for this VASP: Messages received by Mbuni to this - number are routed to the VASP via MM7. + Semi-colon separated list of short numbers for this VASP: Messages + received by Mbuni to any of these numbers are routed to the VASP via MM7. @@ -2312,6 +2312,18 @@ Supported configuration parameters are: + + + default-vasid + + + String + + + Optional. The default VAS ID for this connection. Only valid for MM7/SOAP. + + + mmsc-url diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index 8b87bf8..b6ff096 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -180,6 +180,7 @@ MULTI_GROUP(mmsc, OCTSTR(custom-settings) OCTSTR(no-sender-address) + OCTSTR(default-vasid) ) MULTI_GROUP(mms-service, diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index aa41aad..7a94f49 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -893,7 +893,9 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to, List *rh = NULL, *ph = NULL; Octstr *body = NULL, *rbody = NULL, *url = NULL; Octstr *s, *distrib = NULL; - + char *xvasid = vasid ? vasid : + (mmc->default_vasid ? octstr_get_cstr(mmc->default_vasid) : NULL); + mms_info(0, "MM7", mmc->id, "MMSBox: Send[soap] to MMSC[%s], msg type [%s], from %s, to %s", mmc->id ? octstr_get_cstr(mmc->id) : "", mms_message_type_to_cstr(mtype), @@ -907,7 +909,7 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to, xto, transid, service_code, linkedid, - 1, octstr_get_cstr(mmc->id), vasid, NULL, 0,/* UA N/A on this side. */ + 1, octstr_get_cstr(mmc->id), xvasid, NULL, 0,/* UA N/A on this side. */ distrib)) == NULL) { *error = octstr_format("Failed to convert Msg[%S] 2 SOAP message!", mms_message_type_to_string(mtype)); diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 2c6beb5..4627af2 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -590,6 +590,8 @@ MmscGrp *start_mmsc_from_conf(mCfg *cfg, mCfgGrp *x, gwthread_func_t *mmsc_handl m->ver.use_mm7_namespace = 1; mms_cfg_get_bool(cfg, x, octstr_imm("use-mm7-soap-namespace-prefix"), &m->ver.use_mm7_namespace); + m->default_vasid = mms_cfg_get(cfg, x, octstr_imm("default-vasid")); + octstr_destroy(xver); octstr_destroy(type); diff --git a/mbuni/mmsbox/mmsbox_cfg.h b/mbuni/mmsbox/mmsbox_cfg.h index 135d0df..b39b7a5 100644 --- a/mbuni/mmsbox/mmsbox_cfg.h +++ b/mbuni/mmsbox/mmsbox_cfg.h @@ -43,6 +43,8 @@ typedef struct MmscGrp { MM7Version_t ver; /* supported MM7/SOAP version. */ int use_mt_filter; /* whether to use MT filter on this connection. */ Mutex *mutex; + + Octstr *default_vasid; /* default vasid for mm7/soap */ MmsBoxMmscFuncs *fns; /* pointer to functions for handling this mmsc connection type */ Octstr *settings; /* settings for the above module. */