Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Testing Scripts
sp_NewPost Add Reply sp_NewTopic Add Topic
October 17, 2019
3:06 pm
David Wylie
Guest
Guests

Found it.

I hadn't checked "message in" checkbox in the http callback config page.

Works now.

Thanks.

October 17, 2019
2:32 pm
Henk Helmantel
Admin
Forum Posts: 1487
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

The script:

<?php
echo 'result=0';
?>

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.

Regards, Henk

October 17, 2019
11:21 am
David Wylie
Guest
Guests

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?

October 17, 2019
10:59 am
Henk Helmantel
Admin
Forum Posts: 1487
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

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?

Regards, Henk

October 16, 2019
11:42 pm
David Wylie
Guest
Guests

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?

October 11, 2019
1:05 pm
David Wylie
Guest
Guests

Sorry, I completely missed that. Thank you again.

October 11, 2019
1:03 pm
Henk Helmantel
Admin
Forum Posts: 1487
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello David,

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.

Best regards,
Henk

October 11, 2019
12:36 pm
David Wylie
Guest
Guests

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?

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 529

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 671

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1140

Posts: 3897

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1487