Hi list,
 
Find attached my patch (version 2) to add support for default-sender and forced-sender smsc config directives. I will explain some points:
 
1) smsbox: precedence of faked_sender, global_sender, from
------------------------------------------------------------
I have normalized the way these directives are applied. As I posted previously [ with very little feedback I have to say :-( ], MT-replies, and MT's were treated in different ways.
dapply 1) faked_sender then 2) global then 3) from
obey_request_thread, smsbox_req_handle, smsbox_req_sendota were the functions responsible for this. I changed smsbox_req_handle, smsbox_req_sendota to work the same as obey_request_thread.
 
 
2) struct Msg* : applied_defaults
------------------------------------------------------------
Now smsbox and bearerbox records in the Msg* structure the defaults it applies. This is coded in applied_defaults member. Each default is represented by one bit, and are available for the rest of modules to check with dlf_xxxx constants. For example, you could check inside a smsc driver if global-sender was applied with something like this
 
     if (msg->sms.applied_defaults & dfl_global_sender) { /* global-sender was applied */.... }
 

3) config directives default-sender and forced-sender
------------------------------------------------------------
This directives can be established for each smsc. Both are optional.
 
default-sender :   it overrides faked-sender and global-sender, but NOT &from=
forced-sender  :   as it name implies, it overrides anything. Every message routed to this smsc will have this sender.
 

I'd greatly appreciate your feedback, bug reporting, flames, anything.
 
Any chance for commiting to cvs?
 
Have fun.
 
Angel Fradejas.

Attachment: patch_default_sender_2.diff
Description: Binary data

Reply via email to