SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
voiphelpOffline



Joined: Oct 16, 2008
Posts: 2

Status: Offline
Posted: Oct 16, 2008 - 11:16 AM Reply with quote Back to top
Hi
I am new to OpenSER and trying to learn by reading the documentation. I installed openser-1.3.3-tls on Ubuntu (Hardy). I am able to register SIP phones and make calls. Now the scenario is I have OpenSER installed on 2 machines A (say 192.168.150.x) and B (192.168.160.x). SIP phone 1 (192.168.150.x) is registered to OpenSER on Machine A and phone 2 to the one running on B. Without installing MySQL support and interdomain connectivity via TLS support is there a simple way (route to the two machines exists and can ping each other) to fw calls from phone 1 to phone 2 ?
Obviously this is of not much use in real world scenario but I am using it for some experiment.

Thanks in Advance for help
View user's profile Send private message
arif.zamanOffline



Joined: Oct 11, 2008
Posts: 17
Location: Bangladesh
Status: Offline
Posted: Oct 16, 2008 - 12:36 PM Reply with quote Back to top
You may try with the following config:

Code:

if(is_method("INVITE") && !src_ip==<B>) {
   rewritehost("<B>");   
}


N.B: Make sure both servers are reachable from each other.

Cheers,
ARIF
View user's profile Send private message Yahoo Messenger MSN Messenger
voiphelpOffline



Joined: Oct 16, 2008
Posts: 2

Status: Offline
Posted: Oct 16, 2008 - 03:43 PM Reply with quote Back to top
I am not sure what the exact IP should be. I tried various combinations and it has not worked so far.
Assuming the below

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");
}

(Above does not work).
Could you please provide the right IPs

Thanks again
View user's profile Send private message
arif.zamanOffline



Joined: Oct 11, 2008
Posts: 17
Location: Bangladesh
Status: Offline
Posted: Oct 19, 2008 - 05:24 AM Reply with quote Back to top
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
View user's profile Send private message Yahoo Messenger MSN Messenger
oegincOffline



Joined: Apr 16, 2009
Posts: 10

Status: Offline
Posted: May 04, 2009 - 05:50 PM Reply with quote Back to top
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]
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.