1: <?php
2:
3: namespace tschiemer\Aspsms;
4:
5: 6: 7: 8: 9: 10: 11: 12: 13:
14: class Strings {
15:
16: 17: 18: 19: 20: 21:
22: public static function statusDescription($code)
23: {
24: switch(intval($code))
25: {
26: case 1: return 'OK';
27: case 2: return 'Connect failed.';
28: case 3: return 'Authorization failed.';
29: case 4: return 'Binary file not found. Please check the location.';
30: case 5: return 'Not enough credits available. Please recharge your account to proceed.';
31: case 6: return 'Time out error.';
32: case 7: return 'Transmission error. Please try it again.';
33: case 8: return 'Invalid UserKey. Please check the spelling of the UserKey.';
34: case 9: return 'Invalid Password.';
35: case 10: return 'Invalid originator. A maximum of 11 characters is allowed for alphanumeric originators.';
36: case 11: return 'Invalid message date. Please verify the data.';
37: case 12: return 'Invalid binary data. Please verify the data.';
38: case 13: return 'Invalid binary file. Please check the file type.';
39: case 14: return 'Invalid MCC. Please check the number.';
40: case 15: return 'Invalid MNC. Please check the number.';
41: case 16: return 'Invalid XSer.';
42: case 17: return 'Invalid URL buffered message notification string.';
43: case 18: return 'Invalid URL delivery notification string.';
44: case 19: return 'Invalid URL non delivery notification string.';
45: case 20: return 'Missing a recipient. Please specify at least one recipient.';
46: case 21: return 'Missing binary data. Please specify some data.';
47: case 22: return 'Invalid deferred delivery time. Please check the format.';
48: case 23: return 'Missing transaction reference number.';
49: case 24: return 'Service temporarely not available.';
50: case 25: return 'User access denied.';
51: case 28: return 'No Originator Restrictions.';
52: case 29: return 'Originator Authorization Pending.';
53: case 30: return 'Originator Not Authorized.';
54: case 31: return 'Originator already authorized';
55: case 32: return 'No Notification Recipient Restrictions.';
56: case 33: return 'Notification Recipient Authorization Pending.';
57: case 34: return 'Notification Recipient Not Authorized.';
58: case 35: return 'Notification Recipient Already Authorized.';
59: case 36: return 'Security Token authorization pending';
60: case 37: return 'Security Token not authorized';
61: case 38: return 'Security Token not found';
62: case 39: return 'Security Token already authorized';
63:
64: default: return NULL;
65: }
66: }
67:
68:
69: 70: 71: 72: 73: 74:
75: public static function deliveryStatus($code)
76: {
77: switch (intval($code))
78: {
79: case -1 : return 'Not yet submitted or rejected';
80: case 0 : return 'Delivered';
81: case 1 : return 'Buffered';
82: case 2 : return 'Not delivered';
83:
84: default: return NULL;
85: }
86: }
87:
88: 89: 90: 91: 92: 93: 94:
95: public static function reasonCode($code)
96: {
97: switch (intval($code))
98: {
99: case 0: return 'Unknown subscriber';
100: case 1:
101: case 2:
102: case 3:
103: case 4:
104: case 5:
105: case 6:
106: case 7:
107: case 8: return 'Service temporary not available';
108: case 9: return 'Illegal error code';
109: case 10: return 'Network timeout';
110: case 30: return 'Originator not authorized';
111: case 31: return 'Originator already authorized';
112: case 100: return 'Facility not supported';
113: case 101: return 'Unknown subscriber';
114: case 102: return 'Facility not provided ';
115: case 103: return 'Call barred';
116: case 104: return 'Operation barred';
117: case 105: return 'SC congestion ';
118: case 106: return 'Facility not supported ';
119: case 107: return 'Absent subscriber';
120: case 108: return 'Delivery fail';
121: case 109: return 'SC congestion ';
122: case 110: return 'Protocol error';
123: case 111: return 'MS not equipped';
124: case 112: return 'Unknown SC';
125: case 113: return 'SC congestion';
126: case 114: return 'Illegal MS';
127: case 115: return 'MS not a subscriber';
128: case 116: return 'Error in MS';
129: case 117: return 'SMS lower layer not provisioned';
130: case 118: return 'System fail';
131: case 119: return 'PLMN system failure ';
132: case 120: return 'HLR system failure';
133: case 121: return 'VLR system failure';
134: case 122: return 'Previous VLR system failure';
135: case 123: return 'Controlling MSC system failure';
136: case 124: return 'VMSC system failure';
137: case 125: return 'EIR system failure';
138: case 126: return 'System failure';
139: case 127: return 'Unexpected data value';
140: case 200: return 'Error in address service centre';
141: case 201: return 'Invalid absolute Validity Period';
142: case 202: return 'Short message exceeds maximum';
143: case 203: return 'Unable to Unpack GSM message';
144: case 204: return 'Unable to convert to IA5 ALPHABET';
145: case 205: return 'Invalid validity period format';
146: case 206: return 'Invalid destination address';
147: case 207: return 'Duplicate message submit';
148: case 208: return 'Invalid message type indicator';
149:
150: default: return NULL;
151: }
152: }
153: }
154: