[OpenSIPS-Users] Mid Registar wss calls
nutxase
nutxase at proton.me
Mon Nov 14 15:54:57 UTC 2022
Thanks :)
So since changing i have
(opensips-cli): mi ul_dump
{
"Domains": [
{
"name": "location",
"hash_size": 512,
"AORs": [
{
"AOR": "[200 at sip-proxy.nutxase.com](mailto:200 at sip-proxy.coltek.co.uk)",
"Contacts": [
{
"Contact": "sip:2379049w at 776774e5077l.invalid;transport=wss",
"ContactID": "4067172675980653875",
"Expires": 598,
"Q": "",
"Callid": "43ri69xhn6rt4s2941n6hz",
"Cseq": 2,
"User-agent": "Foreground App",
"State": "CS_NEW",
"Flags": 0,
"Cflags": "",
"Socket": "wss:1.2.3.4:8089",
"Methods": 5503,
"SIP_instance": "<urn:uuid:c6df6860-fbbd-46a1-9b03-a1e9051c4f0c>"
}
if (is_method("REGISTER")) {
$avp(attr) = "contact_info";
fix_nated_register();
mid_registrar_save("location", "p0v");
switch ($retcode) {
case 1:
xlog("forwarding REGISTER to main registrar ($$ct=$ci)\n");
$ru = "sip:1.2.3.4:5060";
if (!mid_registrar_lookup("location", "p0v")) {
t_reply(404, "Not Found");
exit;
}
t_relay();
Sent with [Proton Mail](https://proton.me/) secure email.
------- Original Message -------
On Monday, November 14th, 2022 at 3:50 PM, Bogdan-Andrei Iancu <bogdan at opensips.org> wrote:
> well, first of all, this is wrong:
> mid_registrar_save("location p0 v");
>
> it should be
> mid_registrar_save("location", "p0v");
>
> Just read carefully the docs ;)
>
> secondly, after fixing both save and lookup in mid_reg functions, redo the scenario and post the ul_dump again (now having the fix_nated_registrar).
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> OpenSIPS Bootcamp 5-16 Dec 2022, online
> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 11/14/22 5:41 PM, nutxase wrote:
>
>> Unfortunately does not help
>>
>> here is my settings
>>
>> modparam("mid_registrar", "mode", 1) /* 1 = mirror / 1 = ct / 2 = AoR */
>> modparam("mid_registrar", "outgoing_expires", 2592000)
>> modparam("mid_registrar", "min_expires", 60)
>> modparam("mid_registrar", "max_expires", 2592000)
>> modparam("mid_registrar", "max_contacts", 16)
>> modparam("mid_registrar", "pn_enable", true)
>> modparam("mid_registrar", "pn_providers", "apns, fcm, webpush")
>> modparam("mid_registrar", "pn_ct_match_params", "pn-provider, pn-prid")
>> #modparam("mid_registrar", "at_escape_str", "")
>>
>> modparam("mid_registrar", "contact_id_param", "ctid")
>> modparam("mid_registrar", "contact_id_insertion", "ct-param")
>>
>> if (is_method("REGISTER")) {
>> $avp(attr) = "contact_info";
>> fix_nated_register();
>> mid_registrar_save("location p0 v");
>> switch ($retcode) {
>> case 1:
>> xlog("forwarding REGISTER to main registrar ($$ct=$ci)\n");
>> $ru = "sip:1.2.3.4:5060";
>>
>> and asterisk shows registration as
>>
>> 200/sip:7s8928pq at 1.2.3.4:5060;ctid=406
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.
>>
>> ------- Original Message -------
>> On Monday, November 14th, 2022 at 3:35 PM, Bogdan-Andrei Iancu [<bogdan at opensips.org>](mailto:bogdan at opensips.org) wrote:
>>
>>> OK, try to do a fix_nated_registrar() (nathelper module) before mid_registrar_save();
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>> https://www.opensips-solutions.com
>>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>>
>>> On 11/14/22 5:30 PM, nutxase wrote:
>>>
>>>> Hi Bogdan
>>>>
>>>> Thanks for the response
>>>>
>>>> this is what i see
>>>>
>>>> (opensips-cli): mi ul_dump
>>>> {
>>>> "Domains": [
>>>> {
>>>> "name": "location",
>>>> "hash_size": 512,
>>>> "AORs": []
>>>> },
>>>> {
>>>> "name": "location p0 v",
>>>> "hash_size": 512,
>>>> "AORs": [
>>>> {
>>>> "AOR": "[200 at s](mailto:200 at sip-proxy.coltek.co.uk)ip-proxy.nutxase.com",
>>>> "Contacts": [
>>>> {
>>>> "Contact": "sip:6d13503u at ohw71q49582f.invalid;transport=wss",
>>>> "ContactID": "4067172675980629310",
>>>> "Expires": 598,
>>>> "Q": "",
>>>> "Callid": "q71r14q930a64a9xecw7o1",
>>>> "Cseq": 2,
>>>> "User-agent": "Foreground App",
>>>> "State": "CS_NEW",
>>>> "Flags": 0,
>>>> "Cflags": "",
>>>> "Socket": "wss:1.2.3.4:8089",
>>>> "Methods": 5503,
>>>> "SIP_instance": "<urn:uuid:d7501f60-7b98-47e3-8f4a-565b21fb2cfb>"
>>>> }
>>>> ]
>>>> }
>>>> ]
>>>> }
>>>> ]
>>>> }
>>>>
>>>> Sent with [Proton Mail](https://proton.me/) secure email.
>>>>
>>>> ------- Original Message -------
>>>> On Monday, November 14th, 2022 at 3:22 PM, Bogdan-Andrei Iancu [<bogdan at opensips.org>](mailto:bogdan at opensips.org) wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Are you sure the lookup fails? as it looks to me the lookup succeeds, but the the r_relay() fails.
>>>>>
>>>>> If you do a `opensips-cli -x mi ul_dump <mid_registrar_domain>`, how is the registration record looking like ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>
>>>>> OpenSIPS Founder and Developer
>>>>> https://www.opensips-solutions.com
>>>>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>>>> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>>>>
>>>>> On 11/10/22 7:12 PM, nutxase via Users wrote:
>>>>>
>>>>>> Hi All
>>>>>>
>>>>>> I have got my webrtc client working with mid_registrar to asterisk
>>>>>> But when asterisk sends incoming calls to the phone it fails to lookup the location and i get
>>>>>>
>>>>>> CRITICAL:core:mk_proxy: could not resolve hostname: "zeid6muzjbdj.invalid"
>>>>>> Nov 10 17:00:12 opensips01 /usr/sbin/opensips[19237]: ERROR:tm:uri2proxy: bad host name in URI <sip:16500355 at zeid6muzjbdj.invalid;transport=wss>
>>>>>> and in sngrep i see 476 unroutable detination.
>>>>>>
>>>>>> if (is_method("INVITE|MESSAGE") && $si == "1.2.3.4" && $sp == 5060) {
>>>>>> xlog("looking up $ru!\n");
>>>>>> xlog("
>>>>>> if (!mid_registrar_lookup("location")) {
>>>>>> t_reply(404, "Not Found $ru\n");
>>>>>> exit;
>>>>>> }
>>>>>>
>>>>>> t_relay();
>>>>>>
>>>>>> exit;
>>>>>> }
>>>>>>
>>>>>> With sip i dont have this issue only with wss
>>>>>>
>>>>>> any ideas what to look at?
>>>>>>
>>>>>> Sent with [Proton Mail](https://proton.me/) secure email.
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.opensips.org
>>>>>>
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221114/1f382175/attachment-0001.html>
More information about the Users
mailing list