kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
August 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
22 participants
281 discussions
Start a n
N
ew thread
git:master:7f848ef9: modules: readme files regenerated - uac ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 7f848ef96f8dbe27b71d4436ffaf2291e488aac7 URL:
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf229…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2018-08-30T12:31:37+02:00 modules: readme files regenerated - uac ... [skip ci] --- Modified: src/modules/uac/README --- Diff:
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf229…
Patch:
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf229…
--- diff --git a/src/modules/uac/README b/src/modules/uac/README index 6a47fbccf2..e7cc136dd2 100644 --- a/src/modules/uac/README +++ b/src/modules/uac/README @@ -43,12 +43,12 @@ Ramona-Elena Modroiu 3.10. auth_username_avp (string) 3.11. auth_password_avp (string) 3.12. reg_db_url (string) - 3.13. reg_timer_interval (string) + 3.13. reg_timer_interval (int) 3.14. reg_retry_interval (int) 3.15. reg_random_delay (int) 3.16. reg_db_table (string) 3.17. reg_contact_addr (string) - 3.18. reg_keep_callid (string) + 3.18. reg_keep_callid (int) 3.19. reg_active (int) 4. Functions @@ -155,12 +155,12 @@ Chapter 1. Admin Guide 3.10. auth_username_avp (string) 3.11. auth_password_avp (string) 3.12. reg_db_url (string) - 3.13. reg_timer_interval (string) + 3.13. reg_timer_interval (int) 3.14. reg_retry_interval (int) 3.15. reg_random_delay (int) 3.16. reg_db_table (string) 3.17. reg_contact_addr (string) - 3.18. reg_keep_callid (string) + 3.18. reg_keep_callid (int) 3.19. reg_active (int) 4. Functions @@ -259,12 +259,12 @@ Chapter 1. Admin Guide 3.10. auth_username_avp (string) 3.11. auth_password_avp (string) 3.12. reg_db_url (string) - 3.13. reg_timer_interval (string) + 3.13. reg_timer_interval (int) 3.14. reg_retry_interval (int) 3.15. reg_random_delay (int) 3.16. reg_db_table (string) 3.17. reg_contact_addr (string) - 3.18. reg_keep_callid (string) + 3.18. reg_keep_callid (int) 3.19. reg_active (int) 3.1. rr_from_store_param (string) @@ -443,7 +443,7 @@ modparam("uac", "reg_db_url", "mysql://kamailio:kamailiorw@localhost/kamailio") ... -3.13. reg_timer_interval (string) +3.13. reg_timer_interval (int) Timer interval (in seconds) at which registrations are managed, e.g. renewed as needed. @@ -504,7 +504,7 @@ modparam("uac", "reg_db_table", "uacreg") modparam("uac", "reg_contact_addr", "192.168.1.2:5080") ... -3.18. reg_keep_callid (string) +3.18. reg_keep_callid (int) If set to 0 (default), a new Call-Id will be generated for each registration attempt. If set to non-zero, the same Call-Id will be used
6 years, 3 months
1
0
0
0
git:master:84f30a22: uac: docs - fixed types of some params and removed trailing white spaces
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 84f30a2207084457d7053535e1ae84bd8ea855ec URL:
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-30T12:20:44+02:00 uac: docs - fixed types of some params and removed trailing white spaces --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84b…
Patch:
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84b…
6 years, 3 months
1
0
0
0
git:master:056b98d6: sipjson: serialize reply status code and reason phrase in default attributes
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 056b98d6717af79eb4f40a5d02cd343bdac8c628 URL:
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-30T12:18:11+02:00 sipjson: serialize reply status code and reason phrase in default attributes --- Modified: src/modules/sipjson/sipjson_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343…
Patch:
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343…
--- diff --git a/src/modules/sipjson/sipjson_mod.c b/src/modules/sipjson/sipjson_mod.c index 1dc82eb777..ca6ea8e8bd 100644 --- a/src/modules/sipjson/sipjson_mod.c +++ b/src/modules/sipjson/sipjson_mod.c @@ -285,6 +285,9 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str* smode) srjson_AddStrStrToObject(jdoc, jr, "rU", 2, "", 0); srjson_AddStrStrToObject(jdoc, jr, "rd", 2, "", 0); srjson_AddNumberToObject(jdoc, jr, "rp", 0); + srjson_AddNumberToObject(jdoc, jr, "rs", msg->first_line.u.reply.statuscode); + srjson_AddStrStrToObject(jdoc, jr, "rr", 2, + msg->first_line.u.reply.reason.s, msg->first_line.u.reply.reason.len); } else { if(msg->parsed_uri_ok==0 && parse_sip_msg_uri(msg)<0) { srjson_AddStrStrToObject(jdoc, jr, "rU", 2, "", 0); @@ -296,6 +299,8 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str* smode) sj_add_xuri_attr(puri, 2, "rd", 2, jdoc, jr); sj_add_xuri_attr(puri, 3, "rp", 2, jdoc, jr); } + srjson_AddNumberToObject(jdoc, jr, "rs", 0); + srjson_AddStrStrToObject(jdoc, jr, "rr", 2, "", 0); } puri = parse_from_uri(msg);
6 years, 3 months
1
0
0
0
git:master:4f8a2bec: modules: readme files regenerated - uac ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 4f8a2becb5d9aa53eeaca1f6bdba7e55bdfe4ebb URL:
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e5…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2018-08-30T10:31:29+02:00 modules: readme files regenerated - uac ... [skip ci] --- Modified: src/modules/uac/README --- Diff:
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e5…
Patch:
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e5…
6 years, 3 months
1
0
0
0
git:master:505d42ad: uac: docs for reg_active param and uac.reg_active rpc command
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 505d42ad214848420335542132b44ab7180a7b65 URL:
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-30T10:23:19+02:00 uac: docs for reg_active param and uac.reg_active rpc command --- Modified: src/modules/uac/doc/uac_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab…
Patch:
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab…
--- diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml index 650ec8823c..637d976e25 100644 --- a/src/modules/uac/doc/uac_admin.xml +++ b/src/modules/uac/doc/uac_admin.xml @@ -507,6 +507,27 @@ modparam("uac", "reg_keep_callid", 1) </example> </section> + + <section id="uac.p.reg_active"> + <title><varname>reg_active</varname> (int)</title> + <para> + If set to 0, no remote regisrations are done. In other words, + it can control at once if the module should do remote registratios + or not. It can be changed at runtime via rpc command + 'uac.reg_active 0|1'. + </para> + <para>The default value is 1 (active).</para> + <example> + <title>Set <varname>reg_active</varname> parameter</title> + <programlisting format="linespecific"> +... +modparam("uac", "reg_active", 0) +... + </programlisting> + </example> + </section> + + </section> <section> @@ -1165,6 +1186,26 @@ event_route[uac:reply] { </example> </section> + <section id="uac.r.uac.reg_active"> + <title> + <function moreinfo="none">uac.reg_active</function> + </title> + <para> + Control if the module should do remote registrations or not. Setting + to 1 enables remote registrations for all records and 0 disables + doing them. + </para> + <example> + <title><function>uac.reg_active</function> usage</title> + <programlisting format="linespecific"> +... + kamctl rpc uac.reg_active 0 + kamctl rpc uac.reg_active 1 +... + </programlisting> + </example> + </section> + </section> <section>
6 years, 3 months
1
0
0
0
git:master:49f35427: uac: reg_active - new parameter to control if remote registrations are active
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 49f354276df3cfc2cdb0f85b5a1839f86733aead URL:
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-30T10:16:14+02:00 uac: reg_active - new parameter to control if remote registrations are active - default 1 (active) - can be changed at runtime via rpc command uac.reg_active 0|1 --- Modified: src/modules/uac/uac.c Modified: src/modules/uac/uac_reg.c Modified: src/modules/uac/uac_reg.h --- Diff:
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f…
Patch:
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f…
6 years, 3 months
1
0
0
0
git:master:094d36ae: modules: readme files regenerated - sipjson ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 094d36ae1f28dd22310c59ee0fab85e382c43c2e URL:
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2018-08-30T08:16:53+02:00 modules: readme files regenerated - sipjson ... [skip ci] --- Modified: src/modules/sipjson/README --- Diff:
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e…
Patch:
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e…
--- diff --git a/src/modules/sipjson/README b/src/modules/sipjson/README index f8578b2f61..add1b53f97 100644 --- a/src/modules/sipjson/README +++ b/src/modules/sipjson/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla <miconda(a)gmail.com> - Copyright © 2018
asipto.com
+ Copyright © 2018
asipto.com
__________________________________________________________________ Table of Contents @@ -27,9 +27,12 @@ Daniel-Constantin Mierla 3.1. sj_serialize(opt, ovar) + 4. Output Samples + List of Examples 1.1. sj_serialize usage + 1.2. sj_serialize output Chapter 1. Admin Guide @@ -45,12 +48,15 @@ Chapter 1. Admin Guide 3.1. sj_serialize(opt, ovar) + 4. Output Samples + 1. Overview This module serializes SIP message attributes into a JSON document. It can facilitate getting the SIP attributes in a structure inside one - of the embedded interpreters (e.g., KEMI interpreters). + of the embedded interpreters (e.g., KEMI interpreters, Lua can parse + JSON in an internal hash table). 2. Dependencies @@ -72,7 +78,7 @@ Chapter 1. Admin Guide 3.1. sj_serialize(opt, ovar) -3.1. sj_serialize(opt, ovar) +3.1. sj_serialize(opt, ovar) Do the serialization of SIP messagge attributes into a JSON document. @@ -95,3 +101,48 @@ Chapter 1. Admin Guide ... sj_serialize("0B", "$var(json)"); ... + +4. Output Samples + + The content of the output variable is a JSON. Next are some samples. + + Example 1.2. sj_serialize output +... +# the content of $var(json) after sj_serialize("0B", "$var(json)") +# - the content is compacted, next it has been pretty-formatted for better view +ing +... +{ + "mt":2, + "rm":"OPTIONS", + "pr":"udp", + "si":"127.0.0.1", + "sp":36747, + "Ri":"127.0.0.1", + "Rp":5060, + "ru":"sip:alice@127.0.0.1", + "rU":"alice", + "rd":"127.0.0.1", + "rp":0, + "fU":"sipsak", + "fd":"172.17.0.2", + "ua":"sipsak 0.9.7pre", + "ci":"482215126(a)172.17.0.2", + "rb":"" +} +... +# the sip message sent to Kamailio: +... +OPTIONS sip:alice@127.0.0.1 SIP/2.0 +Via: SIP/2.0/UDP 127.0.0.1:65502;branch=z9hG4bK.79e78613;rport;alias +From: sip:sipsak@172.17.0.2;tag=74806173 +To: sip:alice@127.0.0.1 +Call-ID: 482215126(a)172.17.0.2 +CSeq: 1 OPTIONS +Contact: sip:sipsak@127.0.0.1:65502 +Content-Length: 0 +Max-Forwards: 70 +User-Agent: sipsak 0.9.7pre +Accept: text/plain + +...
6 years, 3 months
1
0
0
0
git:master:2a636f59: sipjson: docs - added sample of output content
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 2a636f593597fae4082923a9aee78b9963eccbc1 URL:
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-30T08:06:12+02:00 sipjson: docs - added sample of output content --- Modified: src/modules/sipjson/doc/sipjson_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9…
Patch:
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9…
--- diff --git a/src/modules/sipjson/doc/sipjson_admin.xml b/src/modules/sipjson/doc/sipjson_admin.xml index 5624678033..ccfa868073 100644 --- a/src/modules/sipjson/doc/sipjson_admin.xml +++ b/src/modules/sipjson/doc/sipjson_admin.xml @@ -20,7 +20,8 @@ </para> <para> It can facilitate getting the SIP attributes in a structure inside one - of the embedded interpreters (e.g., KEMI interpreters). + of the embedded interpreters (e.g., KEMI interpreters, Lua can parse + JSON in an internal hash table). </para> </section> @@ -116,5 +117,54 @@ sj_serialize("0B", "$var(json)"); </section> + <section> + <title>Output Samples</title> + <para> + The content of the output variable is a JSON. Next are some samples. + </para> + <example> + <title><function>sj_serialize</function> output</title> + <programlisting format="linespecific"> +... +# the content of $var(json) after sj_serialize("0B", "$var(json)") +# - the content is compacted, next it has been pretty-formatted for better viewing +... +{ + "mt":2, + "rm":"OPTIONS", + "pr":"udp", + "si":"127.0.0.1", + "sp":36747, + "Ri":"127.0.0.1", + "Rp":5060, + "ru":"sip:alice@127.0.0.1", + "rU":"alice", + "rd":"127.0.0.1", + "rp":0, + "fU":"sipsak", + "fd":"172.17.0.2", + "ua":"sipsak 0.9.7pre", + "ci":"482215126(a)172.17.0.2", + "rb":"" +} +... +# the sip message sent to &kamailio;: +... +OPTIONS sip:alice@127.0.0.1 SIP/2.0 +Via: SIP/2.0/UDP 127.0.0.1:65502;branch=z9hG4bK.79e78613;rport;alias +From: sip:sipsak@172.17.0.2;tag=74806173 +To: sip:alice@127.0.0.1 +Call-ID: 482215126(a)172.17.0.2 +CSeq: 1 OPTIONS +Contact: sip:sipsak@127.0.0.1:65502 +Content-Length: 0 +Max-Forwards: 70 +User-Agent: sipsak 0.9.7pre +Accept: text/plain + +... +</programlisting> + </example> + </section> </chapter>
6 years, 3 months
1
0
0
0
Info: Cluecon Weekly about Kamailio, today at 17:00GMT
by Daniel-Constantin Mierla
Hello, if you haven't seen the news article on
kamailio.org
, today at 17:00GMT I will be part of the Cluecon Weekly online video conference to present about what's new lately in Kamailio, plans for the future as well as address questions about using Kamailio together with FreeSwitch. Anyone can join via audio or video calls, more details about at: *
https://www.kamailio.org/w/2018/08/kamailio-on-cluecon-weekly-aug-29-2018/
*
https://freeswitch.org/confluence/display/FREESWITCH/ClueCon+Weekly+Confere…
Cheers, Daniel -- Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda
--
www.linkedin.com/in/miconda
Kamailio World Conference --
www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin --
www.asipto.com
6 years, 3 months
1
1
0
0
git:master:97de3d8a: sipjson: link root object to json structure
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 97de3d8aef8cf1e8475b42d3b81cf20d31f99f4d URL:
https://github.com/kamailio/kamailio/commit/97de3d8aef8cf1e8475b42d3b81cf20…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-08-29T12:08:18+02:00 sipjson: link root object to json structure --- Modified: src/modules/sipjson/sipjson_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/97de3d8aef8cf1e8475b42d3b81cf20…
Patch:
https://github.com/kamailio/kamailio/commit/97de3d8aef8cf1e8475b42d3b81cf20…
--- diff --git a/src/modules/sipjson/sipjson_mod.c b/src/modules/sipjson/sipjson_mod.c index f1dad02dfc..1dc82eb777 100644 --- a/src/modules/sipjson/sipjson_mod.c +++ b/src/modules/sipjson/sipjson_mod.c @@ -80,24 +80,19 @@ static int ki_sj_serialize_helper(sip_msg_t* msg, str* smode, pv_spec_t *pvs) return -1; } + LM_DBG("sip to json serialization...\n"); srjson_InitDoc(&jdoc, NULL); if(sj_serialize_data(msg, &jdoc, smode)<0) { + LM_ERR("json serialization failure\n"); goto error; } - if(jdoc.buf.s != NULL) { - jdoc.free_fn(jdoc.buf.s); - jdoc.buf.s = NULL; - jdoc.buf.len = 0; - } jdoc.buf.s = srjson_PrintUnformatted(&jdoc, jdoc.root); - if(jdoc.buf.s!=NULL){ - jdoc.buf.len = strlen(jdoc.buf.s); - } memset(&val, 0, sizeof(pv_value_t)); if(jdoc.buf.s!=NULL) { + jdoc.buf.len = strlen(jdoc.buf.s); val.flags = PV_VAL_STR; val.rs = jdoc.buf; @@ -115,6 +110,7 @@ static int ki_sj_serialize_helper(sip_msg_t* msg, str* smode, pv_spec_t *pvs) } } srjson_DestroyDoc(&jdoc); + LM_DBG("sip to json serialization done...\n"); return 1; @@ -225,6 +221,7 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str* smode) LM_ERR("cannot create json root obj\n"); goto error; } + jdoc->root = jr; if(parse_headers(msg, HDR_EOH_F, 0) < 0) { LM_ERR("failed to parse headers\n"); @@ -345,10 +342,10 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str* smode) break; } } - return 1; error: + LM_ERR("failed to build the json serialization document\n"); return -1; }
6 years, 3 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
29
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Results per page:
10
25
50
100
200