[Freeswitch-users] Asterisk equivalent Bridge() function implementation

mazilo Nabble at slickdeals.endjunk.com
Tue Jul 27 07:46:01 PDT 2010



mercutioviz wrote:
> > What Asterisk's Bridge() function does
>> is to bridge the incoming calls from Google Voice with the existing
>> (on-going) outbound calls to Google Voice by means of the Python scripts
>> file.
> 
> This is where you lost us. What existing call is being bridged to? I count
> only two calls:
> from GV back to the user (via Gizmo or whatever contact number the user
> has)
> from GV to PSTN (to reach the called party)
> 
> I'm assuming that the ultimate result of the above is that the user will
> be
> talking to the destination:
> GV user <--> Called party
> 
> Where is the outgoing call to GV? Is there a third call that we're not
> aware
> of? If so, what is its purpose?
You are right. Let's see if I can manage to explain it better.

When I pick up a phone (connected to a Linksys PAP2v2 unit configured as an
extension to my asterisk device) and dial a US PSTN number, one of the
dialplans intercepts to execute the Google Voice Dialer scripts file using
an AGI function. AGI locally creates (on my asterisk system) a SIP channel
ID (SIP/1005-00000049) as shown below while the scripts perform two
functions, i.e. to emulate a login process to Google Voice account and to
interact with the Google Voice's click2call function to place an outbound
call to a US PSTN network (dialed number). When Google Voice receives the
click2call action, it performs two calls, i.e. an outbound call to the
number listed on the forwarding to folder (in this case, my Gizmo5 number)
and then another outbound call to the dialed number (a US PSTN number). The
later part will be executed once the former outbound call to my Gizmo5
number has been established between Google Voice and the telephone unit
connected to my Linksys PAP2v2 unit (configured as an extension to my
asterisk device). When my asterisk system receives the incoming call on its
Gizmo5 trunk, the asterisk Bridge() function assosociates and assigns this
incoming call to the existing call with a SIP channel ID
(SIP/1005-00000049). At this time, I will hear the calling tone (or even
busy signals). When the callee party picks up his/her phone, then the
conversation starts between the caller and callee (like business as usual).

I am sure FreeSWITCH can do this better than Asterisk. The problem with me
being a newbie to FreeSWITCH is I don't know how to do this. I am hoping
someone who has done this will be able to help. After all, the Google Voice
DialOut Python scripts file can be freely downloaded/read from 
http://www.pmarks.net/posted_links/google-voice-dialout.agi here .

    -- Launched AGI Script /usr/lib/asterisk/agi-bin/google-voice-dialer.agi
<SIP/1005-00000049>AGI Tx >> agi_request: google-voice-dialer.agi
<SIP/1005-00000049>AGI Tx >> agi_channel: SIP/1005-00000049
<SIP/1005-00000049>AGI Tx >> agi_language: en
<SIP/1005-00000049>AGI Tx >> agi_type: SIP
<SIP/1005-00000049>AGI Tx >> agi_uniqueid: 1280239277.95
<SIP/1005-00000049>AGI Tx >> agi_version: 1.6.2.9
<SIP/1005-00000049>AGI Tx >> agi_callerid: 1005
<SIP/1005-00000049>AGI Tx >> agi_calleridname: 11
<SIP/1005-00000049>AGI Tx >> agi_callingpres: 0
<SIP/1005-00000049>AGI Tx >> agi_callingani2: 0
<SIP/1005-00000049>AGI Tx >> agi_callington: 0
<SIP/1005-00000049>AGI Tx >> agi_callingtns: 0
<SIP/1005-00000049>AGI Tx >> agi_dnid: 1404XXXXXXX
<SIP/1005-00000049>AGI Tx >> agi_rdnis: unknown
<SIP/1005-00000049>AGI Tx >> agi_context: phones
<SIP/1005-00000049>AGI Tx >> agi_extension: 1404XXXXXXX
<SIP/1005-00000049>AGI Tx >> agi_priority: 13
<SIP/1005-00000049>AGI Tx >> agi_enhanced: 0.0
<SIP/1005-00000049>AGI Tx >> agi_accountcode: 
<SIP/1005-00000049>AGI Tx >> agi_threadid: 65546
<SIP/1005-00000049>AGI Tx >> agi_arg_1: <USERNAME>
<SIP/1005-00000049>AGI Tx >> agi_arg_2: <PASSWORD>
<SIP/1005-00000049>AGI Tx >> agi_arg_3: 747XXXXXXX
<SIP/1005-00000049>AGI Tx >> agi_arg_4: 404XXXXXXX
<SIP/1005-00000049>AGI Tx >>


-----
don't and stop are the ONLY two 4-letter words considered offensive to men,
but not when used together.
-- 
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Asterisk-equivalent-Bridge-function-implementation-tp5303089p5342450.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



More information about the FreeSWITCH-users mailing list