go-smpp icon indicating copy to clipboard operation
go-smpp copied to clipboard

Implements generic_nack on ESME side

Open goten4 opened this issue 4 years ago • 0 comments

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

goten4 avatar May 12 '20 15:05 goten4