[Asterisk-Dev] How are SIP calls connected/bridged ?

Alexander Lopez alex.lopez at opsys.com
Wed Nov 30 00:40:21 MST 2005


Please try not to post to the -dev list unless it is a bug or a feature.

But I will explain in simple terms what it is you are looking for.


The channels based architecture of Asterisk allows for an abstraction of
the calls regardless of the channel, or technology used. 

Therefore a call is a call no matter what end device you are connected
(talking) to. Asterisk simply 'Bridges' the tehnologies together to
provide the means of connecing both 'Callids' or legs.

With that said your scenario would be as follows:

I assume that by Alice and Bob both talking to Asterisk they are:
A:	Dancing to the sweet sounds of the IVR
B:	talking to each other and Asterisk is Bridging the call.
C:	They are on hold.

And by Asterisk, Answering the call by Todd I can assume:
A:	Todd called the system and is surfing the IVR
B:	Todd is a moron and has no clue what he is doing on Warth!!
	(I'll assume A)

When Todd selects the correct extension or option from the IVR, Asterisk
will attempt to place a new call via the SIP channel to the device
registered as or to Alice. If her device supports call waiting, she will
see, or hear Todd (Who at this point is peeing himself because the phone
worky) Alice drops or places Bob on hold and there is a forth!!(4)
channel with 2 calls. When Bob hangs up the call the legs between Alice
and Bob are closed.  


Now if all three, four if you include Asterisk 


What you are looking to do is a redirection of channels

> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-
> bounces at lists.digium.com] On Behalf Of < Arnaud >
> Sent: Tuesday, November 29, 2005 10:30 PM
> To: asterisk-dev at lists.digium.com
> Subject: [Asterisk-Dev] How are SIP calls connected/bridged ?
> 
> Please help me understand the magic by which Asterisk knows that SIP
> Callid1 is "bridged" with SIP Callid2. I've been studiying chan_sip.c
> for quite some time and still don't get it. Is the "peer" stored in
> sip_pvt ?
> 
> Scenario:
> Assume that initially * bridges SIP Callid 1 with Callid 2 (Callid1 is
> between Alice and *, Callid2 is between Bob and *)
> 
> Later on * Answers() a SIP call and SIP Callid3 is created. (Callid 3
> is between Todd and *)
> 
> Under certain circumstances I want * to bridge Callid 1 with Callid3
> (that is Callid 3 replaces Callid2).
> 
> by briding I mean, route the RTP traffic and the SIP signaling so that
> Alice speaks with Todd.
> 
> Thanks in advance - Arnaud
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list