| arif.zaman : |
| voiphelp : |
Box A running OpenSER IP 192.168.150.10
Phone A's IP (registered to BoxA) 192.168.150.20
Box B running OpenSER IP 192.168.160.30
Phone B's IP (registered to BoxB) 192.168.160.40
We can ping from Box A to B and vice versa
so is the code for the openser.cfg on Box A like
if(is_method("INVITE") && !src_ip==192.168.160.40) {
rewritehost("192.168.160.30");
}
|
Ok, update your config accordingly:
| Code: | if(!src_ip==192.168.160.30) {
if(!is_method("REGISTER")) {
rewritehost("192.168.160.30");
}
}
|
Cheers,
ARIF |
What if you have a bunch of OpenSER boxes, and you want to forward it to the appropriate box? Is there an easier way than listing all of the ip addresses seperately?
I was thinking something like this:
| Code: |
if (is_method("INVITE") && !src_ip!=myself){
rewritehost( !src_ip );
}
|
But it's giving me errors...
[/code]