go-smpp
go-smpp copied to clipboard
Implements generic_nack on ESME side
Hello,
How could I send a generic_nack PDU to SMS-C when my ESME receive an unsupported PDU ?
Here is the handler that I provide to my Transceiver
:
func handle(p pdu.Body) {
switch p.Header().ID {
case pdu.DeliverSMID:
logger.Infof("Received DeliverSM PDU")
case pdu.UnbindID:
logger.Infof("Received Unbind PDU from SMS-C... shutting down !")
stopGracefully()
default:
nack := pdu.NewGenericNACK()
// TODO: send nack ... but how ?
logger.Errorf("Received unknown pdu: %+v", p)
}
}
Any idea ?
Thanks ! Emmanuel