Hello Egemen,

 

some people do the dlg_manage() only in the initial request route, but there have been some discussions to do it more often, so your position is probably ok (not knowing the cfg flow, obviously).

 

About the earlier e-mail, are you sure you get the 404 from dialog module or from another place in the cfg? If you get it from logic related to the dialog module, have a look to the match mode parameter in the module docs, it might help (if you get some log messages from dialog module that matching failed).

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of egemen ulus
Sent: Tuesday, September 15, 2020 7:06 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Kamailio does not forward BYE to Asterisk

 

Do I set the dlg_manage() function in the correct part of kamailio.cfg ?? I set it before sending Invite message to remote side.

 

Any help would be great :)

 

Regards

 

Egemen U.

 

Get Outlook for Android

 


From: sr-users <sr-users-bounces@lists.kamailio.org> on behalf of egemen ulus <ulus_egemen@hotmail.com>
Sent: Monday, September 14, 2020, 5:11 PM
To: Henning Westerholt; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Kamailio does not forward BYE to Asterisk



Hi Henning,

 

Thank you for your response. I have checked with debug mode, here is the result; It can't find the dialog that is why it sends "404 Not Here" even though callid is the same.

 

Dialog that is kept in DB:

 

dialog memory records

dialog::  hash=1056:7783

        state:: 4

        ref_count:: 2

        timestart:: 1600091398

        timeout:: 90338404

        callid:: 18f82088676a5d7f7c94e4f96c34a41f@asterisk_ip

        from_uri:: sip:90850532xyzt@asterisk_ip

        from_tag:: as00b3f8a9

        caller_contact:: sip:908505326011@asterisk_ip:5060

        caller_cseq:: 102

        caller_route_set::

        caller_bind_addr:: udp:kamailio_ip:5060

        callee_bind_addr:: udp:kamailio_ip:5060

        to_uri:: sip:333305458596985@remote_sipserver

        to_tag:: as7cf5b3da

        callee_contact:: sip:333305458596985@:remote_sipserver:5060

        callee_cseq:: 0

        callee_route_set:: <sip:remote_sipserver;lr>

 

 

Debug output for BYE message:

 

NOTICE: acc [acc.c:317]: acc_log_request(): ACC:

transaction answered: timestamp=1600091398;method=BYE;from_tag=as7cf5b3da;to_tag=as00b3f8a9;call_id=18f82088676a5d7f7c94e4f96c34a41f@asterisk_ip;code=404;reason=Not here;src_user=333305458596985;src_domain=remote_sipserver;src_ip=remote_sipserver;dst_ouser=90850532xyzt;dst_user=;dst_domain=kamailio_ip

 

 

Bye request header:

 

BYE sip:90850532xyzt@kamailio_ip SIP/2.0

 

And this is how I used dlg_manage() in Kamailio cfg (In RELAY):

 

if (src_ip == x.x.x.x/26) {

                if (is_method("INVITE|ACK")) {

                        setflag(FLT_DLGINFO);

                        dlg_manage();

                        $var(x) = $tU;

                        $var(y) = $(var(x){s.striptail,11});

                        $var(recieved)='';

                        sql_pvquery("cb", "select ipaddress from prefixes where prefix = $var(y)", "$var(recieved)");

                        uac_replace_from("sip:$fU@$var(recieved)");

                        xlog("L_WARN","$var(recieved)\n");

                        remove_hf("Contact");

                        append_hf("Contact: <sip:$fU@$var(recieved)>\r\n", "Call-ID");

                        $fs = "udp:" + $var(recieved) + ":5060";

                }

        }

        if (!t_relay()) {

                sl_reply_error();

        }

 

 

Regards

 

Egemen U.

 

Get Outlook for Android


From: Henning Westerholt <hw@skalatan.de>
Sent: Monday, September 14, 2020 3:15:48 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc: egemen ulus <ulus_egemen@hotmail.com>
Subject: RE: Kamailio does not forward BYE to Asterisk

 

Hello Egemen,

 

have you tried to debug it and find out why the BYE is not routed in this particular case from Kamailio? You already mentioned the R-URI, what is in this particular BYE? Is Kamailio listening on all VLAN IPs? Just to share some ideas.

 

About the performance question, I know of some installation that have about 5-10 interfaces on a box and did not heard of problems so far.

 

The main topic to consider here (iMHO) is that it gets a bit complicated to handle many different interfaces in one kamailio, so for that reasons it might be a good idea to split it to different VMs or instances.

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of egemen ulus
Sent: Friday, September 11, 2020 11:58 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] Kamailio does not forward BYE to Asterisk

 

Hi all,

 

I have an infrastructure with Kamailio (reg), Asterisks farm, and Kamailio (4.3) proxy which dispatches calls.

 

                                                                                                Trunk-1 (Vlan_A)

Kam(reg) <> Asterisk Farm (5) <> Kam(proxy)     <>      Trunk-2 (Vlan_B)

                                                                                                Trunk-3 (Vlan_C)

 

For each trunk, I have to use the IP of the VLAN interface in "contact header". That means when I need to send a call to Trunk-1 I have to set Vlan_A IP address on the contact header. I have achieved that by rewriting Contact Header.

 

###

remove_hf("Contact:");

append_hf("Contact: <sip:$fU@$var(recieved)>\r\n", "Call-ID");   #by using db

###

 

But this causes a problem, Kamailio does not forward the BYE message that comes from Trunk-X to Asterisk (In before, the BYE message had Asterisk IP in R-URI). However, when I use topoh module it forward properly for one trunk. But I can not set multiple mask IP in topoh module.

 

I'm using the dialog module and I thought it can handle all requests in one dialog to forward to the correct asterisk but it did not.

 

Is there any suggestion for this case?

And also how many sub-interfaces can Kamailio handle for a good performance?  Or do you suggest multiple Kamailio instances instead of multiple sub-interfaces on one server?

 

 

Virus-free. www.avast.com