[OpenSIPS-Users] opensips federate cluster - 407 response from different node
Vasilios Tzanoudakis
vasilios.tzanoudakis at voiceland.gr
Wed May 11 14:05:46 UTC 2022
Dear Chester,
Try to move cluster_check_addr() and also copy lookup() too and put them
higher in the script for example
before ---> if ( !(is_method("REGISTER") ) ) {...
Vasilios
On Wed, May 11, 2022 at 2:30 PM Chester Lee <chester at zigbang.com> wrote:
> Dear Vasilios Tzanoudakis and users,
> Thank you for your answer.
> I tried to add cluster_check_addr() in my script but I see the same
> symptom as before.
> ---------------------------------------
> route {
> ....
>
> # do lookup with method filtering
> $var(lookup_flags) = "m";
>
> if (cluster_check_addr(1, "$si")) {
> xlog("L_NOTICE", "$rm from cluster, doing local lookup only.
> retcode=$retcode\n");
> } else {
> xlog("L_NOTICE", "$rm from outside, doing global lookup.
> retcode=$retcode\n");
> $var(lookup_flags) = $var(lookup_flags) + "g";
> }
> if (!lookup("location","$var(lookup_flags)")) {
> if (!db_does_uri_exist("$ru","subscriber")) {
> send_reply(420,"Bad Extension");
> exit;
> }
>
> t_reply(404, "Not Found");
> exit;
> }
>
> if (isbflagset("NAT")) setflag("NAT");
>
> # when routing via usrloc, log the missed calls also
> do_accounting("db","missed");
>
> route(relay);
> }
>
>
> route[relay] {
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
> t_on_branch("per_branch_ops");
> t_on_reply("handle_nat");
> t_on_failure("missed_call");
> }
>
> if (isflagset("NAT")) {
> add_rr_param(";nat=yes");
> }
>
> if (!t_relay()) {
> send_reply(500,"Internal Error");
> }
> exit;
> }
>
>
> Or could you check mine attached here?
>
>
>
>
>
>
>
>
>
>
>
> 2022년 5월 11일 (수) 오전 3:28, Vasilios Tzanoudakis <
> vasilios.tzanoudakis at voiceland.gr>님이 작성:
>
>> Dear Chester,
>>
>> You should configure your cluster nodes to accept invites from other
>> cluster nodes without doing www or proxy auth.
>>
>> Use cluster_check_addr()
>> https://opensips.org/html/docs/modules/3.2.x/clusterer.html
>>
>> on top of your script
>> to check that the call is from cluster and then do the lookup there to
>> route the
>> call immediately to the user registered;-)
>>
>> Good luck
>>
>> Vasilios Tzanoudakis
>>
>>
>> Στις Τρί, 10 Μαΐ 2022, 18:32 ο χρήστης Chester Lee <chester at zigbang.com>
>> έγραψε:
>>
>>> Hello everyone, I'd like to ask about my troubles.
>>>
>>> I set up a federate cluster with mongodb with opensips 3.2.5.
>>>
>>> It has 2 nodes - node 1 and node 3.
>>> 1. One UAC which is registered on node 1 makes a call to one UAC which
>>> is registered on node 3.
>>> 2. node 1 lookup cachedb and get to know that callee is on node 3.
>>> 3. node 1 sends INVITE to node 3.
>>> 4. node 3 responses 407 with different nonce value.
>>> 5. node 1 just transfer 407 to tje caller with new nonce value from node
>>> 3.
>>> 6. The caller sends INVITE with authenticate with nonce value from node
>>> 3. But node 1 denies with 407 because the authenticate is not for node 1.
>>>
>>> How can I make a call between different nodes?
>>>
>>> Thank you
>>> Chester
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> ______
>
>
> 이 기 원 CTO실 / 매니저
> (주)직방 | 010.6479.1321 | chester at zigbang.com
> <http://company.zigbang.com>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220511/2bba39ca/attachment.html>
More information about the Users
mailing list