[OpenSIPS-Users] problem with Qrouting

2023-03-03 Thread Антон Ершов
Hi guys,

I'm experimenting with the Qrouting module and got a strange result. it
blocks the use_next_gw function and returns $rc -1.

when calling the drouting() function in the debug log, I see:

DBG:qrouting:qr_sort_dynamic_weights: score for dst type 1, i: 0 is 1.00
DBG:qrouting:qr_sort_dynamic_weights: score for dst type 1, i: 1 is 1.00

order 1 works at this moment

when calling use_next_gw and must work order 0 i see

DBG:qrouting:qr_acc: engaging accounting for rule 0x7fb9a0061da0, cr: -1,
gw: 0
DBG:drouting:use_next_gw: new RURI set to  via
socket <10.153.5.38>

and get $rc -1

if in opensips-cli call qr_enable_dst or qr_disable_dst gw gets status -1

DBG:qrouting:qr_sort_dynamic_weights: score for dst type 1, i: 0 is
-1.00
DBG:qrouting:qr_sort_dynamic_weights: score for dst type 1, i: 1 is
-1.00

and drouting() can't get available gw

in q_profile all threshold have value -1 which indicates that the metric
should not be taken into account. but gw becomes unavailable

what am I doing wrong?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] dialplan out_var

2022-08-30 Thread Антон Ершов
Yes. exactly
I apologize for my stupidity

вт, 30 авг. 2022 г. в 17:12, Stas Kobzar :

> Hi,
> $fn is from name and name maybe quoted in the header value.
> Try to use $fU to have username part (actual number)
>
> On Tue, Aug 30, 2022 at 9:00 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Again,
>>
>> your DP rule is performing NO change over the input. The whole input, as
>> received, it provided as output. And the quotes you see in the output value
>> are part of the input value.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>   https://www.opensips.org/events/Summit-2022Athens/
>>
>> On 8/30/22 10:18 AM, Антон Ершов wrote:
>>
>> that's the point. there are no conversions, but quotes appear
>>
>> вт, 30 авг. 2022 г. в 09:26, Bogdan-Andrei Iancu :
>>
>>> Your DP rule is doing nothing, as transformation - it is matching
>>> everything and returning it as output..so not sure what are your
>>> expectations here.
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>>   https://www.opensips.org/events/Summit-2022Athens/
>>>
>>> On 8/29/22 4:59 PM, Антон Ершов wrote:
>>>
>>> maybe it is so.
>>> but where can you go wrong with this simple rule
>>>
>>> "id" "dpid" "pr" "match_op" "match_exp" "match_flags" "subst_exp"
>>> "repl_exp" "timerec" "disabled" "attrs"
>>> 1 0 0 1 ".*" 0 "^(.*)$" "\1" 0 "test"
>>>
>>> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: dpid is 0
>>> partition is default
>>> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input is
>>> "00139939484"
>>> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: checking with
>>> dpid 0
>>> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
>>> "00139939484"
>>> /usr/sbin/opensips[30317]: DBG:dialplan:translate: Regex operator
>>> testing. Got result: 0
>>> /usr/sbin/opensips[30317]: DBG:dialplan:translate: Found a matching rule
>>> 0x7f00fee33698: pr 0, match_exp .*
>>> /usr/sbin/opensips[30317]: DBG:dialplan:translate: the rule's attrs are
>>> test
>>> /usr/sbin/opensips[30317]: DBG:dialplan:translate: the copied attributes
>>> are: test
>>> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
>>> "00139939484"
>>> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[1]
>>> "00139939484"
>>> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input
>>> "00139939484" with dpid 0 => output "00139939484"
>>>
>>> пн, 29 авг. 2022 г. в 16:43, Bogdan-Andrei Iancu :
>>>
>>>> Hi,
>>>>
>>>> No quotes are added by the dialplan module at all. I think out value
>>>> inherited the quotes from the input value, the From Display Name, which may
>>>> be a quoted value.
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>
>>>> OpenSIPS Founder and Developer
>>>>   https://www.opensips-solutions.com
>>>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>>>   https://www.opensips.org/events/Summit-2022Athens/
>>>>
>>>> On 8/29/22 3:35 PM, Антон Ершов wrote:
>>>>
>>>> Hello friends!
>>>>
>>>> In version: opensips 3.2.8 (x86_64/linux)
>>>> I observe strange behavior of the dialplan module. the value returned
>>>> to the $var(out) variable is wrapped in quotes. In version 3.2.5 no such
>>>> behavior was observed. this forces you to do additional work with the
>>>> result obtained in order to use it further.
>>>>
>>>> my config
>>>> if (dp_translate(0, $fn, $var(dp_out), $var(dp_attrs))) {
>>>>   xlog("L_INFO", "$ci translated to var $var(dp_out) with
>>>> attributes: '$var(dp_attrs)'\n");
>>>>   ...
>>>> }
>>>>
>>>> show in console
>>>>
>>>> /usr/sbin/opensips[30318]: 287b5bea-26c4-11ed-abcd-016f252b0962
>>>> translated to var "12345" with attributes: 'test'
>>>>
>>>> as you can see the value is wrapped in quotes
>>>> if you try to use the value of the variable in some other place, for
>>>> example in uac_replace. quotation marks are also present
>>>>
>>>> ___
>>>> Users mailing 
>>>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>
>> ___
>> 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


Re: [OpenSIPS-Users] dialplan out_var

2022-08-30 Thread Антон Ершов
that's the point. there are no conversions, but quotes appear

вт, 30 авг. 2022 г. в 09:26, Bogdan-Andrei Iancu :

> Your DP rule is doing nothing, as transformation - it is matching
> everything and returning it as output..so not sure what are your
> expectations here.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 8/29/22 4:59 PM, Антон Ершов wrote:
>
> maybe it is so.
> but where can you go wrong with this simple rule
>
> "id" "dpid" "pr" "match_op" "match_exp" "match_flags" "subst_exp"
> "repl_exp" "timerec" "disabled" "attrs"
> 1 0 0 1 ".*" 0 "^(.*)$" "\1" 0 "test"
>
> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: dpid is 0
> partition is default
> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input is
> "00139939484"
> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: checking with dpid
> 0
> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
> "00139939484"
> /usr/sbin/opensips[30317]: DBG:dialplan:translate: Regex operator testing.
> Got result: 0
> /usr/sbin/opensips[30317]: DBG:dialplan:translate: Found a matching rule
> 0x7f00fee33698: pr 0, match_exp .*
> /usr/sbin/opensips[30317]: DBG:dialplan:translate: the rule's attrs are
> test
> /usr/sbin/opensips[30317]: DBG:dialplan:translate: the copied attributes
> are: test
> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
> "00139939484"
> /usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[1]
> "00139939484"
> /usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input
> "00139939484" with dpid 0 => output "00139939484"
>
> пн, 29 авг. 2022 г. в 16:43, Bogdan-Andrei Iancu :
>
>> Hi,
>>
>> No quotes are added by the dialplan module at all. I think out value
>> inherited the quotes from the input value, the From Display Name, which may
>> be a quoted value.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>   https://www.opensips.org/events/Summit-2022Athens/
>>
>> On 8/29/22 3:35 PM, Антон Ершов wrote:
>>
>> Hello friends!
>>
>> In version: opensips 3.2.8 (x86_64/linux)
>> I observe strange behavior of the dialplan module. the value returned to
>> the $var(out) variable is wrapped in quotes. In version 3.2.5 no such
>> behavior was observed. this forces you to do additional work with the
>> result obtained in order to use it further.
>>
>> my config
>> if (dp_translate(0, $fn, $var(dp_out), $var(dp_attrs))) {
>>   xlog("L_INFO", "$ci translated to var $var(dp_out) with attributes:
>> '$var(dp_attrs)'\n");
>>   ...
>> }
>>
>> show in console
>>
>> /usr/sbin/opensips[30318]: 287b5bea-26c4-11ed-abcd-016f252b0962
>> translated to var "12345" with attributes: 'test'
>>
>> as you can see the value is wrapped in quotes
>> if you try to use the value of the variable in some other place, for
>> example in uac_replace. quotation marks are also present
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] dialplan out_var

2022-08-29 Thread Антон Ершов
maybe it is so.
but where can you go wrong with this simple rule

"id" "dpid" "pr" "match_op" "match_exp" "match_flags" "subst_exp"
"repl_exp" "timerec" "disabled" "attrs"
1 0 0 1 ".*" 0 "^(.*)$" "\1" 0 "test"

/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: dpid is 0 partition
is default
/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input is
"00139939484"
/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: checking with dpid 0
/usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
"00139939484"
/usr/sbin/opensips[30317]: DBG:dialplan:translate: Regex operator testing.
Got result: 0
/usr/sbin/opensips[30317]: DBG:dialplan:translate: Found a matching rule
0x7f00fee33698: pr 0, match_exp .*
/usr/sbin/opensips[30317]: DBG:dialplan:translate: the rule's attrs are test
/usr/sbin/opensips[30317]: DBG:dialplan:translate: the copied attributes
are: test
/usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[0]
"00139939484"
/usr/sbin/opensips[30317]: DBG:dialplan:test_match: test_match:[1]
"00139939484"
/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input "00139939484"
with dpid 0 => output "00139939484"

пн, 29 авг. 2022 г. в 16:43, Bogdan-Andrei Iancu :

> Hi,
>
> No quotes are added by the dialplan module at all. I think out value
> inherited the quotes from the input value, the From Display Name, which may
> be a quoted value.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 8/29/22 3:35 PM, Антон Ершов wrote:
>
> Hello friends!
>
> In version: opensips 3.2.8 (x86_64/linux)
> I observe strange behavior of the dialplan module. the value returned to
> the $var(out) variable is wrapped in quotes. In version 3.2.5 no such
> behavior was observed. this forces you to do additional work with the
> result obtained in order to use it further.
>
> my config
> if (dp_translate(0, $fn, $var(dp_out), $var(dp_attrs))) {
>   xlog("L_INFO", "$ci translated to var $var(dp_out) with attributes:
> '$var(dp_attrs)'\n");
>   ...
> }
>
> show in console
>
> /usr/sbin/opensips[30318]: 287b5bea-26c4-11ed-abcd-016f252b0962 translated
> to var "12345" with attributes: 'test'
>
> as you can see the value is wrapped in quotes
> if you try to use the value of the variable in some other place, for
> example in uac_replace. quotation marks are also present
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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] dialplan out_var

2022-08-29 Thread Антон Ершов
Hello friends!

In version: opensips 3.2.8 (x86_64/linux)
I observe strange behavior of the dialplan module. the value returned to
the $var(out) variable is wrapped in quotes. In version 3.2.5 no such
behavior was observed. this forces you to do additional work with the
result obtained in order to use it further.

my config
if (dp_translate(0, $fn, $var(dp_out), $var(dp_attrs))) {
  xlog("L_INFO", "$ci translated to var $var(dp_out) with attributes:
'$var(dp_attrs)'\n");
  ...
}

show in console

/usr/sbin/opensips[30318]: 287b5bea-26c4-11ed-abcd-016f252b0962 translated
to var "12345" with attributes: 'test'

as you can see the value is wrapped in quotes
if you try to use the value of the variable in some other place, for
example in uac_replace. quotation marks are also present
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [BLOG] Call control using DTMF codes in OpenSIPS 3.1 LTS

2020-03-12 Thread Антон Ершов
this is great news

чт, 12 мар. 2020 г. в 15:50, Răzvan Crainea :

> Hi, everyone!
>
> I've just published a blog post[1] that describes how you can intercept
> DTMF codes in OpenSIPS 3.1, and what kind of services you can implement
> using this feature.
>
> [1]
>
> https://blog.opensips.org/2020/03/12/call-control-using-dtmf-in-opensips-3-1-lts/
>
> Happy reading!
> --
> Răzvan Crainea
> OpenSIPS Core Developer
>http://www.opensips-solutions.com
>
> ___
> 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


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
change_reply_status works. I managed to change the code. e.g. 200 to 201
it turned out to change Reason. but two spaces still remain.
func_replace will check the whole message every time. How will this affect
productivity?
and whether it will check the status-line?

пт, 14 февр. 2020 г. в 20:11, Ben Newlin :

> I couldn’t find it in the documentation, but I am pretty sure that
> change_reply_status will not work on a 2xx response as a proxy cannot
> change those types of responses. You would have to be using B2BUA to do
> that.
>
>
>
> I think your best bet would be to try one of the functions in the textops
> module [1], possibly replace() [2].
>
>
>
> [1] - https://opensips.org/docs/modules/2.4.x/textops.html
>
> [2] - https://opensips.org/docs/modules/2.4.x/textops.html#func_replace
>
>
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of Антон Ершов
> 
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Friday, February 14, 2020 at 12:01 PM
> *To: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] rewrite status-line
>
>
>
> I understand correctly that on my side I can not fix this problem?
>
>
>
> пт, 14 февр. 2020 г. в 17:17, Антон Ершов :
>
> They can not
>
>
>
> пт, 14 февр. 2020 г., 17:10 johan :
>
> To me 200 OK is perfectly valid.   The operator should fix this at his
> side.
>
> On 14.02.20 15:01, Антон Ершов wrote:
>
> Hello friends!
>
> we have final equipment that does not meet 200OK correctly. it adds an
> extra space between 200 and OK. from the point of view of rfc is not very
> scary. but there is an operator that cannot handle the given 200OK. I tried
> to fix it with change_reply_status in module sipmsgops.
>
> but it rewrites the status-line with the same extra space.
>
> Is this a bug?
>
>
>
> ___
>
> 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
>
> ___
> 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


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
I understand correctly that on my side I can not fix this problem?

пт, 14 февр. 2020 г. в 17:17, Антон Ершов :

> They can not
>
> пт, 14 февр. 2020 г., 17:10 johan :
>
>> To me 200 OK is perfectly valid.   The operator should fix this at his
>> side.
>> On 14.02.20 15:01, Антон Ершов wrote:
>>
>> Hello friends!
>> we have final equipment that does not meet 200OK correctly. it adds an
>> extra space between 200 and OK. from the point of view of rfc is not very
>> scary. but there is an operator that cannot handle the given 200OK. I tried
>> to fix it with change_reply_status in module sipmsgops.
>> but it rewrites the status-line with the same extra space.
>> Is this a bug?
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> ___
>> 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


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
They can not

пт, 14 февр. 2020 г., 17:10 johan :

> To me 200 OK is perfectly valid.   The operator should fix this at his
> side.
> On 14.02.20 15:01, Антон Ершов wrote:
>
> Hello friends!
> we have final equipment that does not meet 200OK correctly. it adds an
> extra space between 200 and OK. from the point of view of rfc is not very
> scary. but there is an operator that cannot handle the given 200OK. I tried
> to fix it with change_reply_status in module sipmsgops.
> but it rewrites the status-line with the same extra space.
> Is this a bug?
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> 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] rewrite status-line

2020-02-14 Thread Антон Ершов
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an
extra space between 200 and OK. from the point of view of rfc is not very
scary. but there is an operator that cannot handle the given 200OK. I tried
to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space.
Is this a bug?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] uac_replace_from/to

2020-02-04 Thread Антон Ершов
omg! of course. thx!

вт, 4 февр. 2020 г. в 18:54, Bogdan-Andrei Iancu :

> Hi Anton,
>
> by default, the module does auto restore of the FROM/TO hdr. The restoring
> is done in the traffic flowing in the opposite direction than the initial
> request. So, the uac_restore_xx() is NOT an uac_undo_xx() !
>
> As I understand, you do serial forking and for you want to do different,
> or not to do, uac_replaces for each branch. If this is the case, you need
> to do the uac_replace_xx() in the branch_route - by doing this, the change
> will impact only that branch, without any effect on the other branches.
>
>
> branch_route[change_from]
> {
> if ($avp(furi)!=NULL)
> uac_replace_from("$avp(furi)");
> }
>
> route {
> $avp(furi) = "...";
> t_on_branch("change_from");
> t_on_failure("missed_call");
> }
>
>
> failure_route[missed_call]
> {
> $ru = "..";
>
> $avp(furi) = "..."; # if you want a different FROM URI
> $avp(furi) = NULL; # if you want to keep the original URI
>
> 
> }
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit, Amsterdam, May 2020
>   https://www.opensips.org/events/Summit-2020Amsterdam/
> OpenSIPS Bootcamp, Miami, March 2020
>   https://opensips.org/training/OpenSIPS_Bootcamp_2020/
>
> On 2/4/20 3:39 PM, Антон Ершов wrote:
>
> Hello friends
> Help me to understand. In request_route i make replace from and to
> fields.
> After an unsuccessful attempt to invite, I try to direct the call to
> another place and again I need to replace the from and to fields. But
> instead of replacing, new values are simply added
>
> route {
> ...
> route(rewrite_header);
> ...
> }
> failure_route[missed_call] {
> setflag(need_uac_restore);
> ...
> route(rewrite_header);
> }
> route[rewrite_header] {
> if (isflagset(need_uac_restore)) {
> xlog("L_INFO", "[ $ci ] - restore from and to fields\n");
> uac_restore_from();
> uac_restore_to();
> }
>  uac_replace_from("","sip:$avp(fromuser)@$avp(fromdomain)");
>  uac_replace_to("","sip:$avp(touser)@$avp(todomain)");
> }
>
> in the end I get such fields
>
> From:  
> ;tag=fe654d87-7565-408f-9925-98a5bac99e1c
> To: 
>
> it simply appends the new value to the old and does not replace it
> changing replace modes in uac module does not change behavior
> in debug log i see this
>
> DBG:uac:replace_uri: uri to replace [],
> replacement is []
> DBG:dialog:new_dlg_val: inserting <739823>=<>
> DBG:dialog:store_dlg_value_unsafe: var found-> < >>!
> DBG:uac:replace_uri: uri to replace [],
> replacement is []
> DBG:dialog:new_dlg_val: inserting <739824>=<>
> DBG:dialog:store_dlg_value_unsafe: var found-> < >>!
>
> 10.23.100.40 - call initiator
> 10.10.10.10 - where should the call go first
> 10.100.100.100 - opensips
> sipofon.loc - where should the call go after failure_route has worked
>
>
>
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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] uac_replace_from/to

2020-02-04 Thread Антон Ершов
Hello friends
Help me to understand. In request_route i make replace from and to fields.
After an unsuccessful attempt to invite, I try to direct the call to
another place and again I need to replace the from and to fields. But
instead of replacing, new values are simply added

route {
...
route(rewrite_header);
...
}
failure_route[missed_call] {
setflag(need_uac_restore);
...
route(rewrite_header);
}
route[rewrite_header] {
if (isflagset(need_uac_restore)) {
xlog("L_INFO", "[ $ci ] - restore from and to fields\n");
uac_restore_from();
uac_restore_to();
}
 uac_replace_from("","sip:$avp(fromuser)@$avp(fromdomain)");
 uac_replace_to("","sip:$avp(touser)@$avp(todomain)");
}

in the end I get such fields

From:  ;tag=fe654d87-7565-408f-9925-98a5bac99e1c
To: 

it simply appends the new value to the old and does not replace it
changing replace modes in uac module does not change behavior
in debug log i see this

DBG:uac:replace_uri: uri to replace [],
replacement is []
DBG:dialog:new_dlg_val: inserting <739823>=<>
DBG:dialog:store_dlg_value_unsafe: var found-> <>!
DBG:uac:replace_uri: uri to replace [],
replacement is []
DBG:dialog:new_dlg_val: inserting <739824>=<>
DBG:dialog:store_dlg_value_unsafe: var found-> <>!

10.23.100.40 - call initiator
10.10.10.10 - where should the call go first
10.100.100.100 - opensips
sipofon.loc - where should the call go after failure_route has worked
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] yum repo is down

2020-01-11 Thread Антон Ершов
hi,
yum repo is down. again
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] update from repo fails

2020-01-11 Thread Антон Ершов
it looks like the repository is completely dead))
http://yum.opensips.org/3.0/nightly/el/7/x86_64/repodata/repomd.xml: [Errno
14] curl#7 - "Failed connect to yum.opensips.org:80


пт, 10 янв. 2020 г. в 19:10, Антон Ершов :

> Thanks!
>
> пт, 10 янв. 2020 г., 19:07 Nick Altmann :
>
>> Must be fixed for now.
>>
>> чт, 9 янв. 2020 г. в 12:13, Nick Altmann :
>>
>>> Hi,
>>>
>>> Thanks for reporting. I'll take a look at this today later.
>>>
>>> чт, 9 янв. 2020 г. в 11:35, Антон Ершов :
>>>
>>>> Hi,
>>>> when I try to upgrade from a repository with nightly builds I get this
>>>> error
>>>> rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by
>>>> opensips-yum-nightly-3.0-5.el7.noarch
>>>>
>>>> found on the network that you need to rebuild a package that supports
>>>> this dependency.
>>>> How can you solve this problem yourself?
>>>> ___
>>>> 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
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] update from repo fails

2020-01-10 Thread Антон Ершов
Thanks!

пт, 10 янв. 2020 г., 19:07 Nick Altmann :

> Must be fixed for now.
>
> чт, 9 янв. 2020 г. в 12:13, Nick Altmann :
>
>> Hi,
>>
>> Thanks for reporting. I'll take a look at this today later.
>>
>> чт, 9 янв. 2020 г. в 11:35, Антон Ершов :
>>
>>> Hi,
>>> when I try to upgrade from a repository with nightly builds I get this
>>> error
>>> rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by
>>> opensips-yum-nightly-3.0-5.el7.noarch
>>>
>>> found on the network that you need to rebuild a package that supports
>>> this dependency.
>>> How can you solve this problem yourself?
>>> ___
>>> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] update from repo fails

2020-01-09 Thread Антон Ершов
Hi,
when I try to upgrade from a repository with nightly builds I get this error
rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by
opensips-yum-nightly-3.0-5.el7.noarch

found on the network that you need to rebuild a package that supports this
dependency.
How can you solve this problem yourself?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] segfault drouting.so

2020-01-04 Thread Антон Ершов
Hello! everything is fine. fix works

сб, 4 янв. 2020 г. в 17:13, Bogdan-Andrei Iancu :

> Hi Anton,
>
> You reported the crash also via GITHUB ->
> https://github.com/OpenSIPS/opensips/issues/1927
>
> I found and fix the crash, so, if you could confirm it, it will be great.
>
> Thanks and regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Bootcamp Pre-Registration
>   https://opensips.org/training/OpenSIPS_Bootcamp/
>
> On 12/26/19 10:38 AM, Антон Ершов wrote:
>
> Hi,
> I try to configure the drouting module but got an error.
> segfault at 140 ip 7fb2ee459051 sp 7fff321f0190 error 4 in
> drouting.so[7fb2ee43c000+39000]
>
> opensips -V
> version: opensips 3.0.1 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> git revision: 073131cc1
> main.c compiled on 02:46:25 Dec 24 2019 with gcc 4.8.5
>
> gdb /usr/sbin/opensips core.31574
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/sbin/opensips...Reading symbols from
> /usr/sbin/opensips...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> [New LWP 31574]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Core was generated by `/usr/sbin/opensips -DDdd -f
> /etc/opensips/opensips.cfg.j2 -p python3.6 /etc/ope'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x7f01ad156051 in do_routing () from
> /usr/lib64/opensips/modules/drouting.so
> Missing separate debuginfos, use: debuginfo-install
> opensips-3.0.1.20191223.073131cc1-1.el7.x86_64
> (gdb) bt full
> #0  0x7f01ad156051 in do_routing () from
> /usr/lib64/opensips/modules/drouting.so
> No symbol table info available.
> #1  0x0042f57c in do_action ()
> No symbol table info available.
> #2  0x00434ad0 in run_action_list ()
> No symbol table info available.
> #3  0x00466a27 in eval_expr ()
> No symbol table info available.
> #4  0x004667a5 in eval_expr ()
> No symbol table info available.
> #5  0x0042f3ea in do_action ()
> No symbol table info available.
> #6  0x00434ad0 in run_action_list ()
> No symbol table info available.
> #7  0x00434bc6 in run_actions ()
> No symbol table info available.
> #8  0x00431c28 in do_action ()
> No symbol table info available.
> #9  0x00434ad0 in run_action_list ()
> No symbol table info available.
> #10 0x00432896 in do_action ()
> No symbol table info available.
> #11 0x00434ad0 in run_action_list ()
> No symbol table info available.
> #12 0x00434db8 in run_top_route ()
> No symbol table info available.
> #13 0x0043aa84 in receive_msg ()
> No symbol table info available.
> #14 0x0056c5b0 in udp_read_req ()
> No symbol table info available.
> #15 0x00551caa in io_wait_loop_epoll.constprop.6 ()
> No symbol table info available.
> #16 0x00554959 in udp_start_processes ()
> No symbol table info available.
> #17 0x0041e9ef in main ()
> No symbol table info available.
>
> in opensips-cli dr_number_routing return result. In config get segfault
>
> (opensips-cli): mi dr_number_routing partition_name=office group_id=25
> number=2345
> {
> "Matched Prefix": "234",
> "CARRIER": "dr25",
> "ATTRS": "D25"
> }
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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] segfault drouting.so

2019-12-26 Thread Антон Ершов
Hi,
I try to configure the drouting module but got an error.
segfault at 140 ip 7fb2ee459051 sp 7fff321f0190 error 4 in
drouting.so[7fb2ee43c000+39000]

opensips -V
version: opensips 3.0.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 073131cc1
main.c compiled on 02:46:25 Dec 24 2019 with gcc 4.8.5

gdb /usr/sbin/opensips core.31574
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/sbin/opensips...Reading symbols from
/usr/sbin/opensips...(no debugging symbols found)...done.
(no debugging symbols found)...done.
[New LWP 31574]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/opensips -DDdd -f
/etc/opensips/opensips.cfg.j2 -p python3.6 /etc/ope'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f01ad156051 in do_routing () from
/usr/lib64/opensips/modules/drouting.so
Missing separate debuginfos, use: debuginfo-install
opensips-3.0.1.20191223.073131cc1-1.el7.x86_64
(gdb) bt full
#0  0x7f01ad156051 in do_routing () from
/usr/lib64/opensips/modules/drouting.so
No symbol table info available.
#1  0x0042f57c in do_action ()
No symbol table info available.
#2  0x00434ad0 in run_action_list ()
No symbol table info available.
#3  0x00466a27 in eval_expr ()
No symbol table info available.
#4  0x004667a5 in eval_expr ()
No symbol table info available.
#5  0x0042f3ea in do_action ()
No symbol table info available.
#6  0x00434ad0 in run_action_list ()
No symbol table info available.
#7  0x00434bc6 in run_actions ()
No symbol table info available.
#8  0x00431c28 in do_action ()
No symbol table info available.
#9  0x00434ad0 in run_action_list ()
No symbol table info available.
#10 0x00432896 in do_action ()
No symbol table info available.
#11 0x00434ad0 in run_action_list ()
No symbol table info available.
#12 0x00434db8 in run_top_route ()
No symbol table info available.
#13 0x0043aa84 in receive_msg ()
No symbol table info available.
#14 0x0056c5b0 in udp_read_req ()
No symbol table info available.
#15 0x00551caa in io_wait_loop_epoll.constprop.6 ()
No symbol table info available.
#16 0x00554959 in udp_start_processes ()
No symbol table info available.
#17 0x0041e9ef in main ()
No symbol table info available.

in opensips-cli dr_number_routing return result. In config get segfault

(opensips-cli): mi dr_number_routing partition_name=office group_id=25
number=2345
{
"Matched Prefix": "234",
"CARRIER": "dr25",
"ATTRS": "D25"
}
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] segfault in dialog.so

2019-11-07 Thread Антон Ершов
Hello friends,
I already wrote about this problem and there was no answer.
http://lists.opensips.org/pipermail/users/2019-October/041771.html
I still want to process call profiles in event_route, but opensips falls
into error at the same time.

opensips -V
version: opensips 3.0.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 3d2bd5318
main.c compiled on 02:53:35 Nov  7 2019 with gcc 4.8.5

my event_route

event_route[E_DLG_STATE_CHANGED] {
xlog("L_INFO", "[$param(callid)] - new state dialog changed
$param(new_state) old state $param(old_state) \n");

cache_raw_query("redis:group3", "HGET callid
$param(callid)","$avp(reknum)");
if ($avp(reknum) != NULL) {
xlog("L_INFO", "[$param(callid)] - get reknum $avp(reknum) \n");

if ( get_dialogs_by_profile("reknumber", $avp(reknum), $avp(dlg_jsons),
$avp(callcount)) ) {
   xlog("L_INFO", "[$param(callid)] - advertising number  $avp(reknum) has
$avp(callcount) other calls \n");
} else {
   xlog("L_INFO", "[$param(callid)] - this profile does not have active
dialogs \n");
   $avp(callcount) = 0;
}

switch($param(new_state)) {
   case 4:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount $avp(reknum)
$avp(callcount) \n");
if ($avp(reknum) != "" && $avp(callcount) != "") {
   cache_raw_query("redis:group3","HSET callcount $avp(reknum)
$avp(callcount)");
   cache_raw_query("redis:group3","EXPIRE callconut 360");
   xlog("L_INFO", "[$param(callid)] - call established. Now on number
$avp(reknum) $avp(callcount) calls \n");
}
break;
   case 5:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount $avp(reknum)
$avp(callcount) \n");
if ($avp(reknum) != "" && $avp(callcount) != "") {
   cache_raw_query("redis:group3","HSET callcount $avp(reknum)
$avp(callcount)");
   cache_raw_query("redis:group3","EXPIRE callcount 360");
   xlog("L_INFO", "[$param(callid)] - call end. Now on number $avp(reknum)
$avp(callcount) calls \n");
   cache_raw_query("redis:group3","HDEL callid $param(callid)");
}
break;
}
} else {
xlog("L_INFO", "[$param(callid)] - reknum vareable is NULL");
exit;
}
}

when we try to get a profile of an already dead dialog opensips falls.
please tell me is it possible to implement what I want or is it worth
looking for another solution?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips 3.0.1 segfault

2019-10-04 Thread Антон Ершов
Hi,
I discovered this situation. my config may not be very correct, but when it
is executed, the opensips falls into segfault.

event_route[E_DLG_STATE_CHANGED] {
...

if ( get_dialogs_by_profile("reknumber", $avp(reknum),
$avp(dlg_jsons), $avp(callcount)) ) {   xlog("L_INFO", "[$param(callid)]
- advertising number  $avp(reknum) has $avp(callcount) other calls
\n");} else {   xlog("L_INFO", "[$param(callid)] - this profile does
not have active dialogs \n");   $avp(callcount) = 0;}

...

}

when I try to get a dialog profile which is not I get this error

ERROR:core:do_action: Failed to get fixups for command 

and after some time opensips falls in segfault

gdb /usr/sbin/opensips core.30467
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/sbin/opensips...Reading symbols from
/usr/sbin/opensips...(no debugging symbols found)...done.
(no debugging symbols found)...done.
[New LWP 30467]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/opensips -DDdd -f
/etc/opensips/opensips.cfg.j2 -p python3.6 /etc/ope'.
Program terminated with signal 11, Segmentation fault.
#0  0x7faed2906d54 in dlg_get_json_out () from
/usr/lib64/opensips/modules/dialog.so
Missing separate debuginfos, use: debuginfo-install
opensips-3.0.1.20191002.b04ffc28d-1.el7.x86_64
(gdb) bt full
#0  0x7faed2906d54 in dlg_get_json_out () from
/usr/lib64/opensips/modules/dialog.so
No symbol table info available.
#1  0x7faed29073df in w_get_dlg_jsons_by_profile () from
/usr/lib64/opensips/modules/dialog.so
No symbol table info available.
#2  0x0042f3bc in do_action ()
No symbol table info available.
#3  0x00434910 in run_action_list ()
No symbol table info available.
#4  0x00465b77 in eval_expr ()
No symbol table info available.
#5  0x004658f5 in eval_expr ()
No symbol table info available.
#6  0x0042f22a in do_action ()
No symbol table info available.
#7  0x00434910 in run_action_list ()
No symbol table info available.
#8  0x00434bf8 in run_top_route ()
No symbol table info available.
#9  0x7faecf1d2e89 in route_run () from
/usr/lib64/opensips/modules/event_route.so
No symbol table info available.
#10 0x7faecf1d2ee0 in route_received () from
/usr/lib64/opensips/modules/event_route.so
No symbol table info available.
#11 0x0045a66b in ipc_handle_job ()
No symbol table info available.
#12 0x0055aad0 in handle_io ()
No symbol table info available.
#13 0x0055c9ff in tcp_worker_proc_loop ()
No symbol table info available.
#14 0x00566f6d in tcp_start_processes ()
No symbol table info available.
#15 0x0041e9f4 in main ()
No symbol table info available.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips 3.0.1 $dlg_val to event_route

2019-10-02 Thread Антон Ершов
good afternoon
tell me in version opensips 3.0.1 you can pass $dlg_val to event_route as
it was possible in version opensips 2.4
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event_route doesn't catch events

2019-10-02 Thread Антон Ершов
sorry really my mistake

ср, 2 окт. 2019 г. в 11:26, Răzvan Crainea :

> Are you sure you are calling `match_dialog()` for the sequential
> requests? Also, are you loading the `event_route` module in your script?
>
> Best regards,
> Răzvan
>
> On 10/2/19 10:20 AM, Антон Ершов wrote:
> > Hello,
> > I want to catch dialog changes in event_route, but nothing happens
> > here is an example config
> >
> > event_route[E_DLG_STATE_CHANGED] {
> >xlog("L_INFO", "NEW CALL DIALOG STATE $param(new_state)");
> >$avp(attrs) = "Call-Id";
> >$avp(vals) = $ci;
> >$avp(attrs) = "State";
> >$avp(vals) = $param(new_state);
> >if (!raise_event("E_SIP_DIALOG", $avp(attrs), $avp(vals)))
> >  xlog("L_ERR", "cannot raise E_SIP_DIALOG event\n");
> >exit;
> > }
> >
> > when calling in the logs there are no messages from event_route
> >
> > # opensips -V
> > version: opensips 3.0.1 (x86_64/linux)
> > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> > MAX_URI_SIZE 1024, BUF_SIZE 65535
> > poll method support: poll, epoll, sigio_rt, select.
> > git revision: dac56fa49
> > main.c compiled on 05:45:10 Oct  2 2019 with gcc 4.8.5
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> --
> Răzvan Crainea
> OpenSIPS Core Developer
>http://www.opensips-solutions.com
>
> ___
> 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] event_route doesn't catch events

2019-10-02 Thread Антон Ершов
Hello,
I want to catch dialog changes in event_route, but nothing happens
here is an example config

event_route[E_DLG_STATE_CHANGED] {
  xlog("L_INFO", "NEW CALL DIALOG STATE $param(new_state)");
  $avp(attrs) = "Call-Id";
  $avp(vals) = $ci;
  $avp(attrs) = "State";
  $avp(vals) = $param(new_state);
  if (!raise_event("E_SIP_DIALOG", $avp(attrs), $avp(vals)))
xlog("L_ERR", "cannot raise E_SIP_DIALOG event\n");
  exit;
}

when calling in the logs there are no messages from event_route

# opensips -V
version: opensips 3.0.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: dac56fa49
main.c compiled on 05:45:10 Oct  2 2019 with gcc 4.8.5
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event_route DLG_state ERROR

2019-09-23 Thread Антон Ершов
(gdb) bt full
#0  0x7fba00aa455b in register_dlgcb () from
/usr/lib64/opensips/modules/dialog.so
No symbol table info available.
#1  0x7fba04faf1a8 in mod_init () from
/usr/lib64/opensips/modules/acc.so
No symbol table info available.
#2  0x004b0c06 in init_mod ()
No symbol table info available.
#3  0x004b0c8b in init_mod ()
No symbol table info available.
#4  0x004b0c8b in init_mod ()
No symbol table info available.
#5  0x004b0c8b in init_mod ()
No symbol table info available.
#6  0x004b0c8b in init_mod ()
No symbol table info available.
#7  0x004b0c8b in init_mod ()
No symbol table info available.
#8  0x004b0c8b in init_mod ()
No symbol table info available.
#9  0x004b0c8b in init_mod ()
No symbol table info available.
#10 0x004b0c8b in init_mod ()
No symbol table info available.
#11 0x004b0c8b in init_mod ()
No symbol table info available.
#12 0x004b0c8b in init_mod ()
No symbol table info available.
#13 0x004b0c8b in init_mod ()
No symbol table info available.
#14 0x004b0c8b in init_mod ()
No symbol table info available.
#15 0x004b0c8b in init_mod ()
No symbol table info available.
#16 0x004b0c8b in init_mod ()
No symbol table info available.
#17 0x004b0c8b in init_mod ()
No symbol table info available.
#18 0x004b0c8b in init_mod ()
No symbol table info available.
#19 0x004b0c8b in init_mod ()
No symbol table info available.
#20 0x004b0c8b in init_mod ()
No symbol table info available.
#21 0x004b0c8b in init_mod ()
No symbol table info available.
#22 0x004b30bc in init_modules ()
No symbol table info available.
#23 0x0041e3c7 in main ()
No symbol table info available.

пн, 23 сент. 2019 г. в 21:35, Johan De Clercq :

> Post the backtrace place
>
> Outlook voor iOS <https://aka.ms/o0ukef> downloaden
>
> --
> *Van:* Users  namens Антон Ершов <
> suhari...@gmail.com>
> *Verzonden:* maandag, september 23, 2019 8:29 PM
> *Aan:* OpenSIPS users mailling list
> *Onderwerp:* [OpenSIPS-Users] event_route DLG_state ERROR
>
> Hello friends!
> I try to catch dialog state changes in event_route and get an error.
> opensips version 3.0.0.20190922.571112e37-1.el7
>
> conf.
>
> event_route[E_DLG_STATE_CHANGED] {
> switch($param(new_state)){
> case 4:
> xlog("L_INFO", "[$ci] - dialog Esteblished \n");
> break;
>
> case 5:
> xlog("L_INFO", "[$ci] - dialog end \n");
> break;
> }
> }
>
> at startup opensips get this error
>
> kernel: opensips[12853]: segfault at 0 ip 7f07b7fba55b sp
> 7ffce9a66d80 error 4 in dialog.so[7f07b7fa1000+76000]
>
> this is my configuration error or bug?
>
>
> ___
> 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] event_route DLG_state ERROR

2019-09-23 Thread Антон Ершов
Hello friends!
I try to catch dialog state changes in event_route and get an error.
opensips version 3.0.0.20190922.571112e37-1.el7

conf.

event_route[E_DLG_STATE_CHANGED] {
switch($param(new_state)){
case 4:
xlog("L_INFO", "[$ci] - dialog Esteblished \n");
break;

case 5:
xlog("L_INFO", "[$ci] - dialog end \n");
break;
}
}

at startup opensips get this error

kernel: opensips[12853]: segfault at 0 ip 7f07b7fba55b sp
7ffce9a66d80 error 4 in dialog.so[7f07b7fa1000+76000]

this is my configuration error or bug?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
opensips-cli -x mi lb_list
{
"Destinations": [
{
"uri": "sip:10.7.0.201:5070",
"id": 1,
"group": 1,
"enabled": "yes",
"auto-reenable": "on"
}
],
"Resources": [
{
"name": "PSTN",
"max": 1,
"load": 0
}
]
}

but when i do call lb return retcode *-3 (false)* - no destinations
available (the requested resources did not match any active destination)

вт, 28 мая 2019 г. в 11:02, Антон Ершов :

> node 1
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
> modparam ("load_balancer", "probing_verbose", 1)
>
> node2
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
> modparam ("load_balancer", "probing_verbose", 1)
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
>
> options send both node. only one node receives answer. In log i see what
> one node disable destination, second node re-enable destination.
>
> log node1
> INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  10.7.0.201:5070> after 408 reply on probe
>
> log node 2
> INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1
>  after 200 reply on probe
>
> вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
> users@lists.opensips.org>:
>
>> Hello Anton,
>>
>> you'd better show here the load_balancer part of your config,
>> as it has some parameters regarding to working in the cluster.
>>
>>
>> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов <
>> suhari...@gmail.com>:
>>
>> Hello friends!
>>
>>  I'm testing new features of opensips 3. And I discovered the following 
>> situation.
>>
>> Configured cluster module in Anycast Сonfiguration. Load balanser module
>>
>> has cluster_sharing_tag. The lb module sends "options" to the host from the 
>> common address, but the answer goes to the nearest opensips node of the 
>> cluster. From what the remote host in lb is considered inaccessible.
>>
>> Something is not configured or I did not understand correctly how the load 
>> balanser should work in a cluster
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ---
>> BR, Alexey
>> http://alexeyka.zantsev.com/
>> ___
>> 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


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
node 1
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
modparam ("load_balancer", "probing_verbose", 1)

node2
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
modparam ("load_balancer", "probing_verbose", 1)
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")

options send both node. only one node receives answer. In log i see what
one node disable destination, second node re-enable destination.

log node1
INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  after 408 reply on probe

log node 2
INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1  after 200 reply on probe

вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
users@lists.opensips.org>:

> Hello Anton,
>
> you'd better show here the load_balancer part of your config,
> as it has some parameters regarding to working in the cluster.
>
>
> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов  >:
>
> Hello friends!
>
>  I'm testing new features of opensips 3. And I discovered the following 
> situation.
>
> Configured cluster module in Anycast Сonfiguration. Load balanser module
>
> has cluster_sharing_tag. The lb module sends "options" to the host from the 
> common address, but the answer goes to the nearest opensips node of the 
> cluster. From what the remote host in lb is considered inaccessible.
>
> Something is not configured or I did not understand correctly how the load 
> balanser should work in a cluster
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ---
> BR, Alexey
> http://alexeyka.zantsev.com/
> ___
> 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] Load Balancer cluster Opensips 3.0

2019-05-27 Thread Антон Ершов
Hello friends!

 I'm testing new features of opensips 3. And I discovered the
following situation.

Configured cluster module in Anycast Сonfiguration. Load balanser module

has cluster_sharing_tag. The lb module sends "options" to the host
from the common address, but the answer goes to the nearest opensips
node of the cluster. From what the remote host in lb is considered
inaccessible.

Something is not configured or I did not understand correctly how the
load balanser should work in a cluster
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] call_center module issues

2019-04-25 Thread Антон Ершов
hi, did you manage to launch the call center module?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users