2005-09-02 11:41:28 +00:00
|
|
|
/*
|
|
|
|
* Mbuni - Open Source MMS Gateway
|
|
|
|
*
|
|
|
|
* MMSC CFG: MMC configuration and misc. functions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 - 2005, Digital Solutions Ltd. - http://www.dsmagic.com
|
|
|
|
*
|
|
|
|
* Paul Bagyenda <bagyenda@dsmagic.com>
|
|
|
|
*
|
|
|
|
* This program is free software, distributed under the terms of
|
|
|
|
* the GNU General Public License, with a few exceptions granted (see LICENSE)
|
|
|
|
*/
|
2005-09-01 10:26:36 +00:00
|
|
|
#ifndef __MMSC_CFG__
|
|
|
|
#define __MMSC_CFG__
|
|
|
|
#include "mms_util.h"
|
2006-10-27 14:27:30 +00:00
|
|
|
#include "mms_resolve_shell.h"
|
|
|
|
#include "mms_billing_shell.h"
|
|
|
|
#include "mms_detokenize_shell.h"
|
2007-08-20 11:49:30 +00:00
|
|
|
#include "mms_queue.h"
|
2005-09-01 10:26:36 +00:00
|
|
|
|
|
|
|
typedef struct MmsProxyRelay {
|
|
|
|
Octstr *host;
|
|
|
|
Octstr *name;
|
|
|
|
Octstr *allowed_prefix;
|
|
|
|
Octstr *denied_prefix;
|
2007-03-20 16:43:44 +00:00
|
|
|
int confirmed_mm4;
|
2005-09-01 10:26:36 +00:00
|
|
|
} MmsProxyRelay;
|
|
|
|
|
|
|
|
typedef struct MmsVasp {
|
|
|
|
Octstr *id;
|
|
|
|
long short_code;
|
|
|
|
enum {SOAP_VASP, EAIF_VASP, NONE_VASP} type;
|
|
|
|
Octstr *vasp_username, *vasp_password;
|
|
|
|
Octstr *vasp_url;
|
2007-08-06 11:57:15 +00:00
|
|
|
enum {UAProf_None, UAProf_URL, UAProf_UA} send_uaprof;
|
2007-04-10 09:56:46 +00:00
|
|
|
MM7Version_t ver;
|
2005-09-01 10:26:36 +00:00
|
|
|
} MmsVasp;
|
|
|
|
|
|
|
|
typedef struct MmscSettings {
|
|
|
|
Octstr *system_user;
|
|
|
|
Octstr *name, *hostname, *host_alias;
|
|
|
|
Octstr *unified_prefix, *local_prefix;
|
|
|
|
Octstr *sendmail;
|
2007-08-20 11:49:30 +00:00
|
|
|
|
2007-03-20 16:43:44 +00:00
|
|
|
Octstr *global_queuedir, *mm1_queuedir;
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *mmbox_rootdir;
|
|
|
|
|
2007-08-20 11:49:30 +00:00
|
|
|
MmsQueueHandlerFuncs *qfs;
|
|
|
|
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *ua_profile_cache_dir;
|
|
|
|
|
|
|
|
long maxthreads;
|
|
|
|
long maxsendattempts;
|
|
|
|
long default_msgexpiry;
|
|
|
|
double queue_interval;
|
|
|
|
long send_back_off;
|
|
|
|
|
|
|
|
long port, mm7port;
|
|
|
|
|
|
|
|
Octstr *allow_ip;
|
|
|
|
Octstr *deny_ip;
|
|
|
|
|
2006-02-28 10:36:36 +00:00
|
|
|
Octstr *email2mmsrelay_hosts;
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *sendsms_url;
|
|
|
|
#if 0
|
|
|
|
Octstr *sendsms_user, *sendsms_pass, *sendsms_globalsender;
|
|
|
|
#endif
|
|
|
|
Octstr *billing_params;
|
|
|
|
|
|
|
|
MmsBillingFuncStruct *mms_billfuncs; /* Link to billing funcs. */
|
|
|
|
void *mms_bill_module_data;
|
|
|
|
|
|
|
|
Octstr *resolver_params;
|
|
|
|
MmsResolverFuncStruct *mms_resolvefuncs; /* Link to resolver funcs. */
|
|
|
|
void *mms_resolver_module_data;
|
|
|
|
|
|
|
|
Octstr *detokenizer_params;
|
|
|
|
MmsDetokenizerFuncStruct *mms_detokenizefuncs; /* Link to detokenizer funcs. */
|
|
|
|
void *mms_detokenizer_module_data;
|
|
|
|
|
|
|
|
int allow_ip_type;
|
|
|
|
|
|
|
|
int optimize_notification_size;
|
|
|
|
int content_adaptation;
|
2007-08-09 09:32:49 +00:00
|
|
|
int dlr_on_fetch;
|
|
|
|
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *prov_notify;
|
|
|
|
|
|
|
|
Octstr *prov_getstatus;
|
|
|
|
int notify_unprovisioned;
|
|
|
|
Octstr *mms_notify_txt;
|
|
|
|
Octstr *mms_notify_unprov_txt;
|
|
|
|
Octstr *mms_toolarge;
|
|
|
|
|
|
|
|
Octstr *mms_email_txt;
|
|
|
|
Octstr *mms_email_html;
|
2006-05-13 09:37:25 +00:00
|
|
|
Octstr *mms_email_subject;
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *wap_gw_msisdn_header;
|
|
|
|
Octstr *wap_gw_ip_header;
|
|
|
|
|
|
|
|
List *vasp_list; /* of MmsVasp * */
|
2005-10-25 10:55:01 +00:00
|
|
|
|
|
|
|
MmsVasp *mms2email, *mms2mobile;
|
|
|
|
|
2005-09-01 10:26:36 +00:00
|
|
|
} MmscSettings;
|
|
|
|
|
|
|
|
/* Returns mmsc settings. */
|
2006-02-17 11:48:33 +00:00
|
|
|
MmscSettings *mms_load_mmsc_settings(mCfg *cfg, List **proxyrelays);
|
2005-09-01 10:26:36 +00:00
|
|
|
|
2007-08-22 11:41:57 +00:00
|
|
|
/* do final cleanup. */
|
|
|
|
void mms_cleanup_mmsc_settings(MmscSettings *settings);
|
2005-09-01 10:26:36 +00:00
|
|
|
/* Returns list of MmsProxyRelay */
|
2007-03-20 16:43:44 +00:00
|
|
|
extern List *mms_proxy_relays(mCfg *cfg, Octstr *myhostname);
|
2005-09-01 10:26:36 +00:00
|
|
|
|
|
|
|
extern Octstr *mms_makefetchurl(char *qf, Octstr *token, int loc,
|
|
|
|
Octstr *to,
|
|
|
|
MmscSettings *settings);
|
|
|
|
|
2006-05-08 11:19:38 +00:00
|
|
|
Octstr *mms_find_sender_msisdn(Octstr *send_url,
|
|
|
|
Octstr *ip,
|
|
|
|
List *request_hdrs,
|
2005-09-01 10:26:36 +00:00
|
|
|
Octstr *msisdn_header,
|
2005-09-27 16:46:09 +00:00
|
|
|
Octstr *requestip_header,
|
2005-09-01 10:26:36 +00:00
|
|
|
MmsDetokenizerFuncStruct *detokenizerfuncs);
|
2006-05-08 11:19:38 +00:00
|
|
|
|
|
|
|
extern int mms_decodefetchurl(Octstr *fetch_url,
|
|
|
|
Octstr **qf, Octstr **token, int *loc);
|
|
|
|
Octstr *mms_find_sender_ip(List *request_hdrs, Octstr *ip_header, Octstr *ip, int *isv6);
|
|
|
|
|
2007-08-08 05:38:20 +00:00
|
|
|
void notify_prov_server(char *cmd, char *from, char *event, char *arg, Octstr *msgid,
|
|
|
|
Octstr *ua, Octstr *uaprof);
|
2006-05-08 11:19:38 +00:00
|
|
|
int mms_ind_send(Octstr *prov_cmd, Octstr *to);
|
|
|
|
|
2005-09-01 10:26:36 +00:00
|
|
|
#endif
|