Ok, I've been messing around with this and I'm getting closer, but I must be missing something...
I am attempting to setup multiple OpenSER/Kamailio front-ends for clients to register to. These boxes all share the same database in a MySQL cluster. Each OpenSER box runs it's own local copy of RTPProxy.
I am using the default Kamailio 1.5.0 configuration file with MySQL/Authentication/Persistent user location/Nat Traversal/Enhanced Accounting enabled as specified in the config file.
My test scenario, I have Client A connectioned to OpenSER 1 and Client B connected to OpenSER 2.
Initially I had problems calling Client B from Client A, or vice versa until I added the following to my config files near the top of the route just before the "route(4) ## NAT detection"
On OpenSER 1 I added:
| Code: |
if (!is_method("REGISTER") && !src_ip==2.2.2.2){
rewritehost("2.2.2.2");
}
|
On OpenSER 2 I added:
| Code: |
if (!is_method("REGISTER") && !src_ip==1.1.1.1){
rewritehost("1.1.1.1");
}
|
Now, I can call back and forth, and the line rings -- YEAH! But it's a short victory, because if someone answers the phone, you can't hear anything...
Any suggestions? Also, is there some way to simplify the configuration at all, I tried:
| Code: |
if (!is_method("REGISTER") && !src_ip!=myself){
rewritehost( !src_ip );
}
|
But it just gave me some errors...
Thanks!