Ok, let me see if I've got this right.
I'm running SER and Asterisk on the same box. SER listens on the external IP of the box on port 5060, Asterisk on localhost (127.0.0.1) on port 5061. My starting point to get calls from SER able to use the real world is the SER PSTN gateway in the Getting Started document, with route[5] changed to:
route[5] { rewritehostport("127.0.0.1:5061"); avp_write("i:45", "inv_timeout"); route(1); }
I start SER and add accounts 306, 307 and 499. So far so good, and when I get it all up and running, SIP phones can call other SIP phones via SER. Now, if I read right, I then need to tell SER that 127.0.0.1 is a trusted account by doing
INSERT INTO trusted VALUES('127.0.0.1', 'any', '^sip:.*$');
in mysql, and restarting SER. I can still dial between internal phones and that is all OK, but I cannot dial via asterisk. I don't even see calls getting there.
If I then add into the trusted table the IP addresses of SIP clients, I can dial from them via asterisk. But I have to do this for every client. This is fine if there are only a limited number of IP addresses that can use the asterisk gateway, but I have users with laptops in the real world whose IP addresses change so it's obviously not an ideal solution.
What am I missing? Is the Call Forwarding setup the answer? I need to use SER as a front end to asterisk because of NAT issues, but I don't want to have to add EVERY user to the trusted table individually.
Regards
John Breen