FACT++  1.0
int SkypeClient::HandleSMS ( const EventImp )
inlineprivate

Definition at line 109 of file skypeclient.cc.

110  {
111  /*
112  -> CREATE SMS OUTGOING +0123456789
113  <- SMS 821 STATUS COMPOSING
114  <- SMS 821 PRICE 0
115  <- SMS 821 TIMESTAMP 0
116  <- SMS 821 PRICE_PRECISION 3
117  <- SMS 821 PRICE_CURRENCY EUR
118  <- SMS 821 STATUS COMPOSING
119  <- SMS 821 TARGET_NUMBERS +0123456789
120  <- SMS 821 PRICE -1
121  <- SMS 821 TARGET_STATUSES +0123456789=TARGET_ANALYZING
122  <- SMS 821 TARGET_STATUSES +0123456789=TARGET_ACCEPTABLE
123  <- SMS 821 PRICE 78
124 
125  //-------------------------------------------------------------------
126  // Now let's add two more target numbers (in addition to original)
127  -> SET SMS 1702 TARGET_NUMBERS +37259877305, +37259877306, +37259877307
128  <- SMS 1702 TARGET_NUMBERS +37259877305, +37259877306, +37259877307
129  <- SMS 1702 TARGET_NUMBERS +37259877305, +37259877306, +37259877307
130  <- SMS 1702 PRICE -1
131  <- SMS 1702 TARGET_STATUSES +37259877305=TARGET_ACCEPTABLE, +37259877306=TARGET_ANALYZING, +37259877307=TARGET_ANALYZING
132  <- SMS 1702 TARGET_STATUSES +37259877305=TARGET_ACCEPTABLE, +37259877306=TARGET_ACCEPTABLE, +37259877307=TARGET_ACCEPTABLE
133  <- SMS 1702 TARGET_STATUSES +37259877305=TARGET_ACCEPTABLE, +37259877306=TARGET_ACCEPTABLE, +37259877307=TARGET_ACCEPTABLE
134  <- SMS 1702 PRICE 234
135 
136  TARGET_ANALYZING
137  TARGET_UNDEFINED
138  TARGET_ACCEPTABLE
139  TARGET_NOT_ROUTABLE
140  TARGET_DELIVERY_PENDING
141  TARGET_DELIVERY_SUCCESSFUL
142  TARGET_DELIVERY_FAILED
143  UNKNOWN
144 
145  // ----------------------------------------------------------------
146  // This is how to set the message text property
147  // Note that you will get two identical lines in response
148  -> SET SMS 821 BODY "test 123 test 223 test 333"
149  <- SMS 821 BODY "test 123 test 223 test 333"
150  <- SMS 821 BODY "test 123 test 223 test 333"
151 
152  // ----------------------------------------------------------------
153  // Now lets try to send the message
154  -> ALTER SMS 821 SEND
155  <- ALTER SMS 821 SEND
156  <- SMS 821 STATUS SENDING_TO_SERVER
157  <- SMS 821 TIMESTAMP 1174058095
158  <- SMS 821 TARGET_STATUSES +0123456789=TARGET_ACCEPTABLE
159  <- SMS 821 TARGET_STATUSES +0123456789=TARGET_DELIVERY_FAILED
160  <- SMS 821 FAILUREREASON INSUFFICIENT_FUNDS
161  <- SMS 821 STATUS FAILED
162  <- SMS 821 IS_FAILED_UNSEEN TRUE
163 
164  STATUS
165  RECEIVED the message has been received (but not tagged as read)
166  READ the message has been tagged as read
167  COMPOSING the message has been created but not yet sent
168  SENDING_TO_SERVER the message is in process of being sent to server
169  SENT_TO_SERVER the message has been sent to server
170  DELIVERED server has confirmed that the message is sent out to recepient
171  SOME_TARGETS_FAILED server reports failure to deliver the message to one of the recepients within 24h
172  FAILED the message has failed, possible reason may be found in FAILUREREASON property
173  UNKNOWN message status is unknown
174 
175  FAILUREREASON
176  MISC_ERROR indicates failure to supply a meaningful error message
177  SERVER_CONNECT_FAILED unable to connect to SMS server
178  NO_SMS_CAPABILITY recepient is unable to receive SMS messages
179  INSUFFICIENT_FUNDS insufficient Skype Credit to send an SMS message
180  INVALID_CONFIRMATION_CODE set when an erroneous code was submitted in a CONFIRMATION_CODE_SUBMIT message
181  USER_BLOCKED user is blocked from the server
182  IP_BLOCKED user IP is blocked from the server
183  NODE_BLOCKED user p2p network node has been blocked from the server
184  UNKNOWN default failure code
185  NO_SENDERID_CAPABILITY Set when a CONFIRMATION_CODE_REQUEST SMS message is sent with a mobile phone number containing country code of either USA, Taiwan or China. Setting reply-to number from Skype SMS’s to your mobile number is not supported in these countries. Added in Skype version 3.5 (protocol 8).
186 
187  // ----------------------------------------------------------------
188  // As sending the message failed (not enough Skype credit),
189  // lets delete the message
190  -> DELETE SMS 821
191  <- DELETE SMS 821
192  */
193 
194  return GetCurrentState();
195  }
int GetCurrentState() const
return the current state of the machine