From miconda@gmail.com Tue Mar 30 13:08:43 2021 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Setting $conid per branch Date: Tue, 30 Mar 2021 13:08:37 +0200 Message-ID: <891b2cee-5443-b24d-18f3-33e962231651@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0936059366==" --===============0936059366== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, can you try with master branch to use sbranch-related functions from pv module along with the result from reg_fetch_contact(). Cheers, Daniel On 19.03.21 11:13, Marrold wrote: > We don't see the issue when using the standard lookup() function, only > when we start manually appending branches with the results > from=C2=A0=C2=A0reg_fetch_contact() > > Thanks > Matthew > > On Wed, Mar 17, 2021 at 7:18 AM Daniel-Constantin Mierla > > wrote: > > Hello, > > > On 11.03.21 10:55, Marrold wrote: >> Hi Daniel, >> >> I didn't spot those TCPOPs functions, I'll give them a try and >> let you know how I get on. >> >> Do you have any idea why Kamailio is intermittently=C2=A0selecting the >> wrong connection using ID vs peer address? > > > have you tried and got that with lookup("location") or only with > your script-based reg_fetch_contact()? > > Cheers, > Daniel > >> >> Thanks for the suggestions. >> Matthew >> >> On Wed, Mar 10, 2021 at 7:27 AM Daniel-Constantin Mierla >> > wrote: >> >> Hello, >> >> a while ago I did some work to make possible to specify the >> outgoing tcp connection id, see: >> >> =C2=A0 * >> https://www.kamailio.org/docs/modules/stable/modules/tcpops.html#t= cpops.f.tcp_set_otcpid >> >> >> And the next function after it. >> >> However, the testing was minimal, maybe not verifying the >> entire chain with t_relay()/forward(). Even more, the >> specifying of the outbound tcp connection was supposed to be >> done internally by the lookup("location"), the functions from >> tcpops being added for more config flexibility, suitable for >> single branch forwarding or branch_route blocks. >> >> However, in your seem to do manual processing with >> reg_fetch_contacts(), not rely on lookup location. You can >> test with master and use $sbranch(...) and corresponding >> functions from pv module, instead of setting the r-uri and >> append_branch(). >> >> Cheers, >> Daniel >> >> On 10.03.21 06:00, Marrold wrote: >>> Hi, >>> >>> I've done a bit more digging and realised that $conid is >>> read-only, and only available for an inbound=C2=A0connection - so >>> I dont=C2=A0think it will achieve what I need. >>> >>> I did a bit more troubleshooting and observed the >>> differences in the debug log between two identical calls: >>> >>> This example failed - the INVITEs went out to the incorrect >>> endpoint / TCP connection. The "ulc_conid" from the location >>> table for the TCP endpoint is 13: >>> >>> Mar =C2=A09 10:30:20 proxy-01 /sbin/kamailio[27014]: ERROR: >>>