[OpenSIPS-Users] Calling from one Subnet to another using Prefix

Duc-Lam Tran dltran1983 at gmail.com
Wed Nov 11 03:27:40 CET 2009


Hi there
I got 2 Subnets with the addresses 192.168.1.0 and 172.31.10.0
Between those two OpenSips is a Linux Debian Gateway installed with IP  
forwarding and 2 Network Interfaces.
OpenSips1 ---- Gateway ---- OpenSips2
My Goal is to config the OpenSips that i can call from Subnet 1 to  
Subnet 2 using Prefixes.
I got a Sipphone at Subnet 1 (Callnumber 1000) and another at subnet 2  
(1001)
My configutarion of opensips.cfg for prefix calling is:
if (uri=~"sip:01[0-9]+@) {
	strip(2);
	rewritehost("192.168.1.2"); // ip from opensips1
	t_relay();
	exit;
}
--> if I dial 01-1000 (01 Prefix) from agent 2 than i should get a  
ring at agent 1. but it doesnt work (time out)
is this code correct? did i forget something? or is there another  
possibility to do such calls?

Thanks for your help in advance.

Regards
Duc



More information about the Users mailing list