[PATCH] SMPP command_status as meta-data

2012-10-24 Thread Alejandro Guerrieri
Hi, Attached is a patch that allows passing the command_status on SMPP as meta-data, on the smpp_error_code parameter, so on the logs (and dlr-url) you'd get something like: *[META:?smpp?smpp_error_code=72&]* * * This would be command status value (which is 0 for accepted messages and a positive

Re: [PATCH] SMPP command_status as meta-data

2012-10-24 Thread Juan Nin
Something that I was thinking after that discussion we had today, is the following: It sounds good idea to me to add the protocol on the ACK/NACK DLRs text for the mentioned reason. Now, on regular DLRs we might be missing a similar approach... This is a sample DLR log: 2012-10-24 22:18:17 Recei

Re: [PATCH] SMPP command_status as meta-data

2012-10-25 Thread Alexander Malysh
Hi Alex, this patch is no go, because you put SMPP specific handling into abstract bb_smscconn. As to the discussion itself. We use error codes in our apps as well and we were never in the situation that we have to know protocol from the meta-data or message itself. We have mapping of SMSC nam

Re: [PATCH] SMPP command_status as meta-data

2012-10-25 Thread Juan Nin
Hi! Yesterday we were talking about the same thing, that an ACK is an ACK, so you don't really need the error code there. But IMHO it anyway makes it more tidy to use the same approach for both ACK and NACK, providing the same syntax on both. It won't provide any real benefit to anyone, but looks

Re: [PATCH] SMPP command_status as meta-data

2012-10-25 Thread Alejandro Guerrieri
Alex, I didn't expect the patch to be accepted, it was more of a "conversation starter". Anyway, perhaps it could prove useful for some people or at least as a guide (even about how NOT to do things) ;) Passing the error code on ACK was more about consistency than anything else. The protocol, as

Re: [PATCH] SMPP command_status as meta-data

2012-10-26 Thread Alexander Malysh
Hi Alex, I'm relieved to hear that :-) Ok what we could do is the following: ACK/PROTO/// NACK/PROTO/ERRCODE/ERR DESCR/ With this format we easy split DLR message on / and we have all the infos. Meta-data hack would be too fragile for me... I'm not sure that we need error code for ACK but will

Re: [PATCH] SMPP command_status as meta-data

2012-10-26 Thread Juan Nin
What about the protocol on regular DLRs which are submitted by the remote SMSC on a deliver_sm? Wouldn't a new parameter %whatever be a good idea? That way we could use it on both cases and avoid modifying the current ACK/NACK formats Juan On Fri, Oct 26, 2012 at 8:32 AM, Alexander Malysh wrote: