Wrapper for voip protocol?

I’ve not used Asterisk before and I’d like to know if what I’m saying here is something I will be able to do.

Basically, I want to make a VoIP link from one point to another on the same LAN; however, and this is what I’m not sure of, can I grab the VoIP protocol and wrap it in my own protocol to send off and will then be unwrapped at the other end? If possible, any pointers would be much appreciated on what’s involved.

Thanks,

Yes its possible (thats basically what a VPN tunnel does) but why?

Why bother to re-invent the wheel when there are some FREE products out there that can do what you want. For instance, MilkFish can be hosted on a Linux embedded system (an open-source supported NAT/Firewall WiFi router) to all what you said. All you need is the supported hardware + some ATA devices with POTS attached to them.

I’m not reinventing the wheel, I am inventing my own transport layer protocol which is what I’m really after, and I’m looking for a way to test it w/ some voice streams. So … can anyone point me to a next step of how I might grab voice streams from asterisk and wrap them in my stuff?

Anyone?