Im changing status of the call each time i get a call.
Status has two values and the values are changed on call.
When the call status is changed i send sms as confirmation.
I have made and tested the sms part but now i want to make all this automaticly. The problem is with defining sms auto respond. When the call is recieved i set status and at this point i want to replay to sender but i can’t.
I need to make manual input…
Maybe it would be better if i write some additional details about what im doing
My modul: q2686h.
Im setting 3 gpio’s ( two inputs and one output ).
The input gpio is used for switching events and sending sms confirmation based on call event. After i get ADL_CALL_EVENT_RING_DATA == OK im setting gpio as input or output, based on the last event and am sending sms as confirmation. Last event is changed on call or per sms.
At the moment am in the part of compleating the input gpio function.
I have defined sms.c as external file and gpio handle is set under main file. Sms and input gpio ( gpio trace is trowing -2, but…) are working, if i try to run them separatly.
If i try to call adl_simSubscribe(SimHandler,NULL) and make auto replay to sender, right after i get RING_DATA i can see a trace but thats it.
There is no auto respond. Program stops at trace. ?
If you need the code please let me know, so i can send it.
It means that on each incomming call sended to q2686 i have to make respond to caller, with sms.
After i get ADL_CALL_EVENT_RING_DATA == OK i set input OR output ( based on last defined event ).
If the last defined event is INPUT then you get two additional options… ON/OFF. This ON/OFF options are changed automaticly each time you enter INPUT part. First call is ON, second call is OFF and so on. Each time you make change in input or output part you get sms confirmation that the change is accepted.
Partly typical example would be those free calls (some show etc. )
You call, you get voice answer from the mashine “your call is registered” and the line is hanged up.
I want to make partly the same but instead voice answer i want to send sms to the original caller.
example for input:
ADL_CALL_EVENT_RING_DATA == OK
if gpio is input
read second handler last state
if last state from second handler == ON
set new state for second handler == OFF
send confirmation SMS to caller that the new state is OFF
// SMS Handler: Send a reply to a received text message.
// This is called automatically whenever an SMS is received.
// The parameters give the sender's number, the timestamp, and the text.
// So, to reply to the sender, we just have to use these parameters!
bool SMSHandler( ascii *SmsTel, ascii *SmsTimeLength, ascii *SmsText )
adl_smsSend( Handle, // The handle from your SMS Subscription
SmsTel, // The caller's number
"This is my reply", // The message to send
ADL_SMS_MODE_TEXT ); // Use text mode
Simple as that.
(you should, of course, check the return value from adl_smsSend)