We bought a PORTech MV-374 four-port GSM-SIP gateway, which I hooked up to a Cisco Call Manager Express. Here's how!
Normally the four channels work as four independent SIP ports (5060, 5062, 5064, 5066). This is sub-optimal if you want to hunt for a free outgoing line (for LAN to mobile) because the CME (apparently) can't hunt past busy SIP peers. Get around this by enabling forwarding.
The 192.168.33.102 address is an internal one for the second module.
Note, there's a problem with mobile 3 and 4 registration as the SIP messages appear to come from 192.168.33.102. I haven't worked out how to fix this yet. It may be possible to change the IP to something on the same subnet as the WAN interface (by logging in to the second module at http://wan.ip.address:8080) and then fiddling with the master/slave settings, but this looked awfully painful and the manual recommended not touching it. I can live with just two Mobile to LAN lines for now. In fact I tried doing this and it didn't work at all - it wasn't possible to bridge the second module's interface and avoid NAT. Furthermore, changing the IP doesn't seem to be supported and the technical support people also advised that I don't do it.
voice register global
source-address xxx.xxx.xxx.xxx port 5060 authenticate register ! voice register dn 1 number 8002 name 8002 no-reg label GSM ! voice register dn 2 number 8003 name 8003 no-reg label GSM ! voice register pool 1 id mac 0003.7E00.38DB number 1 dn 1 dtmf-relay rtp-nte username 8002 password 8002 codec g711ulaw ! voice register pool 2 id mac 0003.7E00.38DB number 1 dn 2 dtmf-relay rtp-nte username 8003 password 8003 codec g711ulaw
Now add in dial-peers for each number you want to route through the GSM gateway
dial-peer voice 2 voip destination-pattern 04........ session protocol sipv2 session target ipv4:wan.ip.address dtmf-relay rtp-nte codec g711ulaw no vad
If you're doing this with a group plan that has cheap/free calls between numbers on the same account, just set up an identical dial-peer (with a unique sequence number) for each number (eg, destination-pattern 0499999999).