Guest
2008-10-04T00:10:35Z
Hello,
Developing application in PHP using "curl" routines.

Is there any definitive description of the gateway response?
I can't find it in the documentation.
It seems to be destination phone-number followed by comma then either ID or ERR
followed by colon and either identification number or error
message.

If multiple destinations are specified then there is a separate response
for each destination separated by a single new-line character.

I.e. for the example in the notes

447710123456,ID:1001100000000000001
447710654321,ID:1001100000000000002

Knowing definitely would save using up credits and annoying people with
test messages.
Support
2008-10-06T10:58:41Z
Single line response is returned when sending to a single recipient or when the whole submission fails:

ID:10011000000000000001

or

ERR:INSUFFICIENT_CREDIT


Multiline response is returned when sending to multiple recipients:

44771012345,ID:10011000000000000001
44771012346,ID:10011000000000000001
44771054321,ERR:INVALID_NUMBER



A line is returned per recipient. Each line contains the recipient's number (international format), followed by comma, followed by the response. The ID applies to the whole submission and is identical for each recipient.

NOTE: The phone numbers listed in the response may not be identical to the numbers submitted. This is due to processing done to the numbers, e.g. international dialling codes added, duplicate numbers removed.

Guest
2008-10-14T16:57:37Z
I'm still a bit confused.

Examining a recent gateway reply to a multi-destination message revealed
a single new-line (\n) character between the two information blocks and
a "CRLF" pair (\r\n) after the final information block.

Is this definitively the structure of the gateway response?

I am attempting to parse the response (in PHP) for logging purposes.

[Took several credits and some confused users before I realised what
was actually going on.]
Support
2008-10-14T17:12:18Z
Your observations are correct:
Each line is separated by single new-line (\n).
The last line ends with "CRLF" pair (\r\n).
Users browsing this topic