this should have been straight forward but my code comments were not adequate and it took me a while to figure out what I had done. Anyway finally got it to work and tally with what was going on in Asterisk.
![](https://k6.gravityisahat.co.uk/wp-content/uploads/2019/10/midi-triggers-to-pd.png)
![](https://k6.gravityisahat.co.uk/wp-content/uploads/2019/10/asterisk_extensions.png)
this should have been straight forward but my code comments were not adequate and it took me a while to figure out what I had done. Anyway finally got it to work and tally with what was going on in Asterisk.