[sr-dev] Issue in xhttp_mod

Dario Bozzali Dario.Bozzali at ifmgroup.it
Tue Jul 18 17:12:32 CEST 2017


Hello Daniel,
Using last commit xhttp_reply is found and kamailio.cfg is properly loaded.
Thank you and best regards,
Dario

From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
Sent: martedì 18 luglio 2017 16.47
To: Dario Bozzali <Dario.Bozzali at ifmgroup.it>
Cc: Kamailio (SER) - Development Mailing List <sr-dev at lists.kamailio.org>
Subject: Re: [sr-dev] Issue in xhttp_mod


Hello,

thanks for testing and feedback -- I just pushed another patch, hopefully nailing it down this time. Fetch again the master and let me know the results.

Cheers,
Daniel

On 18.07.17 16:13, Dario Bozzali wrote:
Hello Daniel,
I updated local repository and I rebuilt all but I'm again facing error on xhttp_reply:

DEBUG: <core> [core/sr_module.c:700]: find_mod_export_record(): find_export_record: <xhttp_reply> not found 0(18071)
DEBUG: <core> [core/sr_module.c:693]: find_mod_export_record(): find_export_record: found <xhttp_reply> in module xhttp [/usr/local/sbin/kamailio/lib64/kamailio/modules/xhttp.so] 0(18071)
ERROR: <core> [core/cfg.y:3286]: yyparse(): misused command xhttp_reply 0(18071)
CRITICAL: <core> [core/cfg.y:3429]: yyerror_at(): parse error in config file /usr/local/sbin/kamailio/etc/kamailio/kamailio.cfg, line 1700, column 41: Command cannot be used in the block 0(18071)

Best regards,
Dario

From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
Sent: martedì 18 luglio 2017 15.06
To: Kamailio (SER) - Development Mailing List <sr-dev at lists.kamailio.org><mailto:sr-dev at lists.kamailio.org>; Dario Bozzali <Dario.Bozzali at ifmgroup.it><mailto:Dario.Bozzali at ifmgroup.it>
Subject: Re: [sr-dev] Issue in xhttp_mod


Hello,

I just pushed a different patch trying to fix the issue -- yours would be good only fir xhttp_reply() function. Can you fetch again the latest master branch and report if now works ok?

Cheers,
Daniel

On 18.07.17 14:45, Dario Bozzali wrote:

Hello,

I'm quite new to Kamailio and I'm making some tests using devel release (git head).



I'm facing an issue in xhttp_mod module after I updated my repository to master head and in particular after  commit dc0765c04c3cb5d8981551e3f28ee6871fc803ff (14/07/2017).

In src/core/route.h line 57

#define EVENT_ROUTE   REQUEST_ROUTE

has been changed to

#define EVENT_ROUTE   (1 << 9)



After this change, xhttp_reply is no more accepted as valid command in event_route[xhttp:request] route in my kamailio.cfg file.



I suppose that the issue is caused by REQUEST_ROUTE in src/modules/xhttp/xhttp_mod.c line 74. I think it should be EVENT_ROUTE

static cmd_export_t cmds[] = {

               {"xhttp_reply",    (cmd_function)w_xhttp_send_reply,

                              4, fixup_xhttp_reply,  0, REQUEST_ROUTE},    ==========> should be (?)  4, fixup_xhttp_reply,  0, EVENT_ROUTE},

               {"bind_xhttp",     (cmd_function)bind_xhttp,

                              0, 0, 0, ANY_ROUTE},

               {0, 0, 0, 0, 0}

};



I changed REQUEST_ROUTE to EVENT_ROUTE and, after that, kamailio.cfg is loaded without error. I don't know Kamailio code, so I don't know if this change is enough.



Thank you and best regards,

Dario











_______________________________________________

Kamailio (SER) - Development Mailing List

sr-dev at lists.kamailio.org<mailto:sr-dev at lists.kamailio.org>

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev




--

Daniel-Constantin Mierla

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>

Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>



--

Daniel-Constantin Mierla

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>

Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170718/79ca85ae/attachment.html>


More information about the sr-dev mailing list