Hello. I
thry to integrate redis for location module and first at all
that I do - dublicate location to redis.
First At all I create
analog of lookup procedure that use location but from redis. I
take values from location and create branches by mannualy. All
works good but branch route create dublicate of first branch.
We talk about it already and I cnow that branch route creates
first original Request and then create branches. So my
question is how to disable creation of original URI?
My cfg part of
creation branches is:
First of all I create
massive of needed endpoints and then create branches as
bellow.
I create it with
different сucles "while" because websockets not blocked when
creates dublicate INVITE, but some UDP endpoints can not take
call because answer to kamailio 482 reply and CANCELs call.
It works fine when I
logged on with wesocket device and UNP at one time. But when I
logget with 2 UDP devices only this algorithm not worked.
Thanks for help.
$var(k)=0;
xlog("L_INFO",
"request URI is $ru");
while ($var(k)<=
$var(j)){
if
($(avp(device_contact)[$var(k)])=~"device"){
xlog("L_INFO", "This
is a classic UDP call to endpoint");
if
($(avp(device_received)[$var(k)])==""){
xlog("L_INFO",
"Received string is EMPTY");
$du="sip:"+$(avp(device_contact[$var(k)]){s.select,1,@});
}
else
{
xlog("L_INFO",
"Received string is {$avp(device_received)[$var(k)]}");
$du=$(avp(device_received)[$var(k)]);
}
$var(UDP_contact)="sip:"+$(avp(device_contact[$var(k)]){s.select,1,@});
xlog("L_INFO","Classic
Destination URI is
{$(avp(device_contact[$var(k)]){s.select,1,@})} for {$tU}}.
Destination is {$du}\n");
}
$var(k) = $var(k) + 1;
}
$var(k)=0;
xlog("L_INFO",
"request URI is $ru");
while
($var(k)<=$var(j)){
if
($(avp(device_contact)[$var(k)])=~"transport=ws"){
xlog("L_INFO", "This
is a classic UDP call to endpoint");
xlog("L_INFO",
"Received string is {$avp(device_received)[$var(k)]}");
$du=$(avp(device_received)[$var(k)]);
xlog("L_INFO","Classic
Destination URI is
{$(avp(device_contact[$var(k)]){s.select,1,@})} for {$tU}}.
Destination is {$du}\n");
}
$var(k) = $var(k) + 1;