From miconda@gmail.com Wed Mar 17 08:18:51 2021 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Setting $conid per branch Date: Wed, 17 Mar 2021 08:18:47 +0100 Message-ID: <7c5fa47e-1347-b190-12dd-3e595b63fdf7@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0488927340==" --===============0488927340== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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#tcpops= .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: