I hadn't checked "message in" checkbox in the http callback config page.
blocks all incoming and outgoing messages. The only exception are messages sent from the console program on the 'Send message' page of one of the gateways, these messages do not trigger an HTTP callback. But the loop-back message from the Emulator Gateway does trigger an HTTP callback so you will not see a received message with this script.
For troubleshooting the HTTP callback script, you can enable communication logging for a connector (for outgoing messages) and/or a gateway (for incoming messages). The communication log includes details about the HTTP callback request and the response that allows you to see if the HTTP request has been triggered and what the response from the PHP script is.
I'm testing that scripts run the way I expect them to. They run on my lap top but I want to see them running in their intended environment.
I thought I'd start with the simplest of scripts that I could prove was running - a rejection - before spending time debugging more complex ones. I will need to reject some messages when I'm live, so it is not just a trivial test.
If I click the "Test" button in the http callback config window, I get a green tick, and if I click the "show log" link I see "result=0" in the pop up window. That indicates to me the script is in the correct place and the php interpreter is running as it should be.
The receive log always shows the message as received.
The send log mostly shows delivered (with a 201 status).
I have one example where the send log shows "sent" with a 200 status. I don't know what if anything I did differently with that one, but the message is shown as received in the receive log.
Have I misunderstood something?
The PHP script is filtered from your post, you can post the script between <code> and </code> tags to prevent it from being filtered automatically.
Rejecting all the message with an HTTP callback has the same effect as just unchecking the 'Loop back successfully sent messages as received messages'. What exactly do you want to test?
I'm using the emulator, and I can send a message and have it loop straight back. I have the http callback set up with a php script that does this :
The looped back i/c message seems to be accepted. Shouldn't this reject it?
If not, what's the best way to test them without putting them onto live gateways?
Sorry, I completely missed that. Thank you again.
You can use an Emulator Gateway to simulate inbound messages, it has an option to loop back all outgoing messages as an inbound message. This option is disabled by default, you can enable it in the settings of the Emulator Gateway.
Is there a way to simulate inbound messages so I can test setups without having to send external messages?
I was thinking of creating two smpp gateways so one could call the other, but that won't work as they would both be trying to use the same port on the same box.
Is this possible?
Most Users Ever Online: 494
Currently Browsing this Page:
Guest Posters: 588
Newest Members:, Henk Helmantel
Administrators: Henk Helmantel: 1218