[SR-Users] How to comunicate two different server voip
SamyGo
govoiper at gmail.com
Sun Mar 6 19:53:33 CET 2016
Hello Dadang,
...inside route[LOCATION]
*Server1:*
if(!lookup("location") {
xlog("Failed to Find user online in this server, maybe try Second
server\n")
$ru = "sip:" + $rU + "@192.168.15.30";
route(RELAY);
}
*Server2:*
if(!lookup("location") {
xlog("Failed to Find user online in this server, maybe try First
server\n")
$ru = "sip:" + $rU + "@192.168.10.57";
route(RELAY);
}
For online users this will work as you require but may cause an infinite
loop between the servers if you try dialling a user which is offline.
Try adding SIP Headers and make sure you don't get into infinite loop
condition.
*Server1:*
if(!lookup("location") {
xlog("Failed to Find user online in this server, maybe try Second
server\n")
if(!is_present_hf("X-FROM-SERVER")) {
append_hf("X-FROM-SERVER: 192.168.10.57\r\n");
$ru = "sip:" + $rU + "@192.168.15.30";
route(RELAY);
}
}
*Server2:*
if(!lookup("location") {
xlog("Failed to Find user online in this server, maybe try First
server\n")
if(!is_present_hf("X-FROM-SERVER")) {
append_hf("X-FROM-SERVER: 192.168.15.30\r\n");
$ru = "sip:" + $rU + "@192.168.10.57";
route(RELAY);
}
}
I hope you understand the logic. Pretty easy isn't it ?
Regards,
Sammy
On Sat, Mar 5, 2016 at 4:45 AM, Raihan Satya <raihanteknologi at gmail.com>
wrote:
> Halo, my name dadang setiawan
>
> sample case
>
> VOIP Server A
> IP Address : 192.168.10.57
> voip number Jon 100
>
>
> Voip server B
> IP Address : 192.168.15.30
> voip number Brian 200
>
> i am using linphone video for comunication jon & brian
> the question is
>
> How to solution comunication jon with brian
> withhout 200 at 192.168.15.30
>
> but direct 200 without using @
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160306/ee84ad88/attachment.html>
More information about the sr-users
mailing list