I have a question about asterisk - and voip switches in general. About how it actually works. I know some things about the protocols involved, but I’m definitely not an expert, and I don’t know much about switches in general.
Let’s say the caller calls the callee, where the caller uses asterisk (or any other switch for that matter). I can imagine two ways it could work:
- Like a proxy; it would modify the packet and send it on to the callee’s provider.
- Like a phone-client itself. Basically it would send its own request to the callee, if an event occurs it will ‘simulate’ the event on its own for the client. So basically, per call, the server will have two calls itself.
With 2, I can imagine one of two things happening again:
2.1. It would tell the caller to send the stream data (RTP) directly to the callee.
2.2. It would request the caller to send the stream data to the switch, which will forward it to the callee.
My first question is: which of these methods does asterisk use? And what if SIP calls another protocol, like h323? I can’t imagine another method than 2.2 here.
Now, let’s assume the caller is to be billed for this call. Using method 1 and 2.1, the caller and callee will learn each other’s IP address on the invite and the answering of the call. This would mean the entire switch could be bypassed by the client, making billing impossible. However, 2.2 would take a lot of bandwidth that would not be needed.
I’ve never done billing, so I’m not even sure if SIP to SIP should be billed or not. But if it would, wouldn’t that be an issue?
Thanks in advance,