MGPLocated in /mgp.php (line 61)
integer
moveMessages
(string $fromconn, string $toconn, [array $ids = null], [int &$moved_messages = 0])
integer
pbUpdate
(integer $pbid, [string $company = null], [string $name = null], [string $destaddr = null])
charCode (line 481)
close (line 455)
Close the connection to server.
confirmMessage (line 647)
Confirm that the given message has been succesfully received.
If this function isn't called, the same message will be delivered again after the next login.
Returns the value of the MGP::OPTION_RETCODE parameter.
connect (line 445)
Connect to the EMG server on the specified host and port.
The EMG server must have an incoming MGP connector listening on the specified IP address/hostname and port.
If usessl is true, the connection is encrypted using OpenSSL.
The host and port are saved, so if the connection is broken, the driver automatically reconnects on the next request.
connectorHold (line 747)
Set the "hold" status of a connector.
The status should either be true to pause outgoing traffic on the connector or false to reenable traffic again.
Returns an array containing the result code for key 'retcode', and the current status for key 'status'.
deleteMessage (line 604)
Delete the message with the specified message id.
Returns the value of the OPTION_RETCODE parameter.
getConnectorInfo (line 904)
Fetch information about one or all connectors.
Returns an array containing the result code for key 'retcode', and an array with connector information for key 'list'.
In this second array, the connector names are used as keys, and the values are arrays themselves.
In the connector info arrays, the following keys are used:
getConnectorQueue (line 683)
Fetch the list of pending messages on a connector.
If the $maxsize parameter isn't set, it defaults to 100 (by the server).
Returns an array containing the result code for key 'retcode', the total number of messages for key 'queuesize', and a list of messages with type SMS for key 'list'.
getDatabaseInfo (line 957)
Fetch information about one or all database profiles.
Returns an array containing the result code for key 'retcode', and an array with connector information for key 'list'.
In this second array, the connector names are used as keys, and the values are arrays themselves.
In the connector info arrays, the following keys are used:
getFirstMessage (line 623)
Fetch the first message on the current connector.
Returns an array with the result code for key 'retcode', the current queue size on the connector for key 'queuesize', and the fetched message for key 'sms'.
Afterwards, a call to confirm_message must be done to remove it from the server. Otherwise the same message will be returned again on the next connection.
getOrphans (line 730)
Fetch the list of the most recent messages that couldn't be routed.
Returns an array containing the result code for key 'retcode', and a list of messages with type SMS for key 'list'.
getRawConnectorInfo (line 849)
Fetch information about one or all connectors.
Returns an array containing the result code for key 'retcode', and an array with connector information for key 'list'.
In this second array, the connector names are used as keys, and the values are arrays themselves.
In the connector info arrays, the following keys are used:
getRouteLog (line 716)
Fetch the list of the most recent messages, including their routing and delivery status.
Returns an array containing the result code for key 'retcode', and a list of messages with type SMS for key 'list'.
isadmin (line 465)
Test if the currently logged in user has administration privileges.
logoff (line 559)
Log out from the EMG server.
This also closes the socket.
Returns the value of the OPTION_RETCODE parameter.
logon (line 537)
Log on to the server using the specified username and password.
The connector must have a USERS file with the user credentials or reference a databaseprofile (USERDB) with the user specified.
Returns the value of the OPTION_RETCODE parameter.
moveMessages (line 1134)
Move one or more messages from one connector queue to another.
Returns the value of the MGP::OPTION_RETCODE parameter.
name (line 488)
pbAdd (line 1048)
Add an entry to a phonebook.
Only a user with administration privileges can add entries to a system phonebook.
Returns the value of the MGP::OPTION_RETCODE parameter.
pbCreate (line 1010)
Create a new phonebook.
Returns the value of the MGP::OPTION_RETCODE parameter.
pbDelete (line 1027)
Delete a phonebook.
Only a user with administration privileges can delete a system phonebook.
Returns the value of the MGP::OPTION_RETCODE parameter.
pbList (line 988)
Fetch a phonebook list.
If the parameter is absent, the list of available phonebooks is returned.
The phonebook list is a hash table, with the phonebook id as the key, and a hash table with options as the value. In this second hash table, the following keys are used:
The phonebook entry list is a hash table, with the phonebook entry id as the key, and a hash table with options as the value. In this second hash table, the following keys are used:
pbRemove (line 1096)
Delete a phonebook entry.
Only a user with administration privileges can delete entries in a system phonebook.
Returns the value of the MGP::OPTION_RETCODE parameter.
pbUpdate (line 1070)
Update a phonebook entry.
Only a user with administration privileges can update entries in a system phonebook.
Returns the value of the MGP::OPTION_RETCODE parameter.
perms (line 495)
queryMessage (line 589)
Query the status of a message.
Returns an array containing the result code for key 'retcode', and an SMS object containing the available fields for key 'sms'.
reload (line 1116)
Reload or refresh the EMG server.
When the closeall parameter is true all connections will be closed and the current MGP connection will also be lost. This corresponds to running "emgd -refresh" from the command-line.
When the closeall parameter is false connections will be kept. This corresponds to running "emgd -reload" from the command-line.
Returns the value of the MGP::OPTION_RETCODE parameter.
remoteip (line 502)
sendMessage (line 573)
Send a message.
Returns an array containing the result code for key 'retcode', and (if successful) the message id for key 'messageid'.
stateName (line 854)
systemType (line 474)
A_ETX
= 3
(line 340)
A_STX
= 2
(line 339)
ERR_BOUND
= 4
(line 323)
ERR_BUSY
= 17
(line 336)
ERR_COMM
= 13
(line 332)
ERR_CREDITS
= 16
(line 335)
ERR_DB
= 14
(line 333)
ERR_INVALARG
= 5
(line 324)
ERR_INVALCMD
= 6
(line 325)
ERR_INVALDESTADDR
= 8
(line 327)
ERR_INVALMSGID
= 7
(line 326)
ERR_INVALRESP
= 12
(line 331)
ERR_INVALSOURCEADDR
= 9
(line 328)
ERR_LOGIN
= 3
(line 322)
ERR_MESSAGE
= 11
(line 330)
ERR_NOACCESS
= 10
(line 329)
ERR_OK
= 0
(line 319)
ERR_SYNTAX
= 2
(line 321)
ERR_TOOLONG
= 18
(line 337)
ERR_UDH
= 15
(line 334)
ERR_UNKNOWN
= 1
(line 320)
OPTION_ACLENTRYWHEREID
= 0x008f
(line 262)
OPTION_ACLENTRYWHOID
= 0x008e
(line 261)
OPTION_ARCORFUNC
= 0x00a5
(line 284)
OPTION_ARCORMOD
= 0x00a4
(line 283)
OPTION_ARCORUNIT
= 0x00a6
(line 285)
OPTION_AUROUTE
= 0x00bc
(line 307)
OPTION_AUROUTELIST
= 0x00bd
(line 308)
OPTION_AUTHCODE
= 0x001d
(line 152)
OPTION_AUTHNPI
= 0x004e
(line 199)
OPTION_AUTHTON
= 0x004d
(line 198)
OPTION_AVGINSTANCES1
= 0x0079
(line 240)
OPTION_BILLINGID
= 0x004f
(line 200)
OPTION_BUFFEREDSTATUS
= 0x00b3
(line 298)
OPTION_CALLBACKNUM
= 0x0030
(line 169)
OPTION_CANCELMODE
= 0x0039
(line 178)
OPTION_CHARCODE
= 0x001c
(line 151)
OPTION_CLIENTCONFIG
= 0x0062
(line 217)
OPTION_COMPANY
= 0x0063
(line 218)
OPTION_CONCATSMSMAX
= 0x004b
(line 196)
OPTION_CONCATSMSREF
= 0x0049
(line 194)
OPTION_CONCATSMSSEQ
= 0x004a
(line 195)
OPTION_CONNECTOR
= 0x003b
(line 180)
OPTION_CONTENTLOCATION
= 0x00a1
(line 280)
OPTION_CONTENTTYPE
= 0x00a0
(line 279)
OPTION_CREDITS
= 0x007f
(line 246)
OPTION_DBDATA
= 0x007e
(line 245)
OPTION_DBNAME
= 0x007d
(line 244)
OPTION_DBSQL
= 0x007c
(line 243)
OPTION_DCS
= 0x0071
(line 232)
OPTION_DELTIME
= 0x0014
(line 143)
OPTION_DESTADDR
= 0x0008
(line 131)
OPTION_DESTADDRNPI
= 0x000a
(line 133)
OPTION_DESTADDRSUBUNIT
= 0x000d
(line 136)
OPTION_DESTADDRTON
= 0x0009
(line 132)
OPTION_DESTADDRTYPE
= 0x0081
(line 248)
OPTION_DESTFULLNAME
= 0x00a2
(line 281)
OPTION_DESTNETWORK
= 0x00b0
(line 295)
OPTION_DESTNETWORKTYPE
= 0x003f
(line 184)
OPTION_DESTPORT
= 0x000c
(line 135)
OPTION_DESTSUBADDRESS
= 0x000b
(line 134)
OPTION_DLR
= 0x0013
(line 142)
OPTION_DLRADDRESS
= 0x0046
(line 191)
OPTION_DLRBUF
= 0x00a3
(line 282)
OPTION_DLREXPIRES
= 0x0042
(line 187)
OPTION_DLRID
= 0x0051
(line 202)
OPTION_DLRPID
= 0x0047
(line 192)
OPTION_DLR_IN
= 0x00b7
(line 302)
OPTION_DLR_OUT
= 0x00b8
(line 303)
OPTION_DOMAIN
= 0x0048
(line 193)
OPTION_DONETS
= 0x0098
(line 271)
OPTION_ENDMSECS
= 0x0060
(line 215)
OPTION_ENDSECS
= 0x005f
(line 214)
OPTION_HEADER
= 0x0073
(line 234)
OPTION_HPLMNADDR
= 0x006e
(line 229)
OPTION_ID
= 0x0001
(line 124)
OPTION_IMSI
= 0x008a
(line 257)
OPTION_INREPLYTO
= 0x009a
(line 273)
OPTION_INSTANCE
= 0x005b
(line 211)
OPTION_INSTANCES
= 0x0055
(line 205)
OPTION_INSTANCES_INUSE
= 0x00af
(line 294)
OPTION_INTERFACEVERSION
= 0x003a
(line 179)
OPTION_ISADMIN
= 0x0069
(line 224)
OPTION_ITSSESSIONINFO
= 0x00ab
(line 290)
OPTION_KEYWORD
= 0x0074
(line 235)
OPTION_LANGUAGEINDICATOR
= 0x0031
(line 170)
OPTION_LAST
= 0x00be
(line 310)
OPTION_LASTDLRMSECS
= 0x00ad
(line 292)
OPTION_LASTDLRSECS
= 0x00ac
(line 291)
OPTION_LONGMESSAGE
= 0x0036
(line 175)
OPTION_LONGMODE
= 0x0037
(line 176)
OPTION_LRADDR
= 0x006c
(line 227)
OPTION_LRPID
= 0x006d
(line 228)
OPTION_MAPPING
= 0x0045
(line 190)
OPTION_MAXINSTANCES
= 0x0078
(line 239)
OPTION_MAXMESSAGELENGTH
= 0x0072
(line 233)
OPTION_MESSAGE
= 0x0010
(line 139)
OPTION_MESSAGEID
= 0x0099
(line 272)
OPTION_MESSAGELEN
= 0x0011
(line 140)
OPTION_MESSAGEMODE
= 0x002a
(line 163)
OPTION_MESSAGESTATE
= 0x0034
(line 173)
OPTION_MESSAGE_ERROR
= 0x00ba
(line 305)
OPTION_MMSDESTADDR
= 0x0091
(line 264)
OPTION_MMS_RELAY_SERVER_ID
= 0x00b6
(line 301)
OPTION_MODE
= 0x007b
(line 242)
OPTION_MSGCLASS
= 0x001b
(line 150)
OPTION_MSGSUBTYPE
= 0x001a
(line 149)
OPTION_MSGTYPE
= 0x0019
(line 148)
OPTION_MSISDN
= 0x0092
(line 265)
OPTION_NAME
= 0x0064
(line 219)
OPTION_NETWORKERRORCODE
= 0x0033
(line 172)
OPTION_NETWORK_ERROR
= 0x00bb
(line 306)
OPTION_NEWPASSWORD
= 0x0018
(line 147)
OPTION_NOTE
= 0x0061
(line 216)
OPTION_OPERATOR
= 0x00b9
(line 304)
OPTION_OPSENTEXPIRES
= 0x0041
(line 186)
OPTION_ORIGDESTADDR
= 0x0087
(line 254)
OPTION_ORIGID
= 0x008c
(line 259)
OPTION_ORIGIN
= 0x0096
(line 269)
OPTION_ORIGSOURCEADDR
= 0x0086
(line 253)
OPTION_OTOA
= 0x0070
(line 231)
OPTION_OUTCONNECTOR
= 0x003c
(line 181)
OPTION_PASSWORD
= 0x0017
(line 146)
OPTION_PBID
= 0x0068
(line 223)
OPTION_PBNAME
= 0x0065
(line 220)
OPTION_PBTYPE
= 0x0066
(line 221)
OPTION_PDUSEQ
= 0x0084
(line 251)
OPTION_PDUSEQMAX
= 0x0085
(line 252)
OPTION_PLUGINARG
= 0x0090
(line 263)
OPTION_PRIORITY
= 0x0020
(line 154)
OPTION_PRIVACYINDICATOR
= 0x002f
(line 168)
OPTION_PROTOCOL
= 0x0054
(line 204)
OPTION_PROTOCOLID
= 0x002b
(line 164)
OPTION_PROXY
= 0x00be
(line 309)
OPTION_QPRIORITY
= 0x0076
(line 237)
OPTION_QSTATS1
= 0x0058
(line 208)
OPTION_QSTATS5
= 0x0059
(line 209)
OPTION_QSTATS15
= 0x005a
(line 210)
OPTION_QUEUESIZE
= 0x0056
(line 206)
OPTION_QUOTEDREPLY
= 0x009c
(line 275)
OPTION_QUOTEDREPLY_SEPARATOR
= 0x009d
(line 276)
OPTION_REASON
= 0x0067
(line 222)
OPTION_REASONTEXT
= 0x00aa
(line 289)
OPTION_RECEIPTEDMESSAGEID
= 0x0035
(line 174)
OPTION_REFERENCES
= 0x009b
(line 274)
OPTION_REGISTEREDDELIVERY
= 0x0038
(line 177)
OPTION_REMOTEIP
= 0x0022
(line 156)
OPTION_REMOVEPREFIX
= 0x0075
(line 236)
OPTION_REMOVEPREFIX_SOURCEADDR
= 0x0083
(line 250)
OPTION_REPLACEIFPRESENTFLAG
= 0x002c
(line 165)
OPTION_REPLACEPID
= 0x006b
(line 226)
OPTION_REPLYPATH
= 0x001f
(line 153)
OPTION_REQUIREPREFIX
= 0x004c
(line 197)
OPTION_REQUIREPREFIX_SOURCEADDR
= 0x0082
(line 249)
OPTION_RETCODE
= 0x0028
(line 161)
OPTION_ROUTE
= 0x0026
(line 159)
OPTION_ROUTE2
= 0x0043
(line 188)
OPTION_ROUTEDLR
= 0x0027
(line 160)
OPTION_SCAADDR
= 0x00a7
(line 286)
OPTION_SCAADDRNPI
= 0x00a9
(line 288)
OPTION_SCAADDRTON
= 0x00a8
(line 287)
OPTION_SCTS
= 0x0015
(line 144)
OPTION_SENDERADDRESS
= 0x0095
(line 268)
OPTION_SENDERTS
= 0x0089
(line 256)
OPTION_SERVICEDESCRIPTION
= 0x0088
(line 255)
OPTION_SERVICEID
= 0x008d
(line 260)
OPTION_SERVICETYPE
= 0x0029
(line 162)
OPTION_SERVICETYPEIN
= 0x009e
(line 277)
OPTION_SINGLESHOT
= 0x0050
(line 201)
OPTION_SMPPOPTION
= 0x00b2
(line 297)
OPTION_SMSCID
= 0x0040
(line 185)
OPTION_SMSCOP
= 0x0024
(line 158)
OPTION_SMTP_RET
= 0x00ae
(line 293)
OPTION_SOURCEADDR
= 0x0002
(line 125)
OPTION_SOURCEADDRNPI
= 0x0004
(line 127)
OPTION_SOURCEADDRSUBUNIT
= 0x0007
(line 130)
OPTION_SOURCEADDRTON
= 0x0003
(line 126)
OPTION_SOURCEADDRTYPE
= 0x0080
(line 247)
OPTION_SOURCEFULLNAME
= 0x009f
(line 278)
OPTION_SOURCENETWORKTYPE
= 0x003e
(line 183)
OPTION_SOURCEPORT
= 0x0006
(line 129)
OPTION_SOURCESUBADDRESS
= 0x0005
(line 128)
OPTION_STARTMSECS
= 0x005e
(line 213)
OPTION_STARTSECS
= 0x005d
(line 212)
OPTION_STATE
= 0x0053
(line 203)
OPTION_STATIC
= 0x007a
(line 241)
OPTION_STATUS
= 0x003d
(line 182)
OPTION_SUBJECT
= 0x006f
(line 230)
OPTION_SUBMITTS
= 0x0097
(line 270)
OPTION_SYSTEMTYPE
= 0x0023
(line 157)
OPTION_TARIFFCLASS
= 0x0021
(line 155)
OPTION_TARIFFNAME
= 0x00b1
(line 296)
OPTION_TCPSOURCEIP
= 0x0094
(line 267)
OPTION_TCPSOURCEPORT
= 0x0044
(line 189)
OPTION_TTSSESSIONINFO
= 0x0032
(line 171)
OPTION_TYPE
= 0x0057
(line 207)
OPTION_UDH
= 0x000e
(line 137)
OPTION_UDHI
= 0x006a
(line 225)
OPTION_UDHLEN
= 0x000f
(line 138)
OPTION_USERMESSAGEREFERENCE
= 0x002d
(line 166)
OPTION_USERNAME
= 0x0016
(line 145)
OPTION_USERRESPONSECODE
= 0x002e
(line 167)
OPTION_VLR
= 0x008b
(line 258)
OPTION_VP
= 0x0012
(line 141)
OPTION_WAPAPPLICATION
= 0x00b4
(line 299)
OPTION_XPRIORITY
= 0x0093
(line 266)
OPTION_XSER_EXTRA
= 0x00b5
(line 300)
OPTION_XUSERNAME
= 0x0077
(line 238)
OP_BEGINBATCH
= 4
(line 71)
OP_BEGINBATCH_RESP
= 104
(line 72)
OP_CONFIRMMESSAGE
= 30
(line 113)
OP_CONFIRMMESSAGE_RESP
= 130
(line 114)
OP_CONNECTORHOLD
= 27
(line 107)
OP_CONNECTORHOLD_RESP
= 127
(line 108)
OP_DBREQUEST
= 28
(line 109)
OP_DBREQUEST_RESP
= 128
(line 110)
OP_DELETEMESSAGE
= 11
(line 85)
OP_DELETEMESSAGE_RESP
= 111
(line 86)
OP_ENDBATCH
= 5
(line 73)
OP_ENDBATCH_RESP
= 105
(line 74)
OP_GETCONNECTORINFO
= 6
(line 75)
OP_GETCONNECTORINFO_RESP
= 106
(line 76)
OP_GETCONNECTORQUEUE
= 8
(line 79)
OP_GETCONNECTORQUEUE_RESP
= 108
(line 80)
OP_GETDBINFO
= 31
(line 115)
OP_GETDBINFO_RESP
= 131
(line 116)
OP_GETFIRSTMESSAGE
= 29
(line 111)
OP_GETFIRSTMESSAGE_RESP
= 129
(line 112)
OP_GETORPHANS
= 9
(line 81)
OP_GETORPHANS_RESP
= 109
(line 82)
OP_GETROUTELOG
= 14
(line 91)
OP_GETROUTELOG_RESP
= 114
(line 92)
OP_KEEPALIVE
= 13
(line 89)
OP_KEEPALIVE_RESP
= 113
(line 90)
OP_LOGOFF
= 3
(line 69)
OP_LOGOFF_RESP
= 103
(line 70)
OP_LOGON
= 1
(line 65)
OP_LOGON_RESP
= 101
(line 66)
OP_MODIFYMESSAGE
= 12
(line 87)
OP_MODIFYMESSAGE_RESP
= 112
(line 88)
OP_MOVEMESSAGE
= 33
(line 119)
OP_MOVEMESSAGE_RESP
= 133
(line 120)
OP_PBADD
= 22
(line 97)
OP_PBADD_RESP
= 122
(line 98)
OP_PBCREATE
= 20
(line 93)
OP_PBCREATE_RESP
= 120
(line 94)
OP_PBDELETE
= 21
(line 95)
OP_PBDELETE_RESP
= 121
(line 96)
OP_PBLIST
= 25
(line 103)
OP_PBLIST_RESP
= 125
(line 104)
OP_PBREMOVE
= 24
(line 101)
OP_PBREMOVE_RESP
= 124
(line 102)
OP_PBUPDATE
= 23
(line 99)
OP_PBUPDATE_RESP
= 123
(line 100)
OP_QUERYMESSAGE
= 10
(line 83)
OP_QUERYMESSAGE_RESP
= 110
(line 84)
OP_REFRESH
= 7
(line 77)
OP_REFRESH_RESP
= 107
(line 78)
OP_RELOAD
= 32
(line 117)
OP_RELOAD_RESP
= 132
(line 118)
OP_REQUESTMESSAGE
= 26
(line 105)
OP_REQUESTMESSAGE_RESP
= 126
(line 106)
OP_SENDMESSAGE
= 2
(line 67)
OP_SENDMESSAGE_RESP
= 102
(line 68)
PBTYPE_SYSTEM
= 1
(line 315)
PBTYPE_USER
= 0
(line 314)
Documentation generated on Wed, 17 Aug 2011 09:38:31 +0200 by phpDocumentor 1.4.3