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 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 Bogdan-Andrei Iancu

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
mailto:bog...@opensips.org>>:

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 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-30 Thread 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 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-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


Re: [OpenSIPS-Users] dialplan out_var

2022-08-29 Thread 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 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] 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