Re: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay

2022-10-12 Thread John Quick
Thomas,

The UAS at 10.30.9.11 has failed to process the two Record-Route headers
sent in the INVITE. It should send the Route Set back as part of the
Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the
Record-Route headers and ignored them. I would say that is faulty UAS
behaviour, but maybe Bogdan could confirm.

Consequently, the ACK has no Route headers. That means OpenSIPS is treated
as the final destination - it doesn't know that it is meant to relay the ACK
to 10.30.9.11

If you can't fix the UAS, you could try using the Topology hiding module in
OpenSIPS. That would probably overcome the problem because Topology hiding
doesn't send Record-Route headers downstream.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy

2022-10-03 Thread John Quick
Thomas,

ACK messages are normally loose routed. Perhaps you need to call
loose_route() before t_relay().
You could try reading my article here which may help explain things:
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine
d/

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS user location clustering in Kubernetes behind AWS ELB

2022-03-31 Thread John Quick
Jon,

I worked on a project like this a few years ago. Unfortunately, it was
terminated before getting into production.
However, I presented a paper at the OpenSIPS Summit and if you have 30
minutes to spare you could watch the recording and see if there is anything
useful there.
Follow this link to get there.
https://www.smartvox.co.uk/2019/06/using-opensips-in-docker/

In theory, I'd be happy to answer any emailed questions if I can, but it's
all rather hazy now.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Should exec be async() inside an Event Route

2021-09-09 Thread John Quick
I'm working on Push Notifications in v3.1. An event is raised when a PN
needs to be sent to the mobile device.
In my event route I call exec() to run a small PHP program which uses curl
to send the request to Firebase.
Now exec() is a blocking function so would it be sensible to wrap the call
in the async() function?

The module documentation states that "the triggered event_route is run
asynchronous (and in a different process) in regards to the code or process
that generated the actual event". If each event runs in a dedicated process,
does that mitigate the need for asynchronous execution or is async() still a
good idea?

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Push Notification: fr_inv_timeout and t_wait_for_branches and 480

2021-09-07 Thread John Quick
I'm configuring v3.1 to do Push Notifications. I've followed the tutorials
and got things working, but am finding an issue with timeouts.
As I understand it, the setting for fr_invite_timeout sets how long OpenSIPS
will wait after calling function t_wait_for_branches.
The sequence happens like this:
INVITE to OpenSIPS from a core server to a registered mobile device (PN
enabled)
OpenSIPS sends a PN to the device via Firebase
OpenSIPS calls t_wait_for_branches
User is alerted to incoming call by a notification pop-up and given two
choices - Accept or Reject
As soon as the user taps Accept or Reject, the device sends a REGISTER to
OpenSIPS and waits for an INVITE (which it can match to the PN through data)
OpenSIPS handles the REGISTER as described in the various blog articles and
documentation - i.e. it injects a new branch and sends INVITE
The INVITE reaches the device
If it was Accept, then the device immediately sends a 100, a 180 then a 200
OK
If it was Reject, then the device sends a 100, 180 then a 480 Temporarily
unavailable

I appreciate that this is not strictly how RFC8599 describes the sequence,
but we find ourselves constrained by what is possible on the mobile
operating systems.
Consequently, I need a fairly high timeout (approx 16 seconds) to give the
user enough time to decide they want to answer the call before it times out.
That means setting fr_inv_timeout to 16.

Now, if the user rejects the call, OpenSIPS does not immediately pass the
480 response back upstream. Instead it waits for the entire 16 seconds and
then sends 480 upstream.

Is there any way I can dynamically alter the fr_inv_timeout or tell OpenSIPS
there is only one branch? I don't want to wait and see if there are any more
branches once I have received a response from the first branch because I
know there should only be one device registered to any given user account. I
would like OpenSIPS to wait up to 16 seconds for a 200 or 480, but to act on
it immediately when it arrives. It is alright when it is a 200, but not so
when it is a 480.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

2021-07-30 Thread John Quick
Liviu,

Unfortunately, the scenario you hypothesise does not match. We have not yet 
commissioned the Push Notification mechanism.
Furthermore, I can see the registrations from the WebRTC device in a log file 
and they are well spaced apart - minimum 40 secs, up to a few minutes.
In the most recent tests, I removed the modparam line that set 
"pn_skip_pn_interval".

I have tried a lot of variations and tinkered with several modparam settings, 
but mid_registrar_lookup() always returns 1. Just once I managed to get a 
return value of 2.

I will send you the DEBUG log output which looks quite different in the one 
example where lookup returned 2. Perhaps it will provide a vital clue.

John Quick
Smartvox Limited



-Original Message-
From: Liviu Chircu  
Sent: 30 July 2021 12:23
To: john.qu...@smartvox.co.uk; 'OpenSIPS users mailling list' 

Subject: Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

On 30.07.2021 14:16, John Quick wrote:
> The next time I made a test call, it reverted to the previous behaviour and 
> lookup returns 1 again.
> So I have just once seen it return 2, but I don't know what was different.

Most likely, it's because of that "pn_skip_pn_interval" you enabled, since it 
looks like the device is re-registering quite often and resetting the 6s 
interval.  Try setting it to 0 and things should stabilize.  In time, you will 
tell if you really need to re-enable it or not.

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS Summit 2021 Distributed | www.opensips.org/events


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

2021-07-30 Thread John Quick
Liviu,

Something else is going on here. The next time I made a test call, it reverted 
to the previous behaviour and lookup returns 1 again.
So I have just once seen it return 2, but I don't know what was different. I 
cannot get a repeatable result. Could the big Contact header be overwriting 
memory?

I will check back through the logs and packet captures to see if I can spot 
anything different there.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

2021-07-30 Thread John Quick
Liviu,

I found the problem: In the usrloc module I had "contact_refresh_timer" set to 
true. When I change it to false, lookup returns 2.
I had not understood the relationship between the two mechanisms - should I use 
either one or the other, not both?

By the way, the Contact header is very large and exceeds the varchar(255) field 
in the DB. I've set the usrloc working mode preset to "single-instance-no-db" 
as a workaround.
I'm not sure if the WebRTC app being tested here is exceptional or if this 
could be a more widespread ongoing problem that other people will encounter.

John Quick
Smartvox Limited


-Original Message-
From: Liviu Chircu  
Sent: 29 July 2021 18:22
To: john.qu...@smartvox.co.uk; 'OpenSIPS users mailling list' 

Subject: Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

On 29.07.2021 19:07, John Quick wrote:
> modparam("mid_registrar", "pn_skip_pn_interval", 6)

So all looks good except for this condition [1] which returns false, otherwise 
the lookup() result would immediately be 2.  Now, that condition will only 
return false if the contact had registered within the last 6 seconds, case in 
which your custom "pn_skip_pn_interval" 
kicks in, effectively skipping sending a PN to that device.

Have you automated this test scenario to the point where the INVITE always 
lands within 6 seconds of the registration, or does the problem happen even 
long after the WebRTC phone registers?

[1]: https://github.com/OpenSIPS/opensips/blob/master/lib/reg/lookup.c#L426

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit 2021 
Distributed | www.opensips.org/events


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

2021-07-29 Thread John Quick
Liviu,

Mid-registrar mode = 1

Here are all the modparam entries:
loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1)
modparam("mid_registrar", "contact_id_insertion", "ct-username")
modparam("mid_registrar", "outgoing_expires", 1800)
modparam("mid_registrar", "min_expires", 60)
modparam("mid_registrar", "default_expires", 1800)
modparam("mid_registrar", "max_expires", 3600)
modparam("mid_registrar", "tcp_persistent_flag", "TCP_PERSIST")
modparam("mid_registrar", "received_avp", "$avp(regrcvd)")
modparam("mid_registrar", "pn_enable", true)
modparam("mid_registrar", "pn_providers", "fcm")
modparam("mid_registrar", "pn_skip_pn_interval", 6)

John Quick
Smartvox Limited


-Original Message-
From: Liviu Chircu  
Sent: 29 July 2021 15:40
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Push Notification - lookup not returning 2

Hi John,

On 28.07.2021 19:35, John Quick wrote:
> Using version 3.1.3. OpenSIPS is acting as a mid-registrar proxy.
Which mid-registrar mode are you using? (0, 1 or 2)
> One thought I had: Should mid_registrar_lookup() always return 2 for a 
> device that has Flags = 4?

If your SIP user only has a single, PN-enabled device registered, then
yes: I would expect it to always return 2.  So we may definitely be dealing 
with a bug here - my current idea is to attempt to reproduce it in a lab 
environment.

Best regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit 2021 
Distributed | www.opensips.org/events


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Push Notification - lookup not returning 2

2021-07-28 Thread John Quick
Using version 3.1.3. OpenSIPS is acting as a mid-registrar proxy.
The WebRTC client app registers okay and I'm sure it is being detected as a
PN enabled device during registration because the value of Flags is 4
(viewed from the CLI using "mi ul_dump") and the Feature-Caps header is
added to the 200 OK when it registers.
However, when I make a call towards the WebRTC device and
mid_registrar_lookup() is called, I was expecting it to return 2, but it
does not. It returns 1.
There is only one device registered on this test server.

This is the code in my script where the lookup is done:
$log_level = 4;
mid_registrar_lookup("location","m");
$var(rc) = $retcode;
if ($var(rc) == 1) {
# Destination is a registered user and at least one contact is not
PN enabled
xlog("L_WARN", " [$var(sectname)] Standard User
$var(myuser)@$var(mydom) was found in location table  Src=$pr:$si:$sp
Call-ID=$ci\n");
} else if ($var(rc) == 2) {
# Destination is a registered user and all contacts are PN enabled
xlog("L_WARN", " [$var(sectname)] PN User
$var(myuser)@$var(mydom) was found in location table  Src=$pr:$si:$sp
Call-ID=$ci\n");

It always reports "Standard User" in my log file.

...and this is what I get in the debug log:
2021-07-28 17:16:35  DBG:registrar:parse_lookup_flags: final flags: 1
2021-07-28 17:16:35  DBG:mid_registrar:mid_reg_lookup: getting ucontact from
contact_id 286330420458939875
2021-07-28 17:16:35  DBG:mid_registrar:pn_remove_uri_params: trimmed URI:
'sip:xzxfze2l@ncuz14613i0n.invalid;transport=wss'
2021-07-28 17:16:35  DBG:registrar:push_branch: setting msg R-URI

2021-07-28 17:16:35  DBG:core:comp_scriptvar: int 20 : 1 / 1

One thought I had: Should mid_registrar_lookup() always return 2 for a
device that has Flags = 4? Or does it depend on whether the TCP network
connection to the device is still active?

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] fr_timeout CANCEL message sent to timed out dispatcher endpoint IP

2021-06-30 Thread John Quick
Ben,

Yes, you're right. Section 9.1 of RFC3261 says "If no provisional response
has been received, the CANCEL request MUST NOT be sent"

So then it is a question the developers will need to answer, although from a
practical point of view I doubt that it would cause a problem for the
reasons I gave.

John Quick
Smartvox Limited

> From: Ben Newlin  
> Sent: 30 June 2021 16:25
> To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list

> Cc: solar...@one-n.co.uk
> Subject: Re: [OpenSIPS-Users] fr_timeout CANCEL message sent to timed out
dispatcher endpoint IP
>
> I'm pretty sure the RFCs state that a CANCEL should only be sent if some
response, usually 100 Trying, has been received. This is to avoid the
possibility of the INVITE and CANCEL > being received out of order at the
destination.
>
> Ben Newlin 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] fr_timeout CANCEL message sent to timed out dispatcher endpoint IP

2021-06-30 Thread John Quick
That sounds like reasonable behaviour to me, at least for UDP.
OpenSIPS sent an INVITE but got no response within the preset time, so it
decides to cancel that branch and try a new one.
The INVITE may have reached its destination - perhaps it was the response
that failed to get back to us.
So it would be correct to send the CANCEL to the same address as the INVITE
- after all, what is there to lose? It might be going into a black hole just
like the INVITE, but that will do no harm. On the other hand it might be
helpful to the target equipment to know that you are no longer interested in
processing the request.
I think this would be correct behaviour according to the RFC's too.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] multi ip address with diffrent reply options

2021-06-11 Thread John Quick
I don't know for sure, but you might try deleting then inserting a new From 
header in the local route.
It would be similar to what is recommended for adding a Contact header for 
Teams.

Are you sure the peers you're pinging really need to receive the correct From 
header?
Or could you use a common sip domain that all the peers would accept. For 
probing you only need to receive a response, even if it is a 4XX.

John Quick
Smartvox Limited


> From: gataka  
> ,but i want the From to be dynamic from my side to the remote...


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Incorrect callid in ACK

2021-06-10 Thread John Quick
Mark,

I think I know what is going on here.
By a lucky coincidence I was testing two OpenSIPS servers back to back in a
very similar setup to yours.
Today I converted one of them to use Topology Hiding, (partly to try to help
you but it was something I wanted anyway).
After converting it to use Topology Hiding, I got an error that looks very
similar to yours and I think the solution to my problem is quite likely to
be the solution for you too.

Background: See my article below about Contact header fixing and look for
the section "When is it wrong to fix a Contact header?"
https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-3/
It specifically refers to the case of two SIP proxies back-to-back.

What I found today is that Topology Hiding makes this problem much harder to
spot because the fixed Contact header will never appear in a SIP trace such
as you get in sngrep.
Instead, what you see in the sip trace is the usual hashed id substituted by
the TH module. It makes debugging very confusing.

When the 200 OK arrives at your 2nd OpenSIPS Proxy from your 1st OpenSIPS
Proxy, are you calling fix_nated_contact() in onreply_route?
If you are, I'd wager that's your problem. You must not fix the Contact
header because you are receiving the 200 OK from another proxy.

You could design a fix based on checking the source address of the reply,
but alternatively it may also be possible to insert a more generalised
solution in onreply_route.
On your 2nd OpenSIPS Proxy (the one using Topology Hiding), I think some
code like this might work:
  if (is_present_hf("Record-Route"))
  xlog("Found a Record-Route header.   Not going to fix Contact\n");
  else {
  if (nat_uac_test(65)) {
  fix_nated_contact();
  xlog("Fixing Contact\n);
  } else
  xlog("No need to fix Contact header.  Its alright anyway\n");
  }

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Incorrect callid in ACK

2021-06-08 Thread John Quick
Mark,

I wasn't using topology hiding, but had a problem similar to this which
baffled me for a long time until I noticed that the To-tag value wasn't
matching the value in the "200 OK". Looking at the DBG logs, it appears that
the dialog matching uses To-tag and From-tag.

Another idea - topology hiding puts a unique hash code into the Contact
header. Is that getting altered by a downstream server?

Compare the "200 OK" elements with the equivalent ACK elements. Hope this
helps.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] multi ip address with diffrent reply options

2021-06-08 Thread John Quick
Gataka,

Regards sending OPTIONS pings, the modparam setting only changes the From
header.
If you want to actually send from a different interface, then try putting a
value in the 'socket' field of the dispatcher table.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips-cli add domain

2021-06-07 Thread John Quick
I asked pretty much the same question in mid-May. Below is a copy of my
question and the answer I received from Liviu.

John Quick
Smartvox Limited

On 18.05.2021 17:20, John Quick wrote:
> Some of the commands that were available in opensipsctl, I am struggling
to
> find the equivalent available in opensips-cli:
>   "show" commands for address, domain, db etc.  Now there is only "dump"
>   Commands to manipulate or show the data used in the alias_db module
>   Commands to add data to domain, drouting, address

Hi, John!

Instead of "ul show", you can now run "mi ul_dump", which is equivalent.

DB provisioning via "opensips-cli" has never been there and the subject 
has been debated here [1].  In short: the plan is to solely rely on the 
Control Panel for the provisioning, giving the finite amount of code 
maintenance power that's available.  This way, each tool does what it's 
best at.

Liviu Chircu



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

2021-05-18 Thread John Quick
Damn. I was sure I’d loaded the drouting module, but now I checked and find I 
haven’t. Doh!
Juggling too many scripts in my head.

Liviu, and now you’ve also answered the second part of my question. Thanks.

What about the crashing if you try to create a DB with any username except 
opensips?

John Quick
Smartvox Limited


From: Liviu Chircu  
Sent: 18 May 2021 15:52
To: OpenSIPS users mailling list ; Kingsley Tart 
; john.qu...@smartvox.co.uk
Subject: Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

On 18.05.2021 17:46, Kingsley Tart wrote:
Interesting. When I do it (with OpenSIPS 3.1.2), I get the below, with
the dr_* commands listed:
Hello, gents!
That is because the "which" command has dynamic output, effectively learning 
the loaded modules your OpenSIPS has, and only then listing the commands that 
it supports!  This way, we avoid code duplication of all MI Commands also in 
the OpenSIPS CLI project, which would be a complete nightmare to maintain.
Moreover, this also saves us work going into the future, where developers will 
submit all kinds of new MI commands for approval, without anybody having to 
worry about: "what do they/I have to do so this command also works with the 
CLI?"
Cheers,
-- 
Liviu Chircu
http://www.twitter.com/liviuchircu | http://www.opensips-solutions.com
OpenSIPS eBootcamp 2021 | http://www.opensips.org/training


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

2021-05-18 Thread John Quick
How curious. I wonder what is different about your config and mine.
Here is my opensips-cli.cfg. Can you see anything wrong please?
Or perhaps it is linked to the opensips.cfg script - I load the drouting 
module, but might not actually call any of the functions

[default]
log_level: WARNING
prompt_intro: Hello mate
prompt_name: osipscli-local
database_url: mysql://opensips:@localhost
database_name: opensips_v3
database_modules: acc alias_db auth_db avpops domain dialog drouting group 
permissions clusterer rtpproxy rtpengine tls_mgm usrloc registrant tracer 
fraud_detection freeswitch_scripting

John Quick
Smartvox Limited


-Original Message-
From: Kingsley Tart  
Sent: 18 May 2021 15:47
To: john.qu...@smartvox.co.uk; 'OpenSIPS users mailling list' 

Subject: Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

Interesting. When I do it (with OpenSIPS 3.1.2), I get the below, with the dr_* 
commands listed:

# opensips-cli -x mi which
[
"get_statistics",
"list_statistics",
"reset_statistics",
"uptime",
"version",
"pwd",
"arg",
"which",
"ps",
"kill",
"log_level",
"xlog_level",
"shm_check",
"cache_store",
"cache_fetch",
"cache_remove",
"event_subscribe",
"events_list",
"subscribers_list",
"raise_event",
"list_tcp_conns",
"mem_pkg_dump",
"mem_shm_dump",
"mem_rpm_dump",
"reload_routes",
"help",
"list_blacklists",
"t_uac_dlg",
"t_uac_cancel",
"t_hash",
"t_reply",
"dlg_list",
"dlg_list_ctx",
"dlg_end_dlg",
"dlg_db_sync",
"dlg_restore_db",
"dlg_cluster_sync",
"profile_get_size",
"profile_list_dlgs",
"profile_get_values",
"list_all_profiles",
"profile_end_dlgs",
"dlg_push_var",
"dlg_send_sequential",
"address_reload",
"address_dump",
"subnet_dump",
"allow_uri",
"dr_reload",
"dr_gw_status",
"dr_carrier_status",
"dr_number_routing",
"dr_reload_status",
"dr_enable_probing",
"dp_reload",
"dp_translate",
"dp_show_partition",
"cache_remove_chunk",
"regex_reload"
]

Cheers,
Kingsley.

On Tue, 2021-05-18 at 15:43 +0100, John Quick wrote:
> Unfortunately no.
> It just re-iterates the list that I was already looking at where I 
> could not find any commands for the drouting module or to do the other 
> operations I reported as missing.
> 
> John Quick
> Smartvox Limited
> 
> 
> -Original Message-
> From: Kingsley Tart 
> Sent: 18 May 2021 15:38
> To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list < 
> users@lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] Some mi commands missing in opensips- 
> cli
> 
> Does "opensips-cli -x mi which" do what you want?
> 
> Cheers,
> Kingsley.
> 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

2021-05-18 Thread John Quick
Unfortunately no.
It just re-iterates the list that I was already looking at where I could not 
find any commands for the drouting module or to do the other operations I 
reported as missing.

John Quick
Smartvox Limited


-Original Message-
From: Kingsley Tart  
Sent: 18 May 2021 15:38
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Some mi commands missing in opensips-cli

Does "opensips-cli -x mi which" do what you want?

Cheers,
Kingsley.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Some mi commands missing in opensips-cli

2021-05-18 Thread John Quick
The mi commands for the drouting module are not appearing in the list of
allowed mi commands in opensips-cli.
I'm looking for things like dr_reload, dr_gw_status, etc.

Some of the commands that were available in opensipsctl, I am struggling to
find the equivalent available in opensips-cli:
 "show" commands for address, domain, db etc.  Now there is only "dump"
 Commands to manipulate or show the data used in the alias_db module
 Commands to add data to domain, drouting, address

Are these now done using the database command in the cli? If so, please
could someone post a few examples as I don't get the command format or help.

Just a reminder - I posted to this forum on 5th May that
"opensips-cli>database create" crashes if the username given in
opensips-cli.cfg is anything other than opensips
Not had any response. Do I need to post somewhere else?

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] TLS to UDP, record route

2021-05-18 Thread John Quick
The client I was working with used this:
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-sbc-multiple-tenants

I touched on the topic in my article about MS Teams, under the heading 
"Terminology and multi-tenant solutions"

John Quick
Smartvox Limited

> From: Miha  
> Sent: 18 May 2021 11:59
> To: john.qu...@smartvox.co.uk; users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] TLS to UDP, record route
>
> btw what is the trick if you have multiple trunks to sbc teams (inbound, 
> outbound)? multiple companies?
>
> miha


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] TLS to UDP, record route

2021-05-18 Thread John Quick
Ah, topology hiding changes everything. I did not appreciate that it was 
involved.

John Quick
Smartvox Limited


From: Miha  
Sent: 18 May 2021 11:56
To: john.qu...@smartvox.co.uk; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] TLS to UDP, record route

hello John

i have found what was causing the issue. is was topology hiding when ACK was 
received by opensips. 


thank you for all your help and time :)

br
miha
John Quick je 5/18/2021 ob 11:15 AM napisal:
Miha

Altering the text in the Record-Route headers with subst() function is not
the correct approach.
I believe the problem is that you are not inserting the correct RR headers
in the first place.
If you get the RR headers right then it will also fix the problem with ACK
using the wrong protocol.
This pseudo-code snippet illustrates what is required when adding RR headers
to the initial INVITE request:

if (INVITE-from-Teams-Proxy-to-us) {
record_route_preset("IP:port", "SBC_FQDN:5061;transport=tls");
add_rr_param(";r2=on");
} else if (INVITE-from-us-to-Teams-Proxy) {
record_route_preset( "SBC_FQDN:5061;transport=tls", "IP:port");
add_rr_param(";r2=on");
} else
record_route();

Don't insert any RR headers when handling loose-routed requests.

I tried to explain all this stuff in a number of articles. Here are the
links:
https://kb.smartvox.co.uk/opensips/opensips-as-ms-teams-sbc/
https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-4/
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine
d/

John Quick
Smartvox Limited




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] TLS to UDP, record route

2021-05-18 Thread John Quick
Miha

Altering the text in the Record-Route headers with subst() function is not
the correct approach.
I believe the problem is that you are not inserting the correct RR headers
in the first place.
If you get the RR headers right then it will also fix the problem with ACK
using the wrong protocol.
This pseudo-code snippet illustrates what is required when adding RR headers
to the initial INVITE request:

if (INVITE-from-Teams-Proxy-to-us) {
record_route_preset("IP:port", "SBC_FQDN:5061;transport=tls");
add_rr_param(";r2=on");
} else if (INVITE-from-us-to-Teams-Proxy) {
record_route_preset( "SBC_FQDN:5061;transport=tls", "IP:port");
add_rr_param(";r2=on");
} else
record_route();

Don't insert any RR headers when handling loose-routed requests.

I tried to explain all this stuff in a number of articles. Here are the
links:
https://kb.smartvox.co.uk/opensips/opensips-as-ms-teams-sbc/
https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-4/
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine
d/

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Tips for troubleshooting OpenSIPS as a Teams SBC

2021-05-11 Thread John Quick
Jeff,

Regarding the first issue you mention, have you tried:
record_route_preset(“SBC_FQDN:5061;transport=tls”);

In other words, have you tried it with a single rather than a double RR header?
You would need to remove the ";r2=on" parameter of course.

In theory, if the SBC_FQDN resolves to the IP address and everything 
communicating with your SBC is (a) capable of resolving the FQDN and (b) 
capable of routing to the SBC, then it should work.

In my script I added " AS SBC_FQDN:5061" on the end of the tls listen/socket 
statement. I cannot remember if that was essential for it to work, but I leave 
it there on the basis that it cannot do any harm and might do some good.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Tips for troubleshooting OpenSIPS as a Teams SBC

2021-05-11 Thread John Quick
Hi Jeff,

I think the solution to proper handling of loose routed requests (without 
having to add a new "alias" every time you sign up another client) is to use 
the domain table and the domain.so module.

You will need to add a record to the domain table for each new client, then 
reload it.
That might seem a little tedious from an admin perspective, but the pros 
include:
* You have a native OpenSIPS DB table containing all the supported sub-domains
* You can cross check the INVITE's received from Teams to make sure it is a 
supported sub-domain
* You could use the attrs field to store additional account attributes that 
might be useful when processing requests

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] routing function variable scope

2021-05-09 Thread John Quick
Kingsley,

I hope you won't be offended, but in my opinion you are at risk of
sacrificing code readability in the pursuit of code re-usability.
If you accept that variables are in-scope both within the route and the
sub-route, then why not just have one variable for the result - set it
inside the sub-route and read the result from it immediately after the
sub-route has returned. This may not be quite right for a code style
perfectionist, but at least it would be easily understood by the rooky
programmer who has to maintain your code in 5 years' time.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips-cli database create crashes if username is not opensips

2021-05-05 Thread John Quick
I am new to v3 and just started learning how to use opensips-cli.
With the old v2.4 opensipsdbctl utility it was possible to change the
username before creating the database and the dbctl utility would create a
new user in MySQL with the specified name and password, giving them
appropriate privileges for r/w access to the data in the tables.
When I try to do the equivalent in opensips-cli, it creates a new database
called opensips (with no tables), then crashes:

(osipscli-local): database create
Password for admin MySQL user (root):
Traceback (most recent call last):
  File "/usr/lib/python3.7/cmd.py", line 214, in onecmd
func = getattr(self, 'do_' + cmd)
AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
...
...

I've experimented and confirmed that the 'database create' command works
fine as long as the username is left as default "opensips".
i.e. if this line is present in the opensips-cli.cfg file then it will crash
when I create the database:
  database_url: mysql://myusername:abc123@localhost

..but if it looks like this instead then it works okay:
  database_url: mysql://opensips:abc123@localhost

I tried it with and without the following line, but it made no difference:
  database_name: opensips

I'm using the Debian buster binaries from Nick Altmann's repository. V3.1.1
# opensips-cli -v
OpenSIPS CLI 0.1.0

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] AUTH_DB module database queries

2021-04-08 Thread John Quick
Thanks Bogdan.

John Quick
Smartvox Limited


-Original Message-
From: Bogdan-Andrei Iancu  
Sent: 08 April 2021 16:39
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] AUTH_DB module database queries

Hi John,

See inline answers.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Bootcamp 2021 online
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 4/8/21 5:45 PM, John Quick wrote:
> I am auditing an existing opensips.cfg script trying to identify all 
> possible places where a database query is executed.
> The purpose is to optimise performance by reducing the number of DB 
> queries and eliminating any unnecessary synchronous database queries.
>
> I would like to know more about what happens when the script calls the
> proxy_authorize() function.
> I assume it must be querying the subscriber table, but is this a 
> synchronous query?
yes, it is a blocking query.
> Does the AUTH_DB module do any caching of data or will it always read 
> directly from the DB table?
no caching
> Is there any difference between v2.4 and v3.1 here?
no
> Is there anything on the roadmap that may be relevant?
no
>
> The behaviour of proxy_authorize() could be relevant to system 
> performance and reliability in the following situations:
>   - An OpenSIPS system under heavy load with many call attempts per second
>   - Where an unexpected network or DB-server issue results in slow DB 
> query responses - potentially crashing OpenSIPS
>   - If a "rogue" customer device or malicious hacking attempt 
> generates large numbers of requests which all call proxy_authorize()
you can replace the proxy_authorize() with pv_proxy_authorize() (where you 
provide the pwd from script) and manage the pwd retrieval from script level, 
with async queries + caching.
>
> John Quick
> Smartvox Limited
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] AUTH_DB module database queries

2021-04-08 Thread John Quick
I am auditing an existing opensips.cfg script trying to identify all
possible places where a database query is executed.
The purpose is to optimise performance by reducing the number of DB queries
and eliminating any unnecessary synchronous database queries.

I would like to know more about what happens when the script calls the
proxy_authorize() function.
I assume it must be querying the subscriber table, but is this a synchronous
query?
Does the AUTH_DB module do any caching of data or will it always read
directly from the DB table?
Is there any difference between v2.4 and v3.1 here?
Is there anything on the roadmap that may be relevant?

The behaviour of proxy_authorize() could be relevant to system performance
and reliability in the following situations:
 - An OpenSIPS system under heavy load with many call attempts per second
 - Where an unexpected network or DB-server issue results in slow DB query
responses - potentially crashing OpenSIPS
 - If a "rogue" customer device or malicious hacking attempt generates large
numbers of requests which all call proxy_authorize()

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Tips for troubleshooting OpenSIPS as a Teams SBC

2021-04-06 Thread John Quick
 Hello all,
The article I published last week talks about common issues you might
encounter when commissioning a Microsoft Teams SBC solution built using
OpenSIPS.
It is designed to be read alongside the article by Alexey Vasilyev.

https://kb.smartvox.co.uk/opensips/opensips-as-ms-teams-sbc/

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Some new wiki posts from Smartvox

2021-03-22 Thread John Quick
I have written several articles recently that people might find useful. This
is all part of my retirement project - a brain dump.
They cover some basics of SIP in depth, referencing how solutions are built
using OpenSIPS.
There are four based loosely on the theme of "header fixing" - this
introductory one has links to the other three:
https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-1/

and there is one that examines loose routing plus contact, record-route and
route headers:
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine
d/

I'd be happy to receive feedback/criticism/comment/suggestions for
improvements.

I'm also just finishing one that talks about issues and snags encountered
when setting up a Teams SBC. Details to follow.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Does sl_send_reply auto-generated a Contact Header in it's response?

2021-02-22 Thread John Quick
Hello mwb,

I used OpenSIPS as a redirect server many years ago.
Back then, the destination set ($ds) was used to generate Contact addresses
when you use sl_send_reply() to return 302.

302 is a redirect. The 302 response must tell the UAC where the request is
to be redirected. That is done using the Contact header (see section 8.3 of
RFC3261).
OpenSIPS did this by taking addresses it found in the destination set. I am
not certain if the latest versions of OpenSIPS still do it this way.

You may have to use append_branch() or $branch now, but it should be clear
if you look at this blog article:
https://blog.opensips.org/2018/07/05/handling-sip-redirect-requests-in-realt
ime/
Look for the section headed "Using OpenSIPS as a redirect server".

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Rtpproxy with mhomed option

2021-02-22 Thread John Quick
Hi Mario,

I think you are talking about bridged mode for rtpproxy.
If so, you will not need to start the rtpproxy daemon with -A, because that
is where you have just one interface and you want to masquerade it as a
different address. For example if your server is behind NAT, then -l is the
actual host interface address and -A is the external IP address on the WAN
port of the NAT router.

For bridging mode, you have to specify two addresses with the -l parameter.
This is what I have in my notes:
-l is the listen address or pair of addresses when used in bridging mode
(LAN then WAN)
e.g.-l 123.45.67.89 or-l 192.168.4.102/123.45.67.89

Also, have you tried putting the parameters inside double quotes when
calling rtpproxy_answer()?
This was a requirement in v2.4.x
I believe they tried to remove the requirement for quotes around parameters
in v3, but maybe they missed it in a few places.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Dialogs with fix_nated_contact() have wrong RURI domain on sequential requests

2021-02-18 Thread John Quick
Jeff,

Would it be okay if I included this as an interesting 'special case' to my
recently published article?
The article is all about fixing Contact headers - when and how to do it,
when not to do it, etc.
https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-3/

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] To-tag value in ACK

2021-02-17 Thread John Quick
I took a fresh look at this case and found that the To-tag used in the ACK 
matches the To-tag that was in the first 180 Ringing.
However, Teams has returned different To-tags in the 180 Ringing and in the 183 
Session Progress and 200 OK.

This appears to be common behaviour for Teams as I can see the same thing in 
the SIP trace for a completely different customer.

Teams uses different To-tags when it responds to an INVITE as follows:
SBC <-->  Teams
INVITE   -->
<--  100 Tryingno To-tag
<--  180 RingingTo-tag A
<--  180 RingingTo-tag B
<--  180 RingingTo-tag C
<--  183 Sess.Prog.   To-tag D
<--  200 OK   To-tag D

Is this compliant with the RFC's?

Unfortunately, the UAC used by my customer is responding to the 200 OK with an 
ACK that has To-tag A instead of To-tag D.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] To-tag value in ACK

2021-02-05 Thread John Quick
Thank you Donat. You have confirmed my suspicions.
The reference to the section in the RFC is very useful.

John Quick
Smartvox Limited
Tel:   +44-1727-221221


> From: Donat Zenichev  
> Sent: 03 February 2021 09:57
> To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 
> 
> Cc: Johan De Clercq 
> Subject: Re: [OpenSIPS-Users] To-tag value in ACK
>
> Good day John,
> it looks like your own deduction is absolutely right!
>
> If we talk about the SIP protocol in terms of RFC 3261, then I guess it's 
> clear that the acknowledgement which has a To tag,
> which is different from the previously defined one (in 200 OK) of the same 
> dialog, should be essentially considered as out of the dialog request.
> Which will not be correlated with the dialog is being established (the one in 
> the early stage you are talking about).
>
> So that, it's known - "Call-ID" + "To tag" + "From tag" gives us a full 
> uniqueness of certain dialog/call branch (in your case it looks like it's 
> only one branch though).
> If you change at least a To tag in the subsequent request (in-dialog request) 
> for the same dialog/call branch,
> then the remote side will likely fail to match it to a needed dialog 
> (transaction check).
>
> Please see this section of RFC 3261 to understand the concept:
> https://tools.ietf.org/html/rfc3261#section-19.3
>
> I hope I was clear enough and you find my response useful.
> Have a nice day!
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] To-tag value in ACK

2021-02-02 Thread John Quick
Johan,
Thanks for your comment, but in this instance the problem is something very 
subtle.
OpenSIPS is acting as a Proxy, not as an endpoint. So the Contact header in the 
ACK contains the address of the UAC.
OpenSIPS identified itself earlier in the dialog using the correct FQDN in the 
topmost Record-Route header of the INVITE request and using TLS with a 
certificate whose subject name matches the FQDN.

Like I said, I have been able to put this ACK side-by-side with the ACK in a 
similar case where the call works correctly.
Doing an A-B comparison, the only obvious difference I could identify was in 
the order of the headers.
For example, the Route header is before the Via headers in one case and after 
in the other. I don't believe this is important.

So then I looked at values in the 200 OK to see if they were the same in the 
ACK:
The R-URI in the ACK is the same as the Contact in the 200 OK, including 
parameters.
The From tag is identical in both
The To tag in the ACK is not the same as the To tag in the 200 OK, but in my 
sip trace for a call that worked okay, the To tag did not get changed.

My question is about the To tag. Should it be the same in the ACK as it was in 
the 200 OK?

John Quick
Smartvox Limited
Tel:  +44-1727-221221


> From: Johan De Clercq  
> Sent: 02 February 2021 14:42
> To: John Q ; OpenSIPS users mailling list 
> 
> Subject: Re: [OpenSIPS-Users] To-tag value in ACK
>
> is contact an fqdn ? 
> If not, look no further. 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] To-tag value in ACK

2021-02-02 Thread John Quick
I am seeing a problem in calls made to MS Teams via OpenSIPS configured as
an SBC.
The usual INVITE, 180, 183, 200 OK sequence looks okay, but the ACK request
is not accepted by MS Teams.
When I say "not accepted", I mean an ACK is sent to the Teams Proxy, but
Teams responds after 30 seconds with BYE, reason is:
"Call Controller timed out while waiting for acknowledgement"

I am able to compare the sip trace for the failing call with a very similar
call scenario on another Teams system that works.
The only explanation I can suggest is that the UAC did not use the same
value for the To-tag as it received in the 200 OK.
Could this explain why Teams is failing to match it against the previous
dialogue?

John Quick
Smartvox Limited
Web: www.smartvox.co.uk


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Mediaproxy configuration

2021-01-21 Thread John Quick
Mark,

I recommend using rtpproxy (or possibly rtpengine) rather than mediaproxy
for your situation.
You need the address in the SDP to be the public IP 4x.xxx.xxx.xxx when it
is sending packets to the UAC but you need it to use its LAN address when
sending to the Asterisk server.
This is what bridge mode (or bridging mode) is used for, although the last
time I built a solution like this I didn't use bridge mode and instead
passed the relevant IP address as an argument when calling the rtpproxy
activation functions. Unfortunately, the latter approach means your
opensips.cfg script will need to be much more complicated.

I suspect your problem when using mediaproxy and advertised_ip =
4x.xxx.xxx.xxx is that it will pass that address to Asterisk in the SDP. In
which case, you might be able to get audio if you look at the network route
Asterisk would use to reach/connect to 4x.xxx.xxx.xxx and make sure the
mediaproxy relay is reachable. However, that does not sound like a good
solution to me - much better if Asterisk talks to the relay directly over
the LAN.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpengine_delete not returning immediately

2020-10-28 Thread John Quick
Alain,
Thanks. This confirms that it is a local issue in my test lab setup and not a 
generic issue for all users of rtpengine.
I thought it was unlikely this problem would be widespread and yet not be 
reported before.
Probably it concerns using an under-powered VPS to host rtpengine, or maybe it 
is latency in transmission of large packets over the internet.
I will do some more testing to find out. Thank you everyone who answered.

John Quick
Smartvox Limited



> -Original Message-
> From: Alain Bieuzent  
> Sent: 28 October 2020 14:21
> To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 
> ; 'Johan De Clercq' 
> Subject: Re: [OpenSIPS-Users] rtpengine_delete not returning immediately
>
> Hey John,
>
> I just take a trace with timestamp to see what is the delay in our side 
> (rtpengine with around 2000 calls engaged)
>
> U 2020/10/28 15:13:51.034476 10.207.201.39:58640 -> 10.207.201.164:2223
>   25135_9 
> d7:call-id53:284c8c0174d1778d0f09b16e7596a...@xxx.xxx.xxx.xxx:506013:received-froml3:IP415:XXX.XXX.XXX.XXXe8:from-tag10:as0bf5d73f7:command6:delete
>
>
> U 2020/10/28 15:13:51.034870 10.207.201.164:2223 -> 10.207.201.39:58640
>
> Sor for me the "ACK" of the delete come less than 1 ms after so no issue I'm 
> using Version: 7.5.5.1+0~mr7.5.5.1 on Debian 9
>
> Regards     
>
> Le 28/10/2020 15:05, « Users au nom de John Quick » 
 a écrit :


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpengine_delete not returning immediately

2020-10-28 Thread John Quick
Johan,

I did not want to raise an issue on github before I was sure that I wasn't
doing something stupid.
I have the impression that there are many people using rtpengine, some of
them for high capacity applications.
If there really is a blocking delay of about 3 seconds on every call to
delete, then you would expect to see some really bad things happening under
heavy load.

John Quick
Smartvox Limited


> From: Johan De Clercq  
> Sent: 28 October 2020 13:51
> To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list

> Subject: Re: [OpenSIPS-Users] rtpengine_delete not returning immediately
>
> Did you open an issue on github on rtpengine? Rfuchs comments are always
enlightening 



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpengine_delete not returning immediately

2020-10-28 Thread John Quick
A packet capture revealed some interesting facts about this problem.
There is a genuine delay in the response from rtpengine when the delete command 
is sent. In the packets I captured, the delay was 2 seconds.
It is possible this delay arises because I am using a low spec virtual server 
with very little memory to host rtpengine.
Alternatively, it could be that rtpengine is doing additional processing of the 
audio streams so it can send a report back to OpenSIPS.
Using wireshark to inspect the packets, I can see that the response contains 
round-trip times, packet loss, average/low/high MOS scores, etc.

Does anyone know if there is a way to:
 a) Reduce the delay within rtpengine so it responds quicker to the delete 
command
 b) To make calls to rtpengine_delete() act asynchronously so they don't block 
the main SIP processing child threads?

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpengine_delete not returning immediately

2020-10-28 Thread John Quick
Callum,

Thanks for the suggestion. I added a rule to iptables on the OpenSIPS server to 
allow all UDP from the rtpengine server.
Unfortunately, it made no difference. I also checked the route using mtr and it 
looks fine - less than 5 ms latency, 1 drop in >4000.
Network connectivity seems unlikely to be a contributory factor because the 
offer and answer commands work exactly as I would expect.
Only the delete command exhibits a delay returning.

John Quick
Smartvox Limited


> From: Callum Guy  
> Sent: 27 October 2020 21:12
> To: John Q ; OpenSIPS users mailling list 
> 
> Subject: Re: [OpenSIPS-Users] rtpengine_delete not returning immediately
>
> Have you double checked it's not a firewall issue on the SIP proxy?
>
> The transport is typically UDP so there is a fair chance it's blocked.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] rtpengine_delete not returning immediately

2020-10-27 Thread John Quick
Using OpenSIPS v2.4.8 and the latest release of rtpengine. The same was also
happening with some older releases. I upgraded to see if it would help.

When OpenSIPS receives BYE, the script calls rtpengine_delete() but I can
see from xlog messages before and after the call that the function is taking
up to 5 seconds to return.
This is also reflected in the logs on the server where rtpengine is hosted:

Oct 27 18:06:12 vps684757 rtpengine: INFO: [d2s4qf6thm2tmtg40khg]: Received
command 'delete' from 83.120.14.234:56677
Oct 27 18:06:12 vps684757 rtpengine: INFO: [d2s4qf6thm2tmtg40khg]:
Scheduling deletion of call branch '5cclfhu59e' (via-branch '') in 12
seconds
Oct 27 18:06:12 vps684757 rtpengine: INFO: [d2s4qf6thm2tmtg40khg]: Replying
to 'delete' from 83.120.14.234:56677 (elapsed time 0.000192 sec)
Oct 27 18:06:13 vps684757 rtpengine: INFO: Detected command from
83.120.14.234:56677 as a duplicate
Oct 27 18:06:14 vps684757 rtpengine: INFO: Detected command from
83.120.14.234:56677 as a duplicate
Oct 27 18:06:15 vps684757 rtpengine: INFO: Detected command from
83.120.14.234:56677 as a duplicate

It looks as if OpenSIPS is failing to detect/recognise the reply from
rtpengine. This only happens for the delete command - I have no problem with
offer and answer.

I do not generally see any error messages in the opensips logs, but once it
did report timeout waiting for a response from rtpengine.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] set_advertised_protocol ....

2020-08-19 Thread John Quick
When OpenSIPS is acting as a protocol translator, I have sometimes done
tricks like this:
  subst_uri('/transport=tls/transport=udp/i');
but for that to work, you need the local interfaces to support both
protocols.

You can manually insert your own version of a Record-Route header - or a
double RR - using record_route_preset(), but even if you did fix the
'transport' parameter value in the RR header so it was right for the load
balancer, it would then be wrong for OpenSIPS. This would probably break the
loose route handling. It would be a can of worms.
I don't think you can selectively alter the Via header, except through use
of advertised_address and advertised_port.

For your load balancer to truly provide "a transparent TCP/TLS interface",
it would have to inspect and fix the contents of packets at the application
layer (SIP).
Somewhat like wanting to use the Application Layer Gateway (ALG) option
available on a firewall. Even if the option were available, would you really
trust it?

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips MS Teams lost BYE

2020-07-27 Thread John Quick
Chris, it is not about removing lines from the script. It is about not
executing those lines when they are inappropriate.
i.e. "for any SIP requests or SIP responses coming from MS Teams"

Mark, there are several gotchas that I know of with Teams, but I cannot
guess which might apply in your case unless you are able to supply more
details. Is your problem with calls from Teams? Which end is hanging up
first and generating the BYE? Has a loose routed SIP request already got
through okay in that direction - e.g. ACK? Did you leave the call connected
for at least 30 seconds to make sure the call setup worked?

Here are some of the gotchas I know about that are not fully covered in the
blog:
*The double RR headers using FQDN mentioned in the blog must be added to
initial INVITE requests to and from the Teams Proxy - calls in *both*
directions
*Version 2.4.7 of OpenSIPS (and some v3 releases) have a bug that means RR
parameters are not always added - e.g. "r2=on"
*Do not send RR headers to Teams with ";lr=on" as can happen if you have a
Kamailio Proxy in the path. It must just be ";lr"
*Don't call fix_nated_contact for any SIP request or response coming from MS
Teams
*Don't let any downstream Proxy call fix_nated_contact for those requests
either
*If you want an easy life, remove REFER from the Allow header in INVITE's to
Teams and in 200 OK responses being returned to it

I used the siptrace module to capture the SIP packets passing between my SBC
and the Teams Proxy because I had no luck with sngrep decrypting the TLS
even when I pointed it to the certificate key. You need to be able to
inspect those packets to make sure the headers look correct, the ports and
protocols are as expected, etc. In the case of BYE not getting a response,
you could check exactly what is in the Via headers within the BYE.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Segfault Crash siptrace

2020-07-23 Thread John Quick
Hello Inder,

I think there are bugs in the sip_trace module in v2.4.6
My application would not start when the sip_trace module was enabled, using
v2.4.6
This problem was fixed when I tried v2.4.7, but you should upgrade to 2.4.8
now.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] FW: Opensips MS Teams lost BYE

2020-07-06 Thread John Quick
Chris,

You must not call fix_nated_contact() for any SIP requests or SIP responses
coming from MS Teams.
If you do, it will cause exactly the problems you describe for loose-routed
sequential requests such as BYE.

Just to explain: fix_nated_contact() should only be used when the messages
come via a NAT router. It must not be used for messages coming from a Proxy
(assuming the Proxy adds a Record-Route header, as happens with Teams), even
though both cases may appear to need fixing when you use nat_uac_test().

John Quick
Smartvox Limited
Web: www.smartvox.co.uk

> I've managed to get the PBX to send the BYE to the SBC and it is now
forwarding on to MS (although MS are not sending a reply but we have opened
a case for this).

> We are struggling to get the BYE packet to go back to MS Teams when the
call is initiated by Teams.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem with add_rr_param() in v2.4.7

2020-05-21 Thread John Quick
Hi Bogdan,

I finally made some more time to investigate this bug and can now confirm
that it only happens when a dialog is created before you call add_rr_param()
So, in your test, please add this line at the start:

  create_dialog("B");

then you should see the error happening.
In case it is relevant, here are the lines I used to activate the dialog
module:
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600) 
modparam("dialog", "db_update_period", 121)

Another user has confirmed that this bug also exists in v3 of OpenSIPS.

If you need it, I can supply a very stripped down version of my test script.
Just let me know.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Running OpenSIPS on same box as Asterisk/FreeSwitch

2020-05-19 Thread John Quick
Hi Ben,

Thanks for answering this one. I agree totally with your analysis, but I can 
also assure you that the "different" port number is present in the R-URI of the 
ACK.
This is what OpenSIPS receives, over TLS, from the remote UAC:
ACK sip:+35312345...@195.xx.yy.zz:5050;transport=tcp SIP/2.0

I'm using port 5050 (tcp) on FreeSwitch and ports 5060 (tcp and udp) and 5061 
(tls) on OpenSIPS.

I'm having to use a work-around at the moment that looks like this (slightly 
edited):
if (has_totag() && is_method("INVITE|ACK|PRACK|BYE|UPDATE|REFER|NOTIFY")) {
$var(orig_ruri) = $ru;
$var(orig_rp) = $rp;
if ( loose_route() ) {
# Loose-routed request - attempt to match with an existing dialog
match_dialog();

if ($var(orig_rp) == "5050" && $ru =~ "r2=on") {
# Work-around fiddle for sending to an endpoint on the same IP 
as myself
$ru = $var(orig_ruri);
$du = "sip:" + $rd + ":5050";
force_send_socket(tcp:195.XX.YY.ZZ:5060);
xlog("L_WARN", "  LR(fixed) $rm  RuProto=$rP   R-URI=$ru  
Dest=$du  Call-ID=$ci\n");
} else
    xlog("L_WARN", "  LR $rm   RuProto=$rP  R-URI=$ru  
Call-ID=$ci\n");


John Quick
Smartvox Limited


-Original Message-
From: Ben Newlin  
Sent: 19 May 2020 14:37
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 
; 'James Hogbin' 
Subject: Re: [OpenSIPS-Users] Running OpenSIPS on same box as 
Asterisk/FreeSwitch

John,

This is occurring because the local OpenSIPS is seeing its own local URI in the 
R-URI and is (correctly) assuming the message is meant for it. At that point 
there is some ambiguity in the situation as even though the Route headers 
indicate loose routing, OpenSIPS cannot leave the R-URI as is, because it will 
just loop back to itself. So it is instead assuming that strict-routing is 
being used and following that model.

We also run with different servers sharing IPs and we ran into this too. You 
say the two servers are using different ports, but I am guessing that the R-URI 
doesn't actually contain the port. That is why there is confusion. The only fix 
I know is to ensure that every server sharing an IP always includes its local 
port in the Contact header. This will cause all sequential requests to also 
contain the port in their R-URI. This differentiates the R-URI so that OpenSIPS 
will no longer believe the message is directed to it and will follow normal 
loose routing procedures.

I'm not really sure whether there could be any improvement in OpenSIPS that 
could handle this, since the situation is inherently ambiguous.

Ben Newlin 

On 5/19/20, 3:56 AM, "Users on behalf of John Quick" 
 wrote:

Hi James and others,

James, I have provided some explanation and guidance specific to you at the 
end of this post. First, I need to retract some of the explanation I gave in my 
original post because it was wrong. The basic problem is as described - 
handling of loose routed sequential requests goes wrong when OpenSIPS is 
running on the same host server as Asterisk or FreeSwitch, using the same IP 
but different ports.

I think the correct explanation for what is happening is this: 
Where the address in the R-URI is the same as its local address, OpenSIPS 
copies the URI (and parameters) from a Route header to the R-URI which, in this 
use-case, causes the request to loop back to itself. It should instead delete 
the two Route headers and leave the original R-URI value unchanged.

James, what you describe is not identical to my issue, although you may 
have my issue plus another.
It should be fairly easy for you to fix the problem of private LAN 
addresses being used where you want external IP's to be used.
OpenSIPS handles this issue through the "advertised address". This allows 
it to listen on one interface, but to populate SIP headers such as Via and 
Record-Route with another.
Various mechanisms are available to add to your script including the 
following:
1) Define it for each interface in the listen statement: e.g.  listen = 
tls:10.x.x.x:5091 as :5091
2) Global settings at the top of your script:  advertised_address and 
advertised_port
3) Within the main body of your script, e.g. just before the call to 
record_route(), insert a line like: set_advertised_address();
4) Instead of calling record_route(), call 
record_route_preset(,); 
The first two are described in the section called 'Global Parameters' in 
the documentation
The third one is described in 'Core Functions' (In v2.4, they are items 45 
and 46)
The fourth is documented in the RR module notes

John Quick
Smartvox Limited


> From: James Hogbin  
> Sent: 18 May 2020 17:24
> To: john quick ; OpenSIP

Re: [OpenSIPS-Users] add_rr_param(";r2=on"); not adding

2020-05-19 Thread John Quick
Hi James,

I reported this problem to the forum on 14th April. Since then, I sent a
stripped down copy of my opensips.cfg file to Bogdan to help with any
investigation.
I was seeing this problem on v2.4.7, but it did not happen in v2.4.6 using
exactly the same cfg script file. Which version are you using?

You can work around it like this:
  record_route_preset("sbc.ip-sentinel.com:5091;transport=tls;r2=on",
"10.0.0.5:5060;r2=on");

...although you may want to change that 10.0.0.5 address to the external IP,
as mentioned in my comments on another thread a few minutes ago.

John Quick
Systems Consultant
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Running OpenSIPS on same box as Asterisk/FreeSwitch

2020-05-19 Thread John Quick
Hi James and others,

James, I have provided some explanation and guidance specific to you at the end 
of this post. First, I need to retract some of the explanation I gave in my 
original post because it was wrong. The basic problem is as described - 
handling of loose routed sequential requests goes wrong when OpenSIPS is 
running on the same host server as Asterisk or FreeSwitch, using the same IP 
but different ports.

I think the correct explanation for what is happening is this: 
Where the address in the R-URI is the same as its local address, OpenSIPS 
copies the URI (and parameters) from a Route header to the R-URI which, in this 
use-case, causes the request to loop back to itself. It should instead delete 
the two Route headers and leave the original R-URI value unchanged.

James, what you describe is not identical to my issue, although you may have my 
issue plus another.
It should be fairly easy for you to fix the problem of private LAN addresses 
being used where you want external IP's to be used.
OpenSIPS handles this issue through the "advertised address". This allows it to 
listen on one interface, but to populate SIP headers such as Via and 
Record-Route with another.
Various mechanisms are available to add to your script including the following:
1) Define it for each interface in the listen statement: e.g.  listen = 
tls:10.x.x.x:5091 as :5091
2) Global settings at the top of your script:  advertised_address and 
advertised_port
3) Within the main body of your script, e.g. just before the call to 
record_route(), insert a line like: set_advertised_address();
4) Instead of calling record_route(), call 
record_route_preset(,); 
The first two are described in the section called 'Global Parameters' in the 
documentation
The third one is described in 'Core Functions' (In v2.4, they are items 45 and 
46)
The fourth is documented in the RR module notes

John Quick
Smartvox Limited


> From: James Hogbin  
> Sent: 18 May 2020 17:24
> To: john quick ; OpenSIPS users mailling list 
> 
> Subject: Re: [OpenSIPS-Users] Running OpenSIPS on same box as 
> Asterisk/FreeSwitch
>
> I thought I had just done some bad config. I have almost exactly the same 
> thing.
>
> I have Freeswitch And Opensips on Azure VM’s
>
> Freeswitch = 10.0.0.4 + External IP
> Opensips = 10.0.0.5 + External IP
>
> Both are configured to use the external addresses
>
> Freeswitch will start the conversation on its external Gateway IP address 
> with the Opensips external IP address
>
> However the moment I put the Record_Route in the message to Teams Freeswitch 
> starts using the local 10.x.x.x. address on opensips rather than the external 
> address for ACK and BYE which rogers the whole thing up.
>
> I’m sure there is probably some way to fix it in the opensips plan as the 
> dialog/transaction ID’s are still there but it’s beyond me.
>
> James
> James Hogbin 
> Director 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Running OpenSIPS on same box as Asterisk/FreeSwitch

2020-05-18 Thread John Quick
Whenever I have tried to run OpenSIPS on the same host server as either
Asterisk or FreeSwitch (using different ports), I have always hit a snag
with routing of sequential loose-routed requests. Possibly this only happens
when using double Record-Route headers which I need for protocol conversion
(TLS to UDP or TLS to TCP).

Where the address in the topmost Route header is the same as it's local
address, OpenSIPS copies the URI (and parameters) from a Route header to the
R-URI which, in this use-case, causes the request to loop back to itself. It
should instead delete the two Route headers and copy the URI value from the
Contact header, picking up the correct port for the Asterisk/FreeSwitch app.

I've tried Googling to see if others have experienced this, but didn't find
any nice solution other than using two IP's on the same box.
A post from Flavio mentions this problem in June 2013. Is there a simple
solution?

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Are alias_db_.. blocking functions?

2020-05-18 Thread John Quick
Please can someone confirm if alias_db_lookup() and alias_db_find() are
blocking functions.
If they are, can they be used in the async function?
I'm using v2.4.6 and 2.4.7 of OpenSIPS.
Thanks.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS as Teams SBC

2020-05-11 Thread John Quick
I agree completely with Ovidiu.
The Microsoft documentation says to use a FQDN in the Contact header, but
this is wrong when the SBC is acting as a SIP Proxy.
The blog post on the OpenSIPS website explains that actually the
Record-Route header needs the FQDN.
The one exception to this is the handling of OPTIONS pings - for these,
OpenSIPS is the end point so it must use a FQDN in Contact.

If you change the Contact header in call setup then you risk breaking the
path for sequential requests, such as ACK.
If ACK does not reach its destination, the call drops at one end after about
20 seconds - exactly what you are seeing.

I have not yet found a good way to capture TLS encoded SIP. In theory, you
can use sngrep with the -k option to identify the path to the private key
file.
It would be necessary to start sngrep first, then start (or restart)
OpenSIPS. However, this never works for me.
I had more success using the siptrace module to capture the packets to a DB
table. Presenting it as a sequence diagram may be possible using the
OpenSIPS Control Panel.
Wireshark also has the ability to capture, decode and present TLS encrypted
SIP.
Another option might be to mirror the traffic to Homer in HEP format and
then use Homer to create the sequence diagram.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS as Teams SBC

2020-05-08 Thread John Quick
James,

Just to add to Alexey's last comment, if your SBC *is* changing the
transport from UDP to TLS, then you must ensure the correct socket is used
on the SBC when it is sending requests to the Teams Proxy:
force_send_socket(tls:137.117.136.143:5091);

You may also find it helpful to add " AS sbc.ip-sentinel.com:5091" on the
end of your tls listen statement

John Quick
Smartvox Limited
Web: www.smartvox.co.uk


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem with add_rr_param() in v2.4.7

2020-04-28 Thread John Quick
Bogdan,

Thanks for checking.
If possible, I will provide a minimal cfg file to demonstrate the problem.
I'm not able to use the original server for this because it belongs to a
customer, has been reverted to v2.4.6 and is in constant use.
On that server, OpenSIPS was installed using apt-get - i.e. from a binary
package. I don't know if that could be relevant.

On a different server, I will compile a fresh version of 2.4.7 from source.
Then see if I can reproduce the fault and report back here.

John Quick
Smartvox Limited




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] string comparison

2020-04-23 Thread John Quick
Hi Volga,

I just added a check on one of my test servers, making use of some existing 
code that sets a variable $var(srctype) to various values including:

  if (is_registered("location"))
  $var(srctype) = "regd-user";

The new code I added just below looks like this:

  $var(teststr) = "regd-user";
  if ($var(srctype) == $var(teststr))
 xlog("L_WARN", "## SOURCE IS A REGISTERED USER ##\n");

Then I registered an IP Phone and made a call. Output to my log file:
2020-04-23 15:10:40  ## SOURCE IS A REGISTERED USER ##

So the basic test for comparing strings should work. There must be some other 
explanation.
I have known situations where it was necessary to cast a string value to be 
recognised as an integer, but you are only testing strings.
Could there be a leading or trailing space? Perhaps you need to use a trim 
function. Check out the string transformations:
https://www.opensips.org/Documentation/Script-Tran-2-4#toc1
To understand what is happening you could try using regex test, =~  instead of 
equality, ==
You could report the length of the string values stored in the two vars, using 
{s.len} transformation (see above link).

John Quick
Smartvox Limited


-Original Message-
From: volga629  
Sent: 23 April 2020 14:43
To: john.qu...@smartvox.co.uk; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] string comparison

Hello John,

I tested var to var

and test still failing

Tried

  if($var(tls-frompbx)=="$var(usr_check_tls)")

or this

  if($var(tls-frompbx)==$var(usr_check_tls))

volga629


On 4/23/20 9:41 AM, John Quick wrote:
> Hi Volga
>
> Please could you always format your emails to the users group as plain 
> text, not HTML.
> I had to copy and paste then save and re-open just to read your question.
>
> I would think the most likely explanation for the string comparison 
> failing is that you are comparing an $avp with a $var They are 
> different - in particular, an AVP can hold several values, somewhat 
> like an array type in other languages.
> Can you try the same test but with a var for both sides of the comparison.
>
> John Quick
> Smartvox Limited
>
>
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] string comparison

2020-04-23 Thread John Quick
Hi Volga

Please could you always format your emails to the users group as plain text,
not HTML.
I had to copy and paste then save and re-open just to read your question.

I would think the most likely explanation for the string comparison failing
is that you are comparing an $avp with a $var
They are different - in particular, an AVP can hold several values, somewhat
like an array type in other languages.
Can you try the same test but with a var for both sides of the comparison.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ms teams ACK

2020-04-20 Thread John Quick
Johan,

Check that you're not calling fix_nated_contact() in the onreply_route that
handles the 200 OK from Teams Proxy.
You must not fix the Contact in the 200 OK because then the ACK from your
end will be mis-routed.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS as Teams SBC RTP->SRTP Question

2020-04-18 Thread John Quick
I have written a couple of articles which, between them, should help you
with this question.
The first article looks at WebRTC <--> SIP using rtpengine:
https://kb.smartvox.co.uk/opensips/webrtc-using-opensips-and-rtpengine/
The other one discusses how you configure OpenSIPS 2.2.x for TLS:
https://kb.smartvox.co.uk/opensips/using-tls-in-opensips-v2-2-x/
..in the third paragraph it mentions about SRTP-RTP transcoding with a cross
reference to the first article and with a note about how to adjust the
parameters sent to rtpengine so they will work for SRTP (SAVP) instead of
WebRTC (SAVPF). So together it should provide you with the examples and
explanations you seek.

I have been working on setting up a Teams SBC over the last 2 weeks. I have
it working with calls in both directions and it is using rtpengine exactly
as described in my two articles.
Have you read the blog/knowledgebase article on the opensips web site about
Teams SBC?
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/

John Quick
Smartvox Limited
Web: www.smartvox.co.uk


>> I see that there is an rtpengine module for OpenSIPS but I could not find
a good example of how this could be used to encrypt the RTP packets as it
passes to teams?
>>
>> Anyone have a working example of this?  Or even better, something already
working with Teams?


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem with add_rr_param() in v2.4.7

2020-04-15 Thread John Quick
Hi Bogdan,

The only things that are unusual are:
 1) transport protocol conversion between TLS and UDP so it requires double 
RR's.
 2) it must use FQDN instead of IP address in the Record Route headers for the 
TLS interface

The script adds two RR headers like this:

record_route_preset(":5061;transport=tls", ":5060");
add_rr_param(";r2=on");

There is also one more call to add_rr_param() after those two lines, but none 
of the parameters is added.

For calls going in the other direction:
record_route_preset(":5060", ":5061;transport=tls");
add_rr_param(";r2=on");

When testing with v2.4.7, the listen statements were like this:
auto_aliases=no
alias=udp::5060
alias=tls::5061
listen=udp::5060
listen=tls::5061

One idea I had is that it might work to use record_route() instead of 
record_route_preset() provided I changed the second listen statement to this:
listen=tls::5061 AS :5061

...but I haven't tested to see if the fault only happens with 
record_route_preset() and not with record_route().

John Quick
Smartvox Limited


-Original Message-
From: Bogdan-Andrei Iancu  
Sent: 15 April 2020 18:37
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Problem with add_rr_param() in v2.4.7

Hi John,

So you say you experience a regression between 2.4.6 and 2.4.7 Any 
particularities in terms of how you do the record_routing() and add_rr_param(), 
like sequence, other msg changes or signaling ?

Any simple way to reproduce the issue?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 4/14/20 6:24 PM, John Quick wrote:
> I've tried running the same opensips.cfg script in v2.4.6 and then 
> 2.4.7 When it is changed to 2.4.7, the function add_rr_param() does nothing.
> When run under 2.4.6 it updates the Record-Route header as you would expect.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Problem with add_rr_param() in v2.4.7

2020-04-14 Thread John Quick
I've tried running the same opensips.cfg script in v2.4.6 and then 2.4.7
When it is changed to 2.4.7, the function add_rr_param() does nothing.
When run under 2.4.6 it updates the Record-Route header as you would expect.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Remove Route Header before forwarding

2019-04-08 Thread John Quick
Sunil,

I see that you didn't get a reply yet to your query.
I have been using the path header in a setup that has two OpenSIPS Proxies -
1) Edge Proxy which adds the header and 2) The Registrar Server
In my setup, I use the loose_route() function in the Edge Proxy to remove
the route header added to INVITE by the Registrar, following lookup.

Something like this:
  if (has_totag()) {
 if (loose_route()) {
 ...

The loose_route() function will remove the route header provided it
described a route to itself. This is the normal situation.
It will also set the destination if the route header contained a
"received=.." parameter. Both of these actions are useful.

If the INVITE then fails, you should be able to catch it in a failure_route
section and from there you could deal with redirection to another
destination.

Hope this helps.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] async and event handlers

2019-04-08 Thread John Quick
Hi Bogdan,

I call save(location) from the script in the usual way.
From observation of events triggered by this process, I found (as you would
expect):
 E_UL_CONTACT_INSERT event is triggered whenever a contact is inserted
 E_UL_CONTATC_DELETE event is triggered whenever a contact is deleted

It is my intention to use these events to update a record stored in another
completely separate database.
This additional database is used - indirectly - to control core FreeSwitch
telephony servers. It allows them to know if a particular AOR is registered
and thereby avoids the need to send an INVITE to the OpenSIPS Proxy and get
back a 404 when the user has no devices registered.
I am updating the additional database from the event handlers by calling
cache_store().  [It is actually a couchbase store.]

My question is this: Can I use async() or launch() as a wrapper for a
cache_store() function call made from within an event handler? Is there any
advantage to doing so or can I regard event handlers as a safe place to
initiate blocking operations because, I assume, events must already have
their own queue.

I tried Ben's suggestion to make the event handler itself async, but this
failed as explained earlier in this thread.

John Quick
Smartvox Limited


> Hi John,
>
> I don't think you can "replicate" the event triggers with some 
> avp_db_query() from script. When you so a save(location), you never know 
> if that call will translate into updating an existing contact or in 
> inserting a new one - this is no visible at script level
>
> Regards,
>
> Bogdan-Andrei Iancu



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] async and event handlers

2019-03-20 Thread John Quick
Ben,

Thanks. I hadn't spotted that little detail in the Event Handler
documentation.

My event handler first retrieves some data about the relevant AOR from the
DB, then updates it, then writes it back.
Interestingly, when I add "async" as a 2nd parameter in the event handler
definition, this breaks the initial DB lookup.
The error message reported is:
ERROR: core: cachedb_fetch: failed to get connection for grp name [userdb] :
check db_url

It would appear that the cachedb information from the modparam section of my
script is not available to an asynchronous event handler, but is to a
synchronous one.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] async and event handlers

2019-03-20 Thread John Quick
I have a script which employs USRLOC to save registrations and also has an
event handler defined for E_UL_CONTACT_INSERT.
It is convenient, for the required logic/business rules, that I update a
user database from within the event handler.

If the DB update were happening directly from the main route, then I would
probably use async(avp_db_query())
However, if a potentially blocking operation - such as a DB write - is done
from within the event handler, am I correct in thinking that this is much
safer and therefore does not need to be wrapped in an async() or launch()
function call?

Can you even use async() or launch() from within an event handler?

Using v2.4.4

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reply_to_via and topmost Via addressing

2019-03-05 Thread John Quick
Update to my earlier post: I found a change log for v1.5 or 1.6 that says
"reply_to_via" option has been withdrawn.
So the documentation needs to be corrected because it is still shown right
through to v2.4

I still have some questions about how much control we have over the routing
of replies:
Is it possible to change the destination where replies are sent or will they
always be routed to the source address of the corresponding SIP request,
even when the topmost Via has a different address in its URI?
The answer to that question may be in 2 parts because some responses are
generated internally - e.g. "100 Giving a try", some 200 OK's - while others
are received from a downstream server and can be caught in onreply_route.
[It is also possible to explicitly generate responses using t_reply() or
sl_send_reply(), but these offer no routing options].

Supplementary to this, is the addition of ";received=w.x.y.z" to the topmost
Via something that is always done when the source of a request doesn't match
the Via's URI? Does this happen inside t_relay()? Do we have any control of
this from within the script?

Thanks.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] reply_to_via and topmost Via addressing

2019-03-04 Thread John Quick
Using v2.4.4 OpenSIPS server in a rather complex NAT'd network environment
using containers. Using sngrep to capture the SIP packets on the host
server.

I'm puzzled by what is observed:
An INVITE arrives from a peer via a NAT router and the topmost Via has the
true address of that peer (10.42.4.12) and does not have rport defined.
The source address of the request appears to be 10.2.102.194 because there
is a NAT router/interface between the peer and the OpenSIPS Proxy.

INVITE sip:221222@192.168.5.90:2048;line=4yh07htg SIP/2.0
Record-Route: 
Via: SIP/2.0/UDP 10.42.4.12:5060;branch=z9hG4bKfa55.ce70bde1.0
Via: SIP/2.0/UDP
10.2.69.161;received=10.42.7.0;rport=1024;branch=z9hG4bKpm809p8y95m4N

The opensips.cfg script does not call the force_rport() or
fix_nated_contact() functions.

...and yet the "100 Giving a try" response is *not* sent to 10.42.4.12, but
instead is sent to the apparent source address of the INVITE request.

I found a setting in the documentation called "reply_to_via" (CoreParameters
section 2.55) which looked like it might alter this behaviour.
However, when a line is added to opensips.cfg "reply_to_via=1" it causes
syntax error on line and OpenSIPS will not start.

Any help would be much appreciated.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] RTPProxy No Audio on Outbound Calls

2019-02-13 Thread John Quick
Mark,

You can detect if the INVITE came from your Asterisk by testing the $si
pseudo-variable.
That will allow you to identify the direction of the call. I usually set a
flag for this purpose. For example:
If ($si == "my.ast.er.isk")
setflag(DIR_OUT);

At the point where you engage the rtpproxy, you will then be able to reverse
the internal/external parameters for the function call depending on the
direction of the call

If (isflagset(DIR_OUT)) {
rtpproxy_offer("corfei");
} else {
rtpproxy_offer("corfie");
}

The same flag should still be valid in the onreply handler where you can do
something similar. [Not sure if I have ie/ei the right way round in my
example].

That said, I'm not sure this topology is a good one to be using.
I would generally try to avoid having the media proxy behind NAT and also
using it in bridging mode - it makes life too complicated.

P.S. Looks like you sorted out the problems with the call to do_routing().

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] tls -> udp

2019-02-13 Thread John Quick
Hi Johan,

I've configured Proxy servers to do this a few times.
You should do the following:
1) For Requests going from TLS to UDP, change any occurrence of
"transport=tls" in the R-URI parameters. I use the following to do this:
subst_uri('/transport=tls/transport=udp/I');

2) Make sure OpenSIPS adds correct Record-Route headers. 
Default behaviour in this case is to add 2 RR headers when you call
record_route(). Make sure double_rr has not been disabled in the modparam
section.
One header describes the TLS socket and the other header describes the UDP
socket. These are needed for sequential Loose-Routed requests later in the
dialogue.

3) Just before you relay the request over UDP, call the force_send_socket()
function. For example:
force_send_socket(udp:12.34.56.78:5060);

Hope this helps.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Dynamic Routing never routes call

2019-01-26 Thread John Quick
Hi Mark,

Liviu made a mistake in his last response to you. He picked out the debug at
the end of the drouting process, not the beginning. Perhaps he had the
screen upside down.

From the debug it is clear that do_routing behaved correctly and has worked.
So the problem is either that you have misunderstood what the do_routing()
function is meant to do OR you have a mistake in the code in your script
just after the snippet that you posted to the forum.

do_routing() will only alter the R-URI. It does not then send the request to
the destination and exit. You must do this explicitly, for example:
t_relay()
exit

As a general point for anyone using OpenSIPS, it is worth noting that just
about every function will return.
The only exception I can think of right now is t_check_trans() and even that
will sometimes return - it depends on specific conditions.
If you want the main route in your script to stop executing after a function
has been called, you need to insert an exit statement.
Also note that each type of route has a default behaviour on exit as
described in the documentation under the heading "Types of routes"

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] usrloc restart persistency on seed node

2019-01-03 Thread John Quick
Hi Liviu,

I like your suggestion. It seems like a pragmatic solution so I welcome this
idea.
The X second delay is probably unavoidable, but could there be a problem if
new registration requests arrive during the delay period?

I already have an X second delay because my current work-around is to launch
a background script just before starting OpenSIPS.
The background script has an X second delay then it runs "opensipsctl fifo
ul_cluster_sync" and then exits.

For backward compatibility, perhaps the default behaviour should be the same
as it is now.

John Quick
Smartvox Limited


> Happy New Year John, Alexey and everyone else!
>
> I just finished catching up with this thread, and I must admit that I now
> concur with John's distaste of the asymmetric nature of cluster node
restarts!
>
> Although it is correct and gets the job done, the 2.4 "seed" mechanism
forces
> the admin to conditionally add a "opensipsctl fifo ul_cluster_sync"
command
> into the startup script of all "seed" nodes.  I think we can do better :)
>
> What if we kept the "seed" concept, but tweaked it such that instead of 
> meaning:
> "following a restart, always start in 'synced' state, with an empty
dataset"
>
> ... it would now mean:
> "following a restart or cluster sync command, fall back to a 'synced'
state,
> with an empty dataset if and only if we are unable to find a suitable sync
> candidate within X seconds"
>
> This solution seems to fit all requirements that I've seen posted so far.
It is:
>
> * correct (a cluster with at least 1 "seed" node will still never
deadlock)
> * symmetric (with the exception of cluster bootstrapping, all node
restarts are identical)
> * autonomous (users need not even know about "ul_cluster_sync" anymore!  
> Not saying this is necessarily good, but it brings down the learning
curve)
>
> The only downside could be that any cluster bootstrap will now last at 
> least X seconds.
> But that seems such a rare event (in production, at least) that we need 
> not worry about it.  Furthermore, the X seconds will be configurable.
>
> What do you think?
>
> PS: by "cluster bootstrap" I mean (re)starting all nodes simultaneously.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] usrloc restart persistency on seed node

2019-01-02 Thread John Quick
Alexey,

Thanks for your feedback. I acknowledge that, in theory, a situation may
arise where a node is brought online and all the previously running nodes
were not fully synchronised so it is then a problem for the newly started
node to know which data set to pull. In addition to the example you give -
lost interconnection - I can also foresee difficulties when several nodes
all start at the same time. However, I do not see how arbitrarily setting
one node as "seed" will help to resolve either of these situations unless
the seed node has more (or better) information than the others.

I am trying to design a multi-node solution that is scalable. I want to be
able to add and remove nodes according to current load. Also, to be able to
take one node offline, do some maintenance, then bring it back online. For
my scenario, the probability of any node being taken offline for maintenance
during the year is 99.9% whereas I would say the probability of partial loss
of LAN connectivity (causing the split-brain issue) is less than 0.01%.

If possible, I would really like to see an option added to the usrloc module
to override the "seed" node concept. Something that allows any node
(including seed) to attempt to pull registration details from another node
on startup. In my scenario, a newly started node with no usrloc data is a
major problem - it could take it 40 minutes to get close to having a full
set of registration data. I would prefer to take the risk of it pulling data
from the wrong node rather than it not attempting to synchronise at all.

Happy New Year to all.

John Quick
Smartvox Limited


> Hi John,
>
> Next is just my opinion. And I didn't explore source code OpenSIPS for
syncing data.
>
> The problem is little bit deeper. As we have cluster, we potentially have
split-brain.
> We can disable seed node at all and just let nodes work after
disaster/restart. But it means that we can't guarantee consistency of data.
So nodes must show this with  state.  
>
> Usually clusters use quorum to trust on. But for OpenSIPS I think this
approach is too expensive. And of course for quorum we need minimum 3 hosts.
> For 2 hosts after loosing/restoring interconnection it is impossible to
say, which host has consistent data. That's why OpenSIPS uses seed node as
artificial trust point. I think  node doesn't solve syncing problems,
but it simplifies total work.
>
> Let's imagine 3 nodes A,B,C. A is Active. A and B lost interconnection. C
is down. Then C is up and has 2 hosts for syncing. But A already has 200
phones re-registered for some reason. So we have 200 conflicts (on node B
the same phones still in memory). Where to sync from?  host will
answer this question in 2 cases (A or B). Of course if C is  so it
just will be happy from the start. And I actually don't know what happens,
if we now run  on C. Will it get all the contacts from A
and B or not?
>
>We operate with specific data, which is temporary. So syncing policy can be
more relaxed. May be it's a good idea to connect somehow  node with
Active role in the cluster. But again, if Active node restarts and still
Active - we will have a problem.
>
> -
> Alexey Vasilyev


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] usrloc restart persistency on seed node

2018-12-31 Thread John Quick
Hi Alexei,

Many thanks for your reply to my query about syncing the seed node for
usrloc registrations.
I just tried the command you suggested and it does solve the problem. I also
read the other thread you pointed to.

I do not really understand the need for the seed node, especially not for
the case of memory based registrations.
A seed node makes sense if that node has a superior knowledge of the
topology or the data than the other nodes. It's view of the universe is to
be trusted more than the view held by any other node.
However, in the case of a cluster topology that is pre-defined (no
auto-discovery) and for full-sharing of usrloc registration data held
exclusively in memory, then all the nodes are equal - there is no superior
knowledge that can exist in one node. The one with the most accurate view of
the world is the one that has been running the longest.

I am wondering if there is a justifiable case for an option that would
disable the concept of the seed node and make it so that, on startup, every
instance will attempt to get the usrloc data from any other running instance
that has data available. In effect, I can mimic this behaviour by adding the
command line you suggested just after opensips has started:
opensipsctl fifo ul_cluster_sync

Am I missing something here about the concept of the seed node?
It concerns me that this seed concept is at odds with the concept of true
horizontal scalability.
All nodes are equal, but some are more equal than others!

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] usrloc restart persistency on seed node

2018-12-20 Thread John Quick
Using v2.4.3, I have a three node cluster with the following settings for
clusterer-related usrloc parameters:
modparam("usrloc", "db_url", "mysql://user:pass@localhost/opensips")
modparam("usrloc", "working_mode_preset", "full-sharing-cluster")
modparam("usrloc", "location_cluster", 1)

I have been testing restart persistency by stopping and restarting the node,
one at a time.
My expectation is that, immediately after a restart on any node, it should
read the usrloc data from the other nodes via the bin interface. Thus,
existing registrations should appear when using the command "opensipsctl ul
show" within a few seconds of the restart.
This works as expected if I restart node2 or node3, but it does not when I
restart node1. Node1 needs a device to register before it appears in the "ul
show" list.
The only difference is that node1 is set as "seed" in the clusterer
database. I hoped this only meant that the seed server must start first,
before any others. Once all three nodes are running I want them all to be
equal thereby allowing me to add new nodes and remove existing nodes at will
- horizontal scalability.

Does the seed node do restart persistency differently? Is it, for example,
trying to read back the registrations from its local mysql database?
If so, I have a problem because my nodes are using containers and the local
database is rebuilt (effectively cleared) every time I restart the node.

John Quick
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-19 Thread John Quick
Hello Bogdan,

The link works okay now, but (I think) only if the selected call is on the
first page of results in the siptrace tab.

John Quick
Smartvox Limited


> Hi John,
> 
> I found a small typo that affected who the link was constructed . See
>
https://github.com/OpenSIPS/opensips-cp/commit/d50503123477f99b0079570361407
7b685ca4579
>
> In order to link siptrace to cdrviewer, you need to (a) be sure homer 
> tool is disabled and (b) siptrace tool is enabled.
>
> Let me know if this fix does the trick for you.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>http://www.opensips-solutions.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] WebRTC-SIP only working in one direction

2018-11-09 Thread John Quick
I have been trying to get WebRTC working with OpenSIPS v2.4 and rtpengine
version "git-master-3102357"
Testing has been tried using both Chrome and Firefox browsers running on
Windows 10 PCs combined with two different web-host-servers:
 (1) A home-grown sip.js page and(2) the ctxSIP trial client available
at collecttix.github.io/ctxSip

Test calls from the WebRTC client to an Asterisk server, via OpenSIPS and
rtpengine, are working okay.
However, I cannot get calls to work the other way.
The WebRTC client registers okay. It appears in the location table with
typical values like this:
 Username=1002
 Contact= sip:mch27rvr@bcdtsq8dhvt4.invalid;transport=ws
 Received= sip:123.45.67.89:15752;transport=wss
 Cflags= WS_DEVICE NATTED_CLIENT
 User-agent= SIP.js/0.11.3 (my sip.js)   OR SIP.js/0.7.8 (ctx client)

Here is what happens when I make a call from Asterisk to user 1002:
Using Chrome or Firefox with my own sip.js web page:
It initiates ringing on the browser-based client (the caller's name is shown
correctly), but when I click the Answer button, the call fails.
The SIP time sequence between OpenSIPS and the WebRTC client looks like
this:
->   INVITE with SDP
<100 Trying
<180 Ringing
  Browser page shows incoming call and displays correct caller display name
  I click the Answer button
<--- 480 Temporarily Unavailable
On the web page it reports:  Call cancelled:  Cause: WebRTC Error

Using Chrome with the ctxSip client:
The browser-based client rejects the call as soon as the INVITE is received.
->   INVITE with SDP
<100 Trying
<488 Not Acceptable Here

Using Firefox with the ctxSip client:
The browser-based client shows an incoming call and the caller's display
name is shown correctly. It offers a green and a red button to respond to
the call.
I press the green button and the call ends immediately.
->   INVITE with SDP
<100 Trying
<180 Ringing
  Browser page shows incoming call and displays correct caller display name
  I click the Answer button
<--- 480 Temporarily Unavailable
The browser window simply reports "Terminated".

Any help or ideas would be very welcome. I've tried everything I can think
of including changes to the codecs offered and various adjustments to the
arguments passed (e.g. rtcp-mux, ICE) in rtpengine_offer(). My current
arguments string is like this:
"trust-address replace-origin replace-session-connection rtcp-mux-offer
ICE=force codec-strip-G729 transcode-PCMU RTP/SAVPF"

My JavaScript skills are minimal. I think there must be a way to get more
debug info from sip.js, but I cannot figure it out. If anyone can post a
sample of the code showing how to activate the debug logging that would be
really useful. I'm not even sure where the log output would be written.

Could it be relevant that rtpengine and OpenSIPS, although both running on
one server, are bound to different IP addresses?

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-08 Thread John Quick
Yes, the SIP Trace tab is enabled and can be used directly to view the 
requests/responses for a call.
The CDR Viewer tab is also enabled and it shows me the same call. However, if I 
click on the Sip Call ID for a given call, it acts as a link to a new blank 
page.
It does not open the SIP Trace view as I expected it to do.

This is the link URL. Perhaps "tracer=homer" is significant here - I'm not 
using Homer, just writing all data to MySQL tables:
http://abc.xyz.com:8080/cp/tools/system/cdrviewer/trace.php?tracer=homer=39e32b7a-5d45-1237-beb7-52540058cb88

John Quick
Smartvox Limited
Tel:   01727-221221


-Original Message-
From: Bogdan-Andrei Iancu  
Sent: 07 November 2018 20:57
To: john.qu...@smartvox.co.uk; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

Hi John,

So you have the siptrace tool enabled, right ? but the link is broken ?

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 11/07/2018 05:08 PM, John Quick wrote:
> In the CDR Viewer tab, the Call-ID is shown as a link, but the link is not 
> working.
> If I click this link, it displays a blank page. I think this used to take you 
> to the SIP Trace page and display the data for the selected call.
> Data for this call is available if I go directly to the SIP Trace tab and 
> click on the Call Info button for the same call.
>
> I've checked the settings in 
> /config/tools/system/cdrviewer/local.inc.php and they look correct However, I 
> have not set up the suggested cron job yet. I assume it not relevant here.
>
> John Quick
> Smartvox Limited
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-07 Thread John Quick
In the CDR Viewer tab, the Call-ID is shown as a link, but the link is not 
working.
If I click this link, it displays a blank page. I think this used to take you 
to the SIP Trace page and display the data for the selected call.
Data for this call is available if I go directly to the SIP Trace tab and click 
on the Call Info button for the same call.

I've checked the settings in /config/tools/system/cdrviewer/local.inc.php and 
they look correct
However, I have not set up the suggested cron job yet. I assume it not relevant 
here.

John Quick
Smartvox Limited


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-07 Thread John Quick
Hi Bogdan,

On item 1: Sorry, my mistake. I was looking for the page to change and did not 
notice that the domain name is loaded in the existing text box at the top.

John Quick
Smartvox Limited


-Original Message-
From: Bogdan-Andrei Iancu  
Sent: 06 November 2018 21:12
To: john.qu...@smartvox.co.uk; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

HI John,

Thanks for the reports :)

1) I tried to reproduce, but no luck - When Edit button is clicked, the value 
is loaded in the upper text area, so you change it. Do you use the mighty 
"admin" user for this operation ? or an access user with custom permissions ?

2) Indeed, there was missing entry for the tls_mgm module in the 
modules.inc.php file, I fixed it in the git repo.

3) starting with 7.2.3 (las year), the mi_json became the only supported MI 
backend in OCP - the reason is that mi_json is the only one to offer a 
structured / encoded data output that can be easily and reliably parsed by OCP.

Best Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-06 Thread John Quick
Hi Bogdan,

Several issues previously mentioned were raised as issues. Thanks for the fixes 
so far.

I don't want to raise issues if it is just my testing at fault, so here are 
some new questions:
1. Should it be possible to edit a record in System>Domains?  When I click 
Edit, the page doesn’t change. I have read-write permission
2. How do you activate the TLS Management tab? I cannot see it
3. Why has support for MI using FIFO been dropped?  It seems you must use 
MI_JSON (which needs the HTTPD module)

John Quick
Smartvox Limited


> -Original Message-
> From: Bogdan-Andrei Iancu  
> Sent: 05 November 2018 17:10
> To: john.qu...@smartvox.co.uk; users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released
>
> Hi John,
>
>Thanks for all your testing - this is something that we so most appreciate ;).
>
> To help us even more, could you please split the report (you have in the
> email) as individual issues and create corresponding tickets on github:
> https://github.com/OpenSIPS/opensips-cp/issues
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 8.2.4 was released

2018-11-05 Thread John Quick
Hello Bogdan,

Thanks for releasing a new version of the Control Panel. There are some
great new features in this version that I want to try.

I have been testing OCP v8 on a CentOS 6 server. I'm finding quite a lot of
errors - it is possible some of these are associated with the operating
system or the version of PHP I am using. PHP is v 5.3.3

The most critical problem for me concerns administrator access: I am unable
to change the password for the admin user.
As a precaution, I created a new admin user with a different name and then
tried to revoke the key privileges of the original admin user, but this made
no difference until I edited the source code and changed the tool name
passed to the get_priv() function as detailed below.

Here are my full notes on the problems encountered so far and code
adjustments I have made:
In login.php: Warns me "It is not safe to rely on the systems timezone
settings. You are required to use date.timezone or
date_default_timezone_set() function".   As a work-around, I added calls to
date_default_timezone_set("Europe/London") in a couple of places to stop
these warnings being written.

Many of the tabs display a blank page. In the httpd log file; the httpd log
files shows errors about "unexpected [".  When I look up the file and line
number shown in the httpd log message, it's always a line that calls the
die() function to handle failure of an SQL request.
I found it was due to the use of "errorInfo()[2]".  If you remove the [2],
it doesn't give an error and the page is rendered too.

Used grep to find every case like this:
# grep -rl "errorInfo()\[" .
./users/user_management/template/user_management.main.php
./users/acl_management/template/acl_management.main.php
./system/dialplan/template/dialplan.main.php
./system/dialplan/dialplan.php
./system/siptrace/template/tracer.main.php
./system/drouting/template/groups.main.php
./system/drouting/template/rules.main.php
./system/drouting/template/carriers.main.php
./system/drouting/template/gateways.main.php
./system/drouting/lib/carriers.test.inc.php
./system/drouting/lib/carriers.functions.inc.php
./system/tls_mgm/lib/data_loader.php
./system/loadbalancer/template/loadbalancer.main.php
./system/dispatcher/template/dispatcher.main.php
./system/dispatcher/template/dispatcher.form.php
./system/tviewer/lib/data_loader.php
./system/callcenter/lib/data_loader.php
./admin/list_admins/template/list_admins.main.php

Admin Access Control
I cannot find a way to change the admin password. It always accepts the
password of "opensips" even after resetting it in the Admin User editing
form and also deleting it from the field "password" in the
ocp_admin_privileges table. On further testing, I then found that none of
the changes I make to the admin user get saved to the DB - not just the
password, but also the first name and last name fields.

Access privileges were not working to restrict whether the logged-in user
could change their own (and other people's) admin privileges.
Found this was because the get_priv() function was being called with the
argument set to "list_admins" and that the arrays used to store access
privileges only have a key called "user_management" and do not have one for
"list_admins".  There are no lines of code to act as a "catch-all" in the
get_priv() function so if the tool name passed to the function does not
match any of the known tab names, then it fails to set the session variable
read_only. The absence of any value is then treated as "grant full access"
in the corresponding module so it is not very safe.
As a work-around, I edited web/tools/admin/list_admins/index.php and changed
the following line:
<< get_priv("list_admins");
>> get_priv("user_management");

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Installing rtpengine on CentOS 6

2018-10-10 Thread John Quick
Thanks for the suggestions from Denys Pozniak and Răzvan Crainea.
I now have it working on my CentOS 6 server:
The first dependency was fixed by installing the iptables-devel package.
Then downloaded two rpm files for hiredis and hiredis-devel from
centos.pkgs.org and installed them with yum.
Still getting warnings about the way some arguments are passed, but at least
the build was successful allowing me to move on and test.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Installing rtpengine on CentOS 6

2018-10-09 Thread John Quick
Hi,

This is more an enquiry to the community than the OpenSIPS developers.
Has anyone successfully installed rtpengine on CentOS 6?  If so, please can
you assist me.

I've been able to fix most dependencies, but when I run make these two
remain:
Package libiptc was not found in the pkg-config search path.
../include/redis.h:14:29: error: hiredis/hiredis.h: No such file or
directory

Using yum with epel and nux repos, I could only find packages for
libiptcdata-devel and redis, not for libiptc or hiredis.

Also, when I run make it gives me this warning about argument types in
function atomic64_get_set:
warning: passing argument 1 of 'g_atomic_pointer_compare_and_exchange' from
incompatible pointer type
expected 'void * volatile*' but argument is of type 'volatile void **'
Can I safely ignore this warning?

Thanks in advance for any help you can offer.

John Quick
Smartvox Limited



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Help with my OpenSips architecture

2018-08-09 Thread John Quick
Hi Dominic,

I have a similar setup in a test rig. For comparison, here is the output I
get for the same fifo commands:
opensipsctl fifo clusterer_list
Cluster:: 1
Node:: 1 DB_ID=1 URL=bin:192.168.0.118:5678 Enabled=1 Link_state=Up
Next_hop=1 Description=vSvr2

opensipsctl fifo clusterer_list_topology
Cluster:: 1
Node:: 2 Neighbours=1
Node:: 1 Neighbours=2

opensipsctl fifo clusterer_list_cap
Cluster:: 1
Capability:: dialog-dlg-repl State=Ok
Capability:: usrloc-contact-repl State=Ok

Your DB_ID value is very different, but perhaps you're using db_mode 0 -
i.e. node data comes only from the script.

I have a separate local database running on each node and use the following
settings in my script:
All node data are read from the clusterer DB table (db_mode 1, default)
The flags field for node 1 in the clusterer table is set to "seed"
modparam("usrloc", "working_mode_preset", "full-sharing-cluster")
modparam("usrloc", "location_cluster", 1)
modparam("dialog", "db_mode", 0)  // the db_mode for the dialog module
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog", "dlg_sharing_tag", "vip1=active")   // on node 2, it is
"vip1=backup"

Also, try restarting the opensips service, always starting node 1 first
(assuming that node has flags="seed").

Hope this helps.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-08-08 Thread John Quick
Hi Vlad,

I now realise that the problem I'm having is that "default" is a reserved word 
in MySQL.
When I tried to set the 'domain' field to the text "default", it actually sets 
it to blank because that is the default value for this column.


John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-08-08 Thread John Quick
Hi Vlad,

Thanks for replying.
Yes, I must have been looking at the wrong version in the documentation -
the old version was stored in my browser history and I failed to notice.

Even in the correct v2.4, the documentation for DB provisioning is more
complete when read alongside the extra information in your reply.

It is a pity that there is no way to completely disable provisioning from
modparam parameters when you want only to use the DB. Removing the modparam
statements does not disable them, but merely makes them use default preset
values.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-08-01 Thread John Quick
Hi Bogdan,

Thanks for your response to my earlier query.
I’m now trying to convert from modparam based definitions to provisioning
certs from the DB.
I cannot find a published example of a populated DB record in the tls_mgm
table.
Furthermore, the online documentation has gaps regarding DB Provisioning and
it also contains this error:
Section 1.7.14 describes a parameter db_mode, but if you try adding this it
generates an error "parameter  not found in module"

Can you please help with an example record or at least answer these
questions:
a) What to put in the 'domain' field if I only want to set up one default
domain. Should it be "default"?
b) What are the following fields. I am not sure what they should contain:
'address', 'type', 'crl_check_all', 'crl_dir'
c) How does provisioning from DB interact with provisioning from static
modparam values?
I got errors when I commented out modparam statements for "certificate" and
"private_key" because the module was still looking for the "default" files,
even though I am now provisioning from the DB. This means there is now
ambiguity - certificates are defined both in files in modparam and also in
blob fields in the DB.

I assume the blob fields 'certificate', 'private_key' and 'ca_list' must
contain the contents of the certificate, not the path to the file.
This means I'll need to write a script to copy these data from the renewed
LetsEncrypt certificates before issuing the MI reload command.

By the way, the online module documentation for tls_mgm has a duplicate
section - 1.7.18 is same as 1.7.19

John Quick
Smartvox Limited
      

> Bogdan-Andrei Iancu bogdan at opensips.org 
> Thu Jul 26 07:56:18 EDT 2018
> Hi John, When the cert is configured via modparam, the cert is loaded on
startup by OpenSIPS, so any renewal of the cert will have 0 impact on
OpenSIPS - so you will have to restart after each renewal.
> I suggest you to provision the certs via DB (and not script), so you can
do a reload after renewal, with any need to restart opensips.
> Regards, Bogdan-Andrei Iancu


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Using LetsEncrypt certs with v2.4

2018-07-25 Thread John Quick
Does anyone have experience using LetsEncrypt certificates for tls or wss in
OpenSIPS v2.4.x over a long enough period of time for the certificate to be
renewed?

Does the OpenSIPS service need to be restarted after each certbot renewal?
This happens about every 2 months.
I have configured opensips so the path in modparam("tls_mgm", "certificate"
is "/etc/letsencrypt/live//cert.pem"
This is actually a sym-link to the actual cert. It seems to work okay, but
I'm wondering what will happen in two months' time when the cert is renewed.

Thanks.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Source port changing during a transaction

2018-06-26 Thread John Quick
Hi Bogdan,

Thanks for responding.
In this case, the issue is not about info in the Contact or Record-Route 
headers. It is about the topmost Via header.
The source port for the first INVITE is 59500. 'rport' is present so OpenSIPS 
sends the "100 Trying" to port 59500. [The script also calls force_rport()]
Then the UAC sends the same INVITE again (a duplicate, not strictly a 
re-INVITE), but it sends it from port 5062.
OpenSIPS continues to send responses to port 59500 and ignores the new source 
port.
I suspect this is because it sees the second INVITE as a duplicate and discards 
it as unnecessary, but it made me think about the wider issues and what the 
RFC's tell us about this topic.

In my opinion, the UAC in this example is badly behaved because it sent a 
different port (5062) in the Via but it also sent the 'rport' parameter. The 
latter would take precedence over the former. However, we can see that the UAC 
really wanted us to send all responses to port 5062. So it should not be 
sending 'rport' at all and also my script should not be calling force_rport().

John Quick
Smartvox Limited

-Original Message-
From: Bogdan-Andrei Iancu  
Sent: 26 June 2018 15:21
To: john.qu...@smartvox.co.uk; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Source port changing during a transaction

Hi John,

According to RFC3261, a re-INVITE or UPDATE can change only the remote contacts 
(the end point contacts), but not the Record-Route hops.

In order to properly reflect the change of the port at network level, of 
course, the SIP contact URI has to be changes (via re-INVITE or UPDATE).

You say that OpenSIPS with dialog + TH does not obey this ? (it might be true 
:D)

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 06/25/2018 08:08 PM, John Quick wrote:
> Is it permissible according to the relevant RFC's for the address 
> and/or port where responses are sent to change during a transaction?
> [I assume it must be okay within a dialogue, such as if a re-INVITE is 
> sent?].
>
> This is why I am asking:
> I have been checking through a pcap capture for a UAC device that is 
> sending INVITE requests to OpenSIPS.
> The topmost Via has the rport parameter present - this tells OpenSIPS 
> to respond to the source port of the request.
> There are some configuration issues which mean the response fails to 
> reach the UAC.
> So the UAC sends the same INVITE request again, but this time it sends 
> from a different port.
> OpenSIPS continues to send responses to the source port of the first 
> INVITE and ignores the source port of the second INVITE.
>
> UAC port 59500    INVITE --->   OpenSIPS Proxy
> UAC port 59500  <--- 100 Trying ---   OpenSIPS Proxy
> UAC port 5062  INVITE --->   OpenSIPS Proxy
> UAC port 59500  <--- 100 Trying ---   OpenSIPS Proxy
>
> The CSeq and Call-ID on both INVITE requests are identical - only the 
> source port changed. Is this why the second INVITE has no impact on 
> where the responses are sent?
> Or is there something special about the first request in a transaction 
> that fixes the destination address/port for all subsequent responses?
> The OpenSIPS Proxy in my pcap example uses topology hiding which 
> could, I suppose, be relevant. It is OpenSIPS v 1.9.
>
> Thanks.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Source port changing during a transaction

2018-06-25 Thread John Quick
Is it permissible according to the relevant RFC's for the address and/or
port where responses are sent to change during a transaction?
[I assume it must be okay within a dialogue, such as if a re-INVITE is
sent?].

This is why I am asking:
I have been checking through a pcap capture for a UAC device that is sending
INVITE requests to OpenSIPS.
The topmost Via has the rport parameter present - this tells OpenSIPS to
respond to the source port of the request.
There are some configuration issues which mean the response fails to reach
the UAC.
So the UAC sends the same INVITE request again, but this time it sends from
a different port.
OpenSIPS continues to send responses to the source port of the first INVITE
and ignores the source port of the second INVITE.

UAC port 59500    INVITE --->   OpenSIPS Proxy
UAC port 59500  <--- 100 Trying ---   OpenSIPS Proxy
UAC port 5062  INVITE --->   OpenSIPS Proxy
UAC port 59500  <--- 100 Trying ---   OpenSIPS Proxy

The CSeq and Call-ID on both INVITE requests are identical - only the source
port changed. Is this why the second INVITE has no impact on where the
responses are sent?
Or is there something special about the first request in a transaction that
fixes the destination address/port for all subsequent responses?
The OpenSIPS Proxy in my pcap example uses topology hiding which could, I
suppose, be relevant. It is OpenSIPS v 1.9.

Thanks.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using v2.4 packages for Debian

2018-05-21 Thread John Quick
Thanks for answering my question Nick.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Using v2.4 packages for Debian

2018-05-21 Thread John Quick
I was wondering if the official release at apt.opensips.org for v2.4.0 (LTS)
includes all possible modules.
For example, there does not seem to be a package for the clusterer module or
for the cachedb_ modules (I would like couchbase).
Will I have to compile from source to get these?

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] add gateway a sip trunk

2018-04-19 Thread John Quick
Hello John,

You should take a look at the REGISTRANT module. This will allow your
OpenSIPS Proxy to register with the provider.
That should allow the provider to send calls to OpenSIPS.

For calls going in the other direction (OpenSIPS to provider) there could be
a problem. It depends if your provider will accept calls based solely on
their source IP address.
If your provider demands call-by-call authentication - username and password
- then OpenSIPS may not be the best choice.
FreeSwitch would be better able to deal with authentication challenges. It
could be used in conjunction with OpenSIPS, depending on overall
requirements.

OpenSIPS  -->  FreeSwitch  -->  Provider

OpenSIPS has a module for authentication - UAC_AUTH - but I have never been
able to make it work because it messes up the CSeq index sequence.

The Dynamic Routing module is great for distributing calls to various
providers based on number prefix, gateway availability, pre-defined rules
etc. However, it assumes the remote gateways will accept INVITE requests
without challenging for username/password authentication. Authentication is
normally based on IP address alone for this type of connection.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] NAT Pings in v2.4 with Edge Proxy

2018-04-06 Thread John Quick
I now have the answer to all the issues I raised in this thread.

1. As previously mentioned, adding "seed" to the flags column for one node
in clusterer solved some issues.
2. Adding option "v" as an extra argument to the save function (in the
REGISTRAR module) has fixed the problem with the R-URI of the NAT pings.

My call to save() for recording registrations - and using the Path header -
now looks like this:
save("location","p1v")

Thanks Liviu for your help.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Using pseudo variables in xlog

2018-04-06 Thread John Quick
I've noticed this weird problem in xlog for several years/several versions
and it just happened to me again.
It could catch someone out so I thought I should report it:

xlog("L_WARN", "NAT detected in request from $si.  Call-ID=$ci\n");
...opensips will fail to start

xlog("L_WARN", "NAT detected in request from $si   Call-ID=$ci\n");
...it will start with no problem

The difference is the full stop after the $si
I think the same happens if you put a full stop after any other core pseudo
variable in the text of an xlog.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] do_routing causes invalid avp id error

2018-04-05 Thread John Quick
I'm testing with v2.4 beta. Using the DROUTING module.
When I call the function do_routing("2") it always generates the following
error:
ERROR:core:search_first_avp: invalid avp id -1

I've used this module and this function before in earlier versions of
OpenSIPS and I cannot recall seeing this error message before.

I tried various remedies such as adding/removing this line:
modparam("drouting", "ruri_avp", '$avp(dr_ruri)')

..also I have tried both of the following as a way of calling the function:
if
(do_routing("2",,,"$var(ruleattrs)","$var(gwattrs)","$var(carrattrs)")) {
if (do_routing("2")) {

but every time I see the same error reported.

By the way, the function operates as expected and selects the correct
gateway. The error message seems to be irrelevant.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] NAT Pings in v2.4 with Edge Proxy

2018-04-04 Thread John Quick
Hi Liviu,

I had no idea that it was necessary to use "seed". Where is this documented?

I've just added it to the flags column for my first node. This seems to have
fixed some of the problems:
 - NAT Pings are now only coming from one node, not from both
 - Location data is being replicated when I restart a node

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


  1   2   3   >