How I can get a phone number from simcard using AT command?

Quite so.

But some operators do provide a facility for you to find your own number,

eg, on UK Vodafone, dial *#100# and the answer will come as, for example:

+CUSD: 2,“07999123456”,255

This can also be requested with AT+CUSD=1,“*#100#”

You will need to check with your Network Operator(s) for specific details…