How to hangup incoming call to jigasi?

When I calling from regular phone to jigasi i press reject call, but i’m using my custom web for it. so jitsi components don’t know, that i reject the call and regular phone continue calling. then it stop calling by timeout. How can i notify jigasi, that i want to finish call? I tried to notify prosody, and now i can send to prosody conference_id that i want to finish, but cannot find how to send to jigasi event to stop call.
Is my way correct or i need directly notify jigasi? or maybe exist more sipmle way for it.

calling in cusom prosody module

room:destroy(nil, 'The meeting has been terminated');

it works for jitsi conferences. but it doesn’t works for jigasi. i don’t see any requests to jigasi when calling this. I need to stop ringing for regular phone and respond busy code somehow from prosody. any ideas?
@ saghul @
emrah
@ damencho

Does it work when jigasi is already in the call?

it closes the call window with jitsi but call on regular phone continues.
when i finish call from not from prosody, but with normal way i see lines like

c2s55ed865ca470         info    Client disconnected: connection closed

but if i stop it with room:destroy
i see only

│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: hook started                           │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: conferenceId 0051a0bb-28a1-46b4-beb9-21e75212d17d                               │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: actor - 9556b44c-8dc9-468c-9c1e-3455d72b3fcc                                    │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: empty session                          │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: hook started                           │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: conferenceId 0051a0bb-28a1-46b4-beb9-21e75212d17d                               │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: actor - jigasi                         │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: actor - jigasi is ignored              │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: hook started                           │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: conferenceId 0051a0bb-28a1-46b4-beb9-21e75212d17d                               │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: actor - focus                          │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_occupant_left: actor - focus is ignored               │
│ meet.jitsi:rmq      info    MOD_RMQ - muc_room_destroyed: hook started

but without disconnected.

So in general destroy is not working? Not only in the case while dialing out?

it never stops regular phone. don’t see any messages to jigasi from prosody.
i made a call from jigasi to sip, and finish it with room:destroy. room was destoryed, but on regular phone it was not closed. more than 3 minutes i waited it and then finished it myself.
But i need this really only for sending signals for regular phone in my case. how can i communicate from prosody to jigasi to send hangup on regular phone?

so the main difference between really finish call with standart red button pressing and with room:destroy in prosody is that in 2nd case we have not this lines in log

muc.meet.mydomain:muc                                           debug    "009f8d4a-151a-4027-9ea8-ba8d22b3a5b0@muc.meet.mydomain" empty, destroying
c2s564202d9f680                                                                     debug    c2s stream for jigasi@auth.meet.jitsi/00a9799c closed: session closed
c2s564202d9f680                                                                     debug    Destroying session for jigasi@auth.meet.jitsi/00a9799c (jigasi@auth.meet.jitsi)
connI-oXbvSz6auQ                                                                    debug    Close after writing remaining buffered data

so something else i neeed to run in prosody to make this behaviour. but i cannot find what exactly.

You can enable packet logging in jigasi:

That will create a pcap file that can be opened with wireshark and in it we can see whether the destroy xmpp messages are delivered to jigasi and are just not handled there.

i have maked tcpdump from jigasi by port 5222 and i don’t see any xmpp messages there.
it was a call that i finished with press red button hangup. regurar phone call also finoshed here. but without any xmpp in jigasi. maybe wrong tcpdump?

tcpdump -i eth0 -s 5222

That will not work as its encrypted. You need to enable packet logging and smack will record packets that are sent and received using pcap format.

made it.
i’m attaching two files

  1. normal behaviour. we press hangup button and both(regular phone and jitsi user) disconnected from meeting
  2. i try to finish conference with following module in prosody. it kicks only jitsi user and regular phone stay on the call. and as i see in pcap files we have not anything about end of conference.

what’s wrong in module? how can i finish call for jigasi sip user (regular phone) with prosody module?

local jid = require "util.jid";
local getRoomFromJid = module:require 'util'.get_room_from_jid;
local mucDomainBase = module:get_option_string("muc_mapper_domain_base", module.host);
local mucDomainPrefix = module:get_option_string("muc_mapper_domain_prefix", "conference");
local mucDomain = module:get_option_string("muc_mapper_domain", mucDomainPrefix ..".".. mucDomainBase);

module:depends("http");

module:provides("http", {
    route = {
        ["GET /"] = function(event)
            local conferenceId = event.request.url.query

            if not conferenceId then
                module:log("warn", "MOD_HTTP_END_CONFERENCE - GET ROUTE /: conferenceId is empty")

                return ;
            end

            local roomAddress = jid.join(conferenceId, mucDomain)
            local room = getRoomFromJid(roomAddress);

            if not room then
                module:log('warn', 'MOD_HTTP_END_CONFERENCE - GET ROUTE /: No room found found for %s', roomAddress);

                return ;
            end

            room:destroy(nil, 'The meeting has been terminated');

            return roomAddress;
        end;
    };
});

1_normal.pcap (69.7 KB)
2_stucks.pcap (68.7 KB)

There is

<presence xmlns='jabber:client' xml:lang='en' to='jigasi@auth.meet.jitsi/2035370c' from='008c1a4e-4b88-4435-8676-815557e32580@muc.domain/2035370c' type='unavailable'>
    <occupant-id xmlns='urn:xmpp:occupant-id:0' id='0fv3rxL4olQsn31Z9+bsyYnVZRbuhEM53uYuKgCrgH4='></occupant-id>
    <x xmlns='http://jabber.org/protocol/muc#user'>
        <item affiliation='owner' jid='jigasi@auth.meet.jitsi/2035370c' role='none'></item>
        <status code='110'/>
        <destroy>
            <reason>The meeting has been terminated</reason>
        </destroy>
    </x>
</presence>

So jigasi receives the destroy message.

I see that jigasi listens for destroy in lobby muc room:

But does not do it in the main room:

So this need to be added for the main room. Can you open an issue in jigasi github with details and link to this thread? Thank you.

@a020792s can you test with a custom jigasi version?

Now I’m pulling jigasi image 8044 and change in jar sipgatewaysession file, cause it require some changes for me. I think I could make same with JvbConfrerence. Changes are need only there?

Yep fix: Handles destroy in conference room. by damencho · Pull Request #469 · jitsi/jigasi · GitHub

Great. Thank for quick response.