<div id="geary-body" dir="auto"><div>Hello Razvan,</div><div>Ticket <a href="https://github.com/OpenSIPS/opensips/issues/1946">https://github.com/OpenSIPS/opensips/issues/1946</a></div><div><br></div><div>volga629.</div></div><div id="geary-quote" dir="auto"><br>On Mon, Jan 27, 2020 at 10:31, Răzvan Crainea <razvan@opensips.org> wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">Please open a ticket with this issue, as this seems to be a regression during porting to lua 5.2/5.3.
In the meantime, please continue using lua5.1.

Best regards,
Răzvan

On 1/24/20 6:32 PM, volga629 via Users wrote:
<blockquote>Hello Vlad,
In latest master  was added support for 5.2 and 5.3, wrapper  produce error.
So it can't open python scripts.


Any help thank you.

Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: encode:UTF16BE:fjhqqq
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: siplua error running function arg_function: /etc/opensips/scripts/convert.lua:15: attempt to index a nil value (global 'io')
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: DBG:core:destroy_index_avp: AVP with the specified index not found

volga629

On Sun, Jan 19, 2020 at 10:11, volga629 via Users <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>> wrote:
<blockquote>Hello Vlad,
Thank you for pointing out. I adjusted as following and it resolve the issue

if sys.argv[2] == "encode":
    print(encoding().strip())
elif sys.argv[2] == "decode":
    print(decoding().strip())
elif sys.argv[2] == "test":
    print(testing().strip())

volga629

On Tue, Jan 14, 2020 at 17:03, Vlad Patrascu <<a href="mailto:vladp@opensips.org">vladp@opensips.org</a>> wrote:
<blockquote>
You get the newline from the print() function in the python script that you call. I've tested with your script and for example this fixed it:

print(testing(),end="")

Vlad Patrascu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
On 1/14/20 3:32 PM, volga629 via Users wrote:
<blockquote>Hello Vlad,
In lua script  we use \n only in xlog.

this repository

<a href="https://github.com/VoIP-SAAS/opensips-smpp-lua">https://github.com/VoIP-SAAS/opensips-smpp-lua</a>

On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu <<a href="mailto:vladp@opensips.org">vladp@opensips.org</a>> wrote:
<blockquote>
I still don't think it is AVP_set function's fault for the whitespaces. Make sure that the string you produce in lua and want to return to opensips doesn't have a newline character at the end. It seems that syslog prints a newline as "#012" sometimes (if it's not actually at the end of a message).

Vlad Patrascu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
On 1/13/20 3:26 PM, volga629 via Users wrote:
<blockquote>Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert white spaces.

$avp(sms-out) = $(avp(formatted-msg){s.trimr});

On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu <<a href="mailto:vladp@opensips.org">vladp@opensips.org</a>> wrote:
<blockquote>
Hi Volga,

Sorry for getting to this so late. Do you still encounter this issue? I have tried to reproduce this myself but it seems that AVP_set() does set the value correctly.

Regards,

Vlad Patrascu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
On 12/14/19 7:12 AM, volga629 via Users wrote:
<blockquote>Hello Everyone,
Having some issue get lua to set proper avp.  When it set in insert some extra characters into value of avp
Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: test::wwwww nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: Tested string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: Test string ~> [0#012]

It insert #012

Lua script

                local cmd_var = handle:read("*all")
                handle:close()
                xlog("Tested string ~> " .. cmd_var .. "\n")
                r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</blockquote></blockquote>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</blockquote></blockquote>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</blockquote></blockquote></blockquote>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>

</blockquote>
<div>-- 
</div>Răzvan Crainea
OpenSIPS Core Developer
  <a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>

_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</div></blockquote></div>