From kamailio@marrold.co.uk Thu Mar 11 10:55:59 2021 From: Marrold To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Setting $conid per branch Date: Thu, 11 Mar 2021 09:55:42 +0000 Message-ID: In-Reply-To: <2b3b7626-64a0-a117-249e-5e60643d9300@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1894188933==" --===============1894188933== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 selecting the wrong connection using ID vs peer address? 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: > > * > https://www.kamailio.org/docs/modules/stable/modules/tcpops.html#tcpops.f.t= cp_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 connection - so I dont think 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 9 10:30:20 proxy-01 /sbin/kamailio[27014]: ERROR: