hi i want to use dispatcher Module and following is the config..
--------------------------------------- loadmodule "dispatcher.so" -------------- modparam("dispatcher", "db_url", "mysql://kamailio:kamailiorw@localhost /kamailio") modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") modparam("dispatcher", "ds_hash_size", 2) --------------------------------------------------------------
but when i hit $ kamailio out put: ERROR: bad config file (4 errors) ------------------------------------------------------ logs :
kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-11-20 15:16:34 IST; 16s ago Process: 25747 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255/EXCEPTION)
Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 5. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Stopped Kamailio (OpenSER) - the Open Source SIP Server. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Start request repeated too quickly. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Failed with result 'exit-code'. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. -------------------------------------------------------------
plz help me
On 20 Nov 2019, at 10:55, Gaurav Bmotra saigauravmehra91@gmail.com wrote:
ERROR: bad config file (4 errors)
Check the syslog for details on these four errors or start kamailio in the foreground with "kamailio -c” to see them.
/O
hi Johansson thank you for reply i got this in logs kamailio-c ....................................... 0(26418) ERROR: <core> [core/modparam.c:140]: set_mod_param_regex(): parameter <dst_avp> of type <1> not found in module <dispatcher> 0(26418) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 304, column 50: Can't set module parameter 0(26418) ERROR: <core> [core/modparam.c:140]: set_mod_param_regex(): parameter <grp_avp> of type <1> not found in module <dispatcher> 0(26418) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 305, column 50: Can't set module parameter 0(26418) ERROR: <core> [core/modparam.c:140]: set_mod_param_regex(): parameter <cnt_avp> of type <1> not found in module <dispatcher> 0(26418) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 306, column 50: Can't set module parameter 0(26418) ERROR: <core> [core/modparam.c:140]: set_mod_param_regex(): parameter <dstid_avp> of type <1> not found in module <dispatcher> 0(26418) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 307, column 52: Can't set module parameter ERROR: bad config file (4 errors) 0(26418) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
On Wed, Nov 20, 2019 at 3:33 PM Olle E. Johansson oej@edvina.net wrote:
On 20 Nov 2019, at 10:55, Gaurav Bmotra saigauravmehra91@gmail.com wrote:
ERROR: bad config file (4 errors)
Check the syslog for details on these four errors or start kamailio in the foreground with "kamailio -c” to see them.
/O _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Gaurav,
check your config file Syntax with kamailio -DD -c -f /etc/kamailio/kamailio.cfg
That should show you what's wrong.
And your Kamailio version is needed for help.
The dispatcher avps changed during some 5.x versions. Take a look at the dispatcher module documentation for your specific version.
Kind regards Karsten Horsmann
Gaurav Bmotra saigauravmehra91@gmail.com schrieb am Mi., 20. Nov. 2019, 10:57:
hi i want to use dispatcher Module and following is the config..
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "mysql://kamailio:kamailiorw@localhost /kamailio") modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") modparam("dispatcher", "ds_hash_size", 2)
but when i hit $ kamailio out put: ERROR: bad config file (4 errors)
logs :
kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-11-20 15:16:34 IST; 16s ago Process: 25747 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255/EXCEPTION)
Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 5. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Stopped Kamailio (OpenSER) - the Open Source SIP Server. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Start request repeated too quickly. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Failed with result 'exit-code'. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.
plz help me
--
Thank you
*Regards:* Gaurav Kumar
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you are using version 5.2+ you need to put the name of the avp, not $avp... like
... modparam("dispatcher", "xavp_dst", "AVP_DST") modparam("dispatcher", "xavp_dst_mode", 0) modparam("dispatcher", "xavp_ctx", "AVP_CTX") …
Best regards,
Markus
Am 20.11.2019 um 11:04 schrieb Karsten Horsmann khorsmann@gmail.com:
Hi Gaurav,
check your config file Syntax with kamailio -DD -c -f /etc/kamailio/kamailio.cfg
That should show you what's wrong.
And your Kamailio version is needed for help.
The dispatcher avps changed during some 5.x versions. Take a look at the dispatcher module documentation for your specific version.
Kind regards Karsten Horsmann
Gaurav Bmotra <saigauravmehra91@gmail.com mailto:saigauravmehra91@gmail.com> schrieb am Mi., 20. Nov. 2019, 10:57: hi i want to use dispatcher Module and following is the config..
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio") modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") modparam("dispatcher", "ds_hash_size", 2)
but when i hit $ kamailio out put: ERROR: bad config file (4 errors)
logs :
kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-11-20 15:16:34 IST; 16s ago Process: 25747 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255/EXCEPTION)
Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 5. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Stopped Kamailio (OpenSER) - the Open Source SIP Server. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Start request repeated too quickly. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Failed with result 'exit-code'. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.
plz help me
--
Thank you
Regards: Gaurav Kumar
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
… and it’s now an xavp, to log contents you can use something like:
xlog("L_INFO","Socket: {$xavp(AVP_SOCK)}\n"); xlog("L_INFO","Destination: {$xavp(AVP_DST)=>sock}\n"); xlog("L_INFO","Number of destinations: {$avp(AVP_CNT)}\n"); xlog("L_INFO","All destinations: {$(avp(AVP_DST)[*])}\n"); xlog("L_INFO","All attributes: {$(avp(AVP_ATTRS)[*])}\n");
Am 20.11.2019 um 11:12 schrieb Markus Bönke mb@tenios.de:
If you are using version 5.2+ you need to put the name of the avp, not $avp... like
... modparam("dispatcher", "xavp_dst", "AVP_DST") modparam("dispatcher", "xavp_dst_mode", 0) modparam("dispatcher", "xavp_ctx", "AVP_CTX") …
Best regards,
Markus
Am 20.11.2019 um 11:04 schrieb Karsten Horsmann <khorsmann@gmail.com mailto:khorsmann@gmail.com>:
Hi Gaurav,
check your config file Syntax with kamailio -DD -c -f /etc/kamailio/kamailio.cfg
That should show you what's wrong.
And your Kamailio version is needed for help.
The dispatcher avps changed during some 5.x versions. Take a look at the dispatcher module documentation for your specific version.
Kind regards Karsten Horsmann
Gaurav Bmotra <saigauravmehra91@gmail.com mailto:saigauravmehra91@gmail.com> schrieb am Mi., 20. Nov. 2019, 10:57: hi i want to use dispatcher Module and following is the config..
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio mysql://kamailio:kamailiorw@localhost/kamailio") modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") modparam("dispatcher", "ds_hash_size", 2)
but when i hit $ kamailio out put: ERROR: bad config file (4 errors)
logs :
kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-11-20 15:16:34 IST; 16s ago Process: 25747 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255/EXCEPTION)
Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 5. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Stopped Kamailio (OpenSER) - the Open Source SIP Server. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Start request repeated too quickly. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Failed with result 'exit-code'. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.
plz help me
--
Thank you
Regards: Gaurav Kumar
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
hi thank you so much for this information my issue is resolved
On Wed, Nov 20, 2019 at 3:51 PM Markus Bönke mb@tenios.de wrote:
… and it’s now an xavp, to log contents you can use something like:
xlog("L_INFO","Socket: {$xavp(AVP_SOCK)}\n"); xlog("L_INFO","Destination: {$xavp(AVP_DST)=>sock}\n"); xlog("L_INFO","Number of destinations: {$avp(AVP_CNT)}\n"); xlog("L_INFO","All destinations: {$(avp(AVP_DST)[*])}\n"); xlog("L_INFO","All attributes: {$(avp(AVP_ATTRS)[*])}\n");
Am 20.11.2019 um 11:12 schrieb Markus Bönke mb@tenios.de:
If you are using version 5.2+ you need to put the name of the avp, not $avp... like
... modparam("dispatcher", "xavp_dst", "AVP_DST") modparam("dispatcher", "xavp_dst_mode", 0) modparam("dispatcher", "xavp_ctx", "AVP_CTX") …
Best regards,
Markus
Am 20.11.2019 um 11:04 schrieb Karsten Horsmann khorsmann@gmail.com:
Hi Gaurav,
check your config file Syntax with kamailio -DD -c -f /etc/kamailio/kamailio.cfg
That should show you what's wrong.
And your Kamailio version is needed for help.
The dispatcher avps changed during some 5.x versions. Take a look at the dispatcher module documentation for your specific version.
Kind regards Karsten Horsmann
Gaurav Bmotra saigauravmehra91@gmail.com schrieb am Mi., 20. Nov. 2019, 10:57:
hi i want to use dispatcher Module and following is the config..
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", " mysql://kamailio:kamailiorw@localhost/kamailio") modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") modparam("dispatcher", "ds_hash_size", 2)
but when i hit $ kamailio out put: ERROR: bad config file (4 errors)
logs :
kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-11-20 15:16:34 IST; 16s ago Process: 25747 ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP (code=exited, status=255/EXCEPTION)
Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 5. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Stopped Kamailio (OpenSER) - the Open Source SIP Server. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Start request repeated too quickly. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: kamailio.service: Failed with result 'exit-code'. Nov 20 15:16:34 gaurav-Latitude-E7240 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.
plz help me
--
Thank you
*Regards:* Gaurav Kumar
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users