<div dir="ltr">Vinicius,<div><br></div><div>The obvious is that PATH is broken in Asterisk's PJSIP and they won't do anything about it as it's marked "minor". It's been 2 yrs now that me and others have reported it.</div><div>[3] <a href="https://community.asterisk.org/t/wrong-d-uri-for-invites-with-pjsip-and-path/74079">https://community.asterisk.org/t/wrong-d-uri-for-invites-with-pjsip-and-path/74079</a></div><div><br></div><div>Bottom line: there's nothing wrong with Kamailio. Start looking for a workaround, don't bet on Sangoma to fix it any time soon, lol.</div><div><br></div><div>Regards,</div><div>--Sergiu</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 24, 2021 at 4:52 PM Vinicius Kwiecien Ruoso <<a href="mailto:vinicius@leads2b.com">vinicius@leads2b.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
Thanks for the fast response. Sorry about not replying to the correct<br>
email, I've just entered the list and was not getting its individual<br>
emails.<br>
<br>
> So it’s an outbound call to a webrtc registered user? If so, kamailio<br>
> should route it to wherever the called user is registered.<br>
<br>
Yes, it is a call from the backend Asterisk to a user registered via<br>
the websocket. The register is not stored in Kamailio, so it needs to<br>
use the information in the INVITE message to be able to route to the<br>
correct connection.<br>
<br>
> you'll need to share your config and logs. This should work in your scenario.<br>
<br>
Turns out looking closer, Asterisk is not respecting the Path protocol<br>
[1] [2]. In the INVITE sent to Kamailio, there is no information about<br>
the path in the message.<br>
<br>
To me the best second approach that should work is the "alias="<br>
information in the contact. That makes sense?<br>
<br>
I'm sharing my current config as an attachment here. I'm new to<br>
Kamailio, so I might be missing something really obvious here.<br>
<br>
[1] <a href="https://issues.asterisk.org/jira/browse/ASTERISK-28211" rel="noreferrer" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-28211</a><br>
[2] <a href="https://community.asterisk.org/t/pjsip-path-module-issues/88046/12" rel="noreferrer" target="_blank">https://community.asterisk.org/t/pjsip-path-module-issues/88046/12</a><br>
<br>
Thanks,<br>
Vinicius<br>
<br>
On Tue, Mar 23, 2021 at 6:43 PM Vinicius Kwiecien Ruoso<br>
<<a href="mailto:vinicius@leads2b.com" target="_blank">vinicius@leads2b.com</a>> wrote:<br>
><br>
> Hi!<br>
><br>
> I'm using Kamaio in front of multiple Asterisk instances. At this<br>
> moment it works as a SIP over Websocket proxy, with rtpengine, for<br>
> browser clients to connect to Asterisk using WebRTC. I do not use the<br>
> registration module of Kamailio, as each backend Asterisk is<br>
> independent and handles its own registrations.<br>
><br>
> Everything works great when making calls from the browser, and the<br>
> routing is correctly executed by Kamailio based on the request SIP<br>
> domain. We have an internal routing API that it calls to discover<br>
> which backend Asterisk to route the calls.<br>
><br>
> The issue I have is when a call initiates from that backend Asterisk,<br>
> trying to reach a contact that is connected in Kamailio via the<br>
> websocket. The Asterisk sends the message to the proxy, and Kamailio<br>
> must route it to the corresponding websocket.<br>
><br>
> I've tried a few approaches:<br>
> - using add_contact_alias + handle_ruri_alias: I have the alias with<br>
> alias=<ip>~<port>~ws in the contact registration, but for some reason<br>
> handle_ruri_alias cannot use it<br>
> - using the Path module on Asterisk, so when registering, the path is<br>
> recorded and sent back from Asterisk, Kamailio is also not respecting<br>
> that<br>
> - Using contact_param_encode and contact_param_encode and<br>
> contact_param_decode_ruri, but the encoded sip address is always the<br>
> invalid websocket, like sip:58c0ktrg@5hp0nn5hqqv9.invalid;transport=ws<br>
><br>
> None with success. Any hints on that can be wrong? I can share more<br>
> detailed information.<br>
><br>
> Greetings,<br>
> Vinicius<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>