I was not able to resolve my problem using wvdial.
However, I used pppd directly to set up the connection and it worked fine.
If anyone would need it, I'll post the brief instructions on how to do it.
First, create file /etc/ppp/peers/ with the following content:
/dev/ connect '/usr/sbin/chat -v -f /etc/chatscripts/gprs -T ' defaultroute usepeerdns unit persist chap-interval 60 ipparam user "" nopcomp novjccomp nobsdcomp nodeflate noaccomp lcp-echo-interval 2 lcp-echo-failure 3 noipdefault
Second, add the following line to the /etc/ppp/pap-secrets and /etc/ppp/chap-secrets:
"" ""
The connection can be set up using the command "pon " and closed using the command "poff".
You need to replace with any string you want to use to identify this connection; with the device name of your serial port (ttyS0, ttyS1... for COM ports and ttyUSB0, ttyUSB1... for USB modems); and with the login and password used to connect to your ISP and with your ISP's APN. Also you can choose any . For example, 100 to have your ppp interface named "ppp100".