How to pick up call from SIM900

Hello world, I have this code to receive calls by the shield sim900,
I got everything right, but my problem is how can I pick up that call and be able to talk

#include <SoftwareSerial.h>
char inchar; // Will hold the incoming character from the GSM shield
SoftwareSerial mySerial(7, 8);

int numring=0;
int comring=3;
int onoff=0; // 0 = off, 1 = on

void setup()
{
 Serial.begin(19200);
 // set up the digital pins to control
 pinMode(12, OUTPUT);
 pinMode(13, OUTPUT); // LEDs - off = red, on = green
 digitalWrite(12, HIGH);
 digitalWrite(13, LOW);

 // wake up the GSM shield
  mySerial.begin(19200);
 mySerial.print("AT+CLIP=1\r"); // turn on caller ID notification
 delay(100); 
}


void doSomething()
{
 if (onoff==0)
 {
   onoff=1;
   digitalWrite(12, HIGH);
   digitalWrite(13, LOW);
   Serial.println("D12 high D13 low");
 }
 else
   if (onoff==1)
   {
     onoff=0;
     digitalWrite(12, LOW);
     digitalWrite(13, HIGH);
     Serial.println("D12 low D13 high");
   }
}

void loop()
{
 if(mySerial.available() >0)
 {
   inchar=mySerial.read();
   if (inchar=='R')
   {
     delay(10);
     inchar=mySerial.read();
     if (inchar=='I')
     {
       delay(10);
       inchar=mySerial.read();
       if (inchar=='N')
       {
         delay(10);
         inchar=mySerial.read();
         if (inchar=='G')
         {
           delay(10);
           // So the phone (our GSM shield) has 'rung' once, i.e. if it were a real phone
           // it would have sounded 'ring-ring' or 'blurrrrr' or whatever one cycle of your ring tone is
           numring++;
           Serial.println("ring!");
           if (numring==comring)
           {
             numring=0; // reset ring counter
             doSomething();
           }
         }
       }
     }
   }
 }
}

I don't know the answer but your Title is very uninformative. If you had something like "How to pick up call from SIM900" someone who does know might notice it. If you modify your Original Post you can change the Title

And I bet there are no smileys in your code. To make it easy for people to help you please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum .

...R

Worth a look ?

hammy:
Worth a look ?

SIM900 GSM GPRS Shield with Arduino | Random Nerd Tutorials

thanks I will try this and see what happens...