No, No URL works for forwarding events.
forward.url is not for events.
Thanks
Atul
Hello,
Can someone please help me with this or give me pointer that can help me? I am blocked on this.
Thanks,
Atul
I'm not sure what can be the problem. The only option I can think of is to debug server and see what's happening.
Hi,
Hope this can help you
This is my default.xml
<entry key='event.forward.enable'>true</entry> <entry key='event.forward.url'>http://www.yourwebsite.com/your_listen_function.php</entry> <entry key='event.forward.header'> content-type: application/json, authorization: Basic YOURAUTHORIZACIONIFYOUNEED cache-control: no-cache </entry>
And Abyss777 posted this code to debug the data recieved. Put this in your your_listen_function.php
<?php $log_dir = '/tmp/'; $log_name = "posts-" . $_SERVER['REMOTE_ADDR'] . "-" . date("Y-m-d-H") . ".log"; $log_entry = gmdate('r') . "\t" . $_SERVER['REQUEST_URI'] . " " . serialize($_POST) . " " . $_POST['event']['type'] . " "; $fp=fopen( $log_dir . $log_name, 'a' ); fputs($fp, $log_entry); fclose($fp); ?>
And restart your server :)
Thanks very much. I was feeling bit lost, now I have something to try :)
Thank You,
Atul
I know this is old discussion, but I am facing the same problem, all events do not forwarded .. below is my traccar.xml
<entry key='forward.enable'>true</entry>
<entry key='forward.url'>https://mydomain.com/api/traccar_events</entry>
<entry key='forward.json'>true</entry>
<entry key="event.forward.enable">true</entry>
<entry key='event.forward.url'>https://mydomain.com/api/traccar_events</entry>
I also tried to set notifications channel to web and or empty .. but no luck..
please help
Slightly related - is it possible to set the event / position forwards as attributes to devices / users / groups?
Are you saying that if you put any other URL, it works? It probably means that your URL is incorrect.