- Changes to mm7/soap module to please java packages (Resin -- SOAP-ENV header prefered)
- Removal of outdated config params
This commit is contained in:
parent
fa8e2b7f02
commit
2a25a4cd3e
|
@ -7,7 +7,6 @@ group = mbuni
|
|||
name = "My MMSC"
|
||||
hostname = ds.co.ug
|
||||
host-alias = mmsc
|
||||
local-mmsc-domains = dsmagic.com
|
||||
local-prefixes = 037;+25637;25637
|
||||
storage-directory = /tmp/spool
|
||||
max-send-threads = 5
|
||||
|
@ -31,7 +30,6 @@ billing-module-parameters = "/tmp/log/cdr.log"
|
|||
content-adaptation = true
|
||||
notify-unprovisioned = yes
|
||||
mms-notify-text = "You have received a multimedia message from %S, go to XXX to view it"
|
||||
mm-box-host = local.ds.co.ug
|
||||
mms-notify-unprovisioned-text = "This is a test"
|
||||
mms-to-email-txt = "This is a multimedia message (HTML suppressed)"
|
||||
mms-to-email-html = "This is a multimedia message powered by <emph>Digital Solutions</emph>"
|
||||
|
|
|
@ -632,9 +632,6 @@ hostname
|
|||
host-alias
|
||||
= mmsc<br>
|
||||
|
||||
local-mmsc-domains=
|
||||
mbuni.org,service.com<br>
|
||||
|
||||
local-prefixes
|
||||
= 075;+25675;25675<br>
|
||||
|
||||
|
@ -757,27 +754,6 @@ lists all the configuration directives. The column <b>Mode</b>
|
|||
notifications. If you do not supply a host alias, the gateway will create a long form URL (http://<i>hostname:port/msgtoken</i>) when it sends notifications
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign=top >
|
||||
<tt>local-mmsc-domains</tt>
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top >
|
||||
<i>MMSC</i>
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top >
|
||||
List of
|
||||
Internet domains (comma separated)
|
||||
</td>
|
||||
<td valign=top >
|
||||
A list of
|
||||
internet domains that should be considered local to this MMS gateway. Email
|
||||
or MMS messages received destined to these domains should be treated as local
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign=top ><tt>local-prefixes</tt>
|
||||
</td>
|
||||
|
|
|
@ -43,7 +43,6 @@ SINGLE_GROUP(mbuni,
|
|||
OCTSTR(name)
|
||||
OCTSTR(hostname)
|
||||
OCTSTR(host-alias)
|
||||
OCTSTR(local-mmsc-domains)
|
||||
OCTSTR(local-prefixes)
|
||||
OCTSTR(storage-directory)
|
||||
OCTSTR(max-send-threads)
|
||||
|
@ -73,7 +72,6 @@ SINGLE_GROUP(mbuni,
|
|||
OCTSTR(notify-unprovisioned)
|
||||
OCTSTR(mms-notify-text)
|
||||
OCTSTR(mms-notify-unprovisioned-text)
|
||||
OCTSTR(mm-box-host)
|
||||
OCTSTR(mms-to-email-txt)
|
||||
OCTSTR(mms-to-email-html)
|
||||
OCTSTR(mms-message-too-large-txt)
|
||||
|
|
|
@ -354,6 +354,8 @@ static void output_rcpt(char *hdr, List *hdrs, Octstr *p)
|
|||
}
|
||||
|
||||
#define XMLNSMM7 "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2"
|
||||
#define SOAP_ENV "SOAP-ENV"
|
||||
|
||||
/* Construct by hand. */
|
||||
Octstr *headers_to_soapxml(List *hdrs)
|
||||
{
|
||||
|
@ -364,16 +366,16 @@ Octstr *headers_to_soapxml(List *hdrs)
|
|||
int mtag;
|
||||
|
||||
octstr_append_cstr(s,
|
||||
"<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"
|
||||
"<env:Header>\n");
|
||||
"<" SOAP_ENV ":Envelope xmlns:" SOAP_ENV "=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"
|
||||
"<" SOAP_ENV ":Header>\n");
|
||||
p = http_header_value(hdrs, octstr_imm("TransactionID"));
|
||||
|
||||
octstr_format_append(s, "<mm7:TransactionID xmlns:mm7=\"%s\" env:mustUnderstand=\"1\">%S</mm7:TransactionID>\n",
|
||||
octstr_format_append(s, "<mm7:TransactionID xmlns:mm7=\"%s\" " SOAP_ENV ":mustUnderstand=\"1\">%S</mm7:TransactionID>\n",
|
||||
XMLNSMM7, p ? p : octstr_imm("none"));
|
||||
if (p)
|
||||
octstr_destroy(p);
|
||||
|
||||
octstr_append_cstr(s, "</env:Header>\n<env:Body>\n");
|
||||
octstr_append_cstr(s, "</" SOAP_ENV ":Header>\n<" SOAP_ENV ":Body>\n");
|
||||
|
||||
fault = http_header_value(hdrs, octstr_imm("Fault"));
|
||||
|
||||
|
@ -381,7 +383,7 @@ Octstr *headers_to_soapxml(List *hdrs)
|
|||
Octstr *fc = http_header_value(hdrs, octstr_imm("faultcode"));
|
||||
Octstr *fs = http_header_value(hdrs, octstr_imm("faultstring"));
|
||||
|
||||
octstr_append_cstr(s, "<env:Fault>\n");
|
||||
octstr_append_cstr(s, "<" SOAP_ENV ":Fault>\n");
|
||||
if (fc) {
|
||||
octstr_format_append(s, "<faultcode>%S</faultcode>\n", fc);
|
||||
octstr_destroy(fc);
|
||||
|
@ -397,7 +399,7 @@ Octstr *headers_to_soapxml(List *hdrs)
|
|||
mtype = http_header_value(hdrs, octstr_imm("MessageType"));
|
||||
mtag = mms_string_to_mm7tag(mtype);
|
||||
|
||||
octstr_format_append(s, "<%S xmlns=\"%s\">\n", mtype, XMLNSMM7);
|
||||
octstr_format_append(s, "<mm7:%S xmlns:mm7=\"%s\">\n", mtype, XMLNSMM7);
|
||||
|
||||
/* Output the details. */
|
||||
p = http_header_value(hdrs, octstr_imm("MM7Version"));
|
||||
|
@ -547,18 +549,18 @@ Octstr *headers_to_soapxml(List *hdrs)
|
|||
if (h) octstr_destroy(h);
|
||||
if (v) octstr_destroy(v);
|
||||
}
|
||||
octstr_format_append(s, "</%S>\n", mtype);
|
||||
octstr_format_append(s, "</mm7:%S>\n", mtype);
|
||||
octstr_destroy(mtype);
|
||||
|
||||
if (fault) {
|
||||
|
||||
octstr_append_cstr(s, "</detail>\n");
|
||||
octstr_append_cstr(s, "</env:Fault>\n");
|
||||
octstr_append_cstr(s, "</" SOAP_ENV ":Fault>\n");
|
||||
octstr_destroy(fault);
|
||||
}
|
||||
|
||||
octstr_append_cstr(s, "</env:Body>\n");
|
||||
octstr_append_cstr(s, "</env:Envelope>\n");
|
||||
octstr_append_cstr(s, "</" SOAP_ENV ":Body>\n");
|
||||
octstr_append_cstr(s, "</" SOAP_ENV ":Envelope>\n");
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -619,7 +621,7 @@ int mm7_soapmsg_to_httpmsg(MSoapMsg_t *m, List **hdrs, Octstr **body)
|
|||
}
|
||||
|
||||
http_header_add(mime->headers, "Content-Type", octstr_get_cstr(ctype));
|
||||
http_header_add(mime->headers, "SOAPAction", "\"\"");
|
||||
http_header_add(mime->headers, "SOAPAction", "\"some-url\"");
|
||||
|
||||
mime_entity_body_and_headers(mime, body, hdrs);
|
||||
|
||||
|
@ -1029,7 +1031,7 @@ MSoapMsg_t *mm7_make_resp(MSoapMsg_t *mreq, int status, Octstr *msgid)
|
|||
|
||||
if (!MM7_SOAP_STATUS_OK(status)) {
|
||||
http_header_add(mresp->envelope, "Fault", ""); /* do we really need these? XXX */
|
||||
http_header_add(mresp->envelope, "faultcode", "env:Server");
|
||||
http_header_add(mresp->envelope, "faultcode", "" SOAP_ENV ":Server");
|
||||
http_header_add(mresp->envelope, "faultstring", "Server error");
|
||||
}
|
||||
|
||||
|
|
|
@ -83,15 +83,6 @@ MmscSettings *mms_load_mmsc_settings(mCfg *cfg, List **proxyrelays)
|
|||
if (proxyrelays)
|
||||
*proxyrelays = mms_proxy_relays(cfg);
|
||||
|
||||
s = _mms_cfg_getx(grp, octstr_imm("local-mmsc-domains"));
|
||||
|
||||
if (s) {
|
||||
l = octstr_split(s, octstr_imm(","));
|
||||
octstr_destroy(s);
|
||||
} else
|
||||
l = list_create();
|
||||
m->local_domains = l;
|
||||
|
||||
if (mms_cfg_get_int(grp, octstr_imm("max-send-threads"), &m->maxthreads) == -1)
|
||||
m->maxthreads = 10;
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ typedef struct MmsVasp {
|
|||
typedef struct MmscSettings {
|
||||
Octstr *system_user;
|
||||
Octstr *name, *hostname, *host_alias;
|
||||
List *local_domains;
|
||||
Octstr *unified_prefix, *local_prefix;
|
||||
Octstr *sendmail;
|
||||
Octstr *global_queuedir, *mm1_queuedir, *mm4_queuedir;
|
||||
|
|
Loading…
Reference in New Issue