Re: [OpenSIPS-Users] Call Center Module failed to load

2020-01-14 Thread Sharad Kumar via Users

Thanks Razvan, I will do it and will let you know.


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


Re: [OpenSIPS-Users] Call Center Module failed to load

2020-01-14 Thread Răzvan Crainea

Hi, Sharad!

The problem is that the cc_flows table is empty - you need to populate 
that table with valid data.


Best regards,
Răzvan

On 1/11/20 3:32 AM, Sharad Kumar via Users wrote:

Hey guys,

I am trying to load call_center module on openSIPS 2.4  but getting a 
lot of erros. Here is my configuration -

# B2B Module
loadmodule "b2b_entities.so"
loadmodule "b2b_logic.so"
modparam("b2b_logic", "script_scenario", 
"/usr/local/etc/opensips/scenario_callcenter.xml")


# Call center module
loadmodule "call_center.so"
modparam("call_center", 
"db_url","mysql://opensipsuser:password@localhost/opensips") # CUSTOMIZE ME
#modparam("call_center", 
"acc_db_url","mysql://password@localhost/opensips") # CUSTOMIZE ME
#modparam("b2b_logic", "script_scenario", 
"/usr/local/etc/opensips/scenario_callcenter.xml")

modparam("call_center", "b2b_scenario", "call center")
modparam("call_center", "wrapup_time", 3)

--


I have tried all combinations but still no luck, I also have 
db_default_url variable defined. And these are the error logs -


Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: 
INFO:dialplan:mod_init: initializing module...
Jan 10 19:29:31 98 mysqld[1393]: 2020-01-10 19:29:31 28 [Warning] 
Aborted connection 28 to db: 'opensips' user: 'opensipsuser' host: 
'localhost' (Got an error reading communication packets)
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: 
INFO:call_center:mod_init: Call Center module - initializing
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: 
WARNING:call_center:cc_load_db_data: table "cc_flows" empty
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: 
CRITICAL:call_center:mod_init: failed to load callcenter data

Jan 10 19:29:31 98 opensips[1599]:  already running.
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: ERROR:core:init_mod: 
failed to initialize module call_center

Jan 10 19:29:31 98 systemd[1]: Started LSB: Start the OpenSIPS SIP server.
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: ERROR:core:main: 
error while initializing modules
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: INFO:core:cleanup: 
cleanup
Jan 10 19:29:31 98 /usr/local/sbin/opensips[1617]: NOTICE:core:main: 
Exiting
Jan 10 19:29:31 98 opensips: INFO:core:daemonize: pre-daemon process 
exiting with -1


I am thinking that this is mysql related issue or openSIPS bug. I have 
also adjusted max_allowed_packet=256M on mysql server. Please help.


Thanks and regards


___
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


Re: [OpenSIPS-Users] opensips lua

2020-01-14 Thread Vlad Patrascu
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
http://www.opensips-solutions.com

On 1/14/20 3:32 PM, volga629 via Users wrote:

Hello Vlad,
In lua script  we use \n only in xlog.

this repository

https://github.com/VoIP-SAAS/opensips-smpp-lua

On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  wrote:


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
http://www.opensips-solutions.com
On 1/13/20 3:26 PM, volga629 via Users wrote:

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  wrote:


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
http://www.opensips-solutions.com
On 12/14/19 7:12 AM, volga629 via Users wrote:

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::w 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
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] opensips lua

2020-01-14 Thread volga629 via Users

Hello Vlad,
In lua script  we use \n only in xlog.

this repository



On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  wrote:
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
http://www.opensips-solutions.com 
On 1/13/20 3:26 PM, volga629 via Users wrote:

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  
 wrote:

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
http://www.opensips-solutions.com 


On 12/14/19 7:12 AM, volga629 via Users wrote:

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::w 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
Users@lists.opensips.org 



___
Users mailing list
Users@lists.opensips.org 



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


Re: [OpenSIPS-Users] opensips lua

2020-01-14 Thread Vlad Patrascu
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
http://www.opensips-solutions.com

On 1/13/20 3:26 PM, volga629 via Users wrote:

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  wrote:


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
http://www.opensips-solutions.com
On 12/14/19 7:12 AM, volga629 via Users wrote:

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::w 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
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