how to forward a call?

hi,
I want to forward an incoming call to my SIM900 GSM module to another phone number.
In this forum there is an old posting describing how to do so, but in my test sketch it does not work.

My test setup:

  • Arduino Mega 2560 board
  • GSM module with SIM900 connected to Mega 2560
  • Arduino pin 8 is used for tone output
  • Arduino pin 8 is connected to mic input of the GSM module
    This setup is tested for working with the GSM module. I have sketches using this setup for phone calls and SMS.

My test sketch:

callStatus=0;
while (callStatus != CALL_INCOM_VOICE_AUTH) {  // wait for incoming call
  callStatus=gsm.CallStatusWithAuth(phone_number,0,0);  // mit 0,0 sind alle Anrufe authorisiert
  delay(1000);
}
  
  if (callStatus == CALL_INCOM_VOICE_AUTH) {
    Serial.print(F("Anruf von "));Serial.println(phone_number);
   
    gsm.PickUp(); // Anruf annehmen
    Serial.print(F("TALKING: "));
    tone(8, 600, 700);   // sending some sound to caller
    tone(8, 950, 1200);
    tone(8, 600, 700);
    tone(8, 950, 1200) ;

    // now forwarding the call:
    _cell.println(F("AT+CCFC=1,3,\"0157xxxxxxxx\",161,1,1"));

    delay(10000);
    Serial.print((char*)gsm.comm_buf);  // print the GSM response

    gsm.HangUp();
  }

I can hear the tone sound when calling the GSM modules phone number. But the call is not forwarded.
The GSM response is "OK".

What is wrong?

SupArdu:
hi,
I want to forward an incoming call to my SIM900 GSM module to another phone number.
In this forum there is an old posting describing how to do so, but in my test sketch it does not work.

My test setup:

  • Arduino Mega 2560 board
  • GSM module with SIM900 connected to Mega 2560
  • Arduino pin 8 is used for tone output
  • Arduino pin 8 is connected to mic input of the GSM module
    This setup is tested for working with the GSM module. I have sketches using this setup for phone calls and SMS.

My test sketch:

callStatus=0;

while (callStatus != CALL_INCOM_VOICE_AUTH) {  // wait for incoming call
  callStatus=gsm.CallStatusWithAuth(phone_number,0,0);  // mit 0,0 sind alle Anrufe authorisiert
  delay(1000);
}
 
  if (callStatus == CALL_INCOM_VOICE_AUTH) {
    Serial.print(F("Anruf von "));Serial.println(phone_number);
 
    gsm.PickUp(); // Anruf annehmen
    Serial.print(F("TALKING: "));
    tone(8, 600, 700);  // sending some sound to caller
    tone(8, 950, 1200);
    tone(8, 600, 700);
    tone(8, 950, 1200) ;

// now forwarding the call:
    _cell.println(F("AT+CCFC=1,3,"0157xxxxxxxx",161,1,1"));

delay(10000);
    Serial.print((char*)gsm.comm_buf);  // print the GSM response

gsm.HangUp();
  }




I can hear the tone sound when calling the GSM modules phone number. But the call is not forwarded.
The GSM response is "OK".

What is wrong?

Hello I need to similar project.

Project is if i call to GSM module it should forward call to another phone number.

If you have finished project please let me know how to do.