SSerial2Mobile problem

I'm developing a project to university using the arduino.I want to seend sms with a siemens TC35 and I found this libray and it works really great.I just having a litle problem declaring the object to be global and available inside other functions.

If I use this code it works fine

Serial.begin(9600); SSerial2Mobile phone = SSerial2Mobile(RXpin,TXpin);

but if a call the object "phone" inside a function it give a error saying the phone is not declared

void seend_sms_alarm() { // phone.sendTxt("12345678","Test"); delay(3000); }

inside this function the object phone is not recognised.For the test I have made, it only work if it is in the main void loop I was looking into the code of the library hopping there I could declare in some part of the code as global but no sucess:( Can you give me a hint

Thanks for your time Hugo Santos

Code snippets are useless in debugging problems of this nature. Post all of your code, and the output (error messages) from the compilation process.

hugo007: it only work if it is in the main void loop

Did you declare it in the main void looP?

//top of code
SSerial2Mobile phone = SSerial2Mobile(RXpin,TXpin);

void setup(){

void loop(){