Tuesday, February 15, 2011

SIP Communication ( SIP Signalling and Media transport)

SIP (Session Initiation Protocol: RFC 3261) Communication involves SIP signaling ( initiate, modify and terminate sessions/calls) and MEDIA transport (using RTP).

In what conditions Asterisk is forced to handle the media stream?
In following conditions, Asterisk involves in media between the phones/UAs.
  • If one of the clients is configured with canreinvite=NO, Asterisk will not issue a re-invite at all and will not redirect the media path.
  • If the clients use different codecs, Asterisk will not issue a re-invite.
  • If the Dial( ) command contains ''t'', ''T", "h", "H", "w", "W" or "L" (with multiple arguments) Asterisk will not issue a re-invite.
If clients support canreinvite=yes and use same codecs, we can set canreinvite=yes in asterisk(sip.conf) as well. With that option, Asterisk will be able to issue re-invite to the clients and redirect the media path so that it doesn't have to handle the media stream any more. However, most of the Asterisk implementation make asterisk to handle the media stream.

Why Asterisk is not SIP Proxy? [ from voip-info.org ]
Asterisk, as a server, is a SIP Registrar, location server and also acts as a useragent endpoint (softphone).

If it is 'controlling' or relaying a call from a SIP phone to another SIP phone, it simply acts as an endpoint UA to the originating call leg and then creates a new call to the receiving phone. Therefore, it stays "in the middle of the call," maintaining state and controlling, and optionally bridging, each remote endpoint. The audio channels (RTP) may go directly from phone to phone or may go through Asterisk's media bridge.

Asterisk can thus be described best as a "back-to-back user agent" (B2BUA), which is also consistent with the use of the term "PBX". Because of this architecture, fairly simple SIP functions, such as REFER (transfer) involve more aspects of the Asterisk core. On the other hand, the architecture provides additional power and flexibility, because each call leg can just as easily be replaced with a different technology channel (ZAP, H323, MGCP, etc) and, thus, Asterisk becomes a powerful media gateway.

SIP Proxy usually doesn't involve in the media stream between the phones, it simply handles SIP signalling. A SIP proxy handles call control on behalf of other user agents (UA) and usually does not maintain state during a call and therefore is never the endpoint of a call.

For more info click here

No comments:

Post a Comment