forked from public/public
plugin smpp-custom
This commit is contained in:
parent
032ea2a894
commit
e458f15bf2
2 changed files with 14 additions and 0 deletions
7
plugins/smpp-custom/README.md
Normal file
7
plugins/smpp-custom/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Custom options over SMPP
|
||||
|
||||
Some operators want additional information sent as the custom TLVs between 0x1400 and 0xFFFF.
|
||||
One way to do this is to add a `before_send()` plugin to the connector.
|
||||
Such a plugin, as the one shown here, would set the `$sms->{SMPPOPTION}` to a string in the format `key:hexvalue`, where `hexvalue` is the hex encoded version of the value.
|
||||
If multiple values need to be sent, `$sms->{SMPPOPTION}` can instead be set to an array of such strings.
|
||||
|
7
plugins/smpp-custom/smpp-custom.pl
Normal file
7
plugins/smpp-custom/smpp-custom.pl
Normal file
|
@ -0,0 +1,7 @@
|
|||
sub before_send {
|
||||
my ($request, $response) = @_;
|
||||
my $sms = ${$request}{qe};
|
||||
$sms->{SMPPOPTION} = "0x1400:" . unpack("H*","Value");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue