Re: [PATCH] custom MO Parameters for smsc-http

Alejandro Guerrieri <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Ok, here's a new version of my patch to add support for custom MO  
parameters on the generic http-smsc.

New features:

1. Support for setting the numeric response code for successful and  
failed requests (as it is now, it always returns 202 HTTP_ACCEPTED).
2. Support for setting the text response for successful requests  
(right now it returns "Sent.").
3. Some code cleanups (extra lines, parameter expansion after  
authorization).
4. Documentation.

http://www.blogalex.com/archives/192

I can commit if no objections.

Regards,
--
Alejandro Guerrieri
[email protected]



On 01/06/2009, at 22:50, Alexander Malysh wrote:

> Hi,
>
> here some comments...
>
> in generic_receive_sms you first receive all values than converts it  
> and only
> after this done check authorization. Make no sense... first check  
> auth then convert anything.
>
> +    else if (from == NULL || to == NULL || text == NULL) {
> +
> +        error(0, "HTTP[%s]: Insufficient args",
>
> why extra line?
>
> I think retmsg should also be configurable. Because not all gateways  
> will accept 'Sent'  as response.
> I think even HTTP error code for not accepted MOs/DLRs should be  
> configurable.
>
> Thanks,
> Alex
>
> P.S. And userguide part would be nice ;)
>
> Am 28.05.2009 um 23:00 schrieb Alejandro Guerrieri:
>
>> HI,
>>
>> I've finished my patch to configure the parameter names for MO on  
>> the generic http-smsc.
>>
>> To use it you just add a few entries on the smsc definition, only  
>> with the parameters you want to rename.
>>
>> e.g:
>>
>> generic-param-from = "phoneNumber"
>> generic-param-to = "shortCode"
>> generic-param-text = "message"
>>
>> More details and the patch here:
>>
>> http://www.blogalex.com/archives/171
>>
>> Of course I'm writing the userguide part if this goes forward :)
>>
>> Regards,
>> --
>> Alejandro Guerrieri
>> [email protected]
>>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.