All the Sonoff devices schematics are on the Sonoff web page.
Scroll to the bottom for a PDF of the schematic: https://www.itead.cc/wiki/Sonoff_Dual.
This schematic shows that, apart from the relay, button and LED GPIOs, (which you probably should not play with, since they already have functions), the Rx and Tx pins (clearly labelled on your board) are also GPIO pins. You can solder another header on there. I don't know what software "your own" is but firmware like TASMOTA, for example, allows these pins to be reconfigured for whatever function you wish: they can take on the functions of GPIO4 and GPIO14 on other style boards, or even be used as I2C.
I have used these schematics to add 2.5mm jacks to Sonoff Basics. Be sure to check against the version number on your board. There are instructions out there on how to modify a TH, but I think it's a really old board.