Callthrough - how?

Support zone

Callthrough - how?

Postby christian_schwarz » Sun May 29, 2011 12:30 am

Dear sipsorcery community,

I am trying to achieve a callthrough as follows: I would like to call a DID number (e. g. from my US cellphone), key in a number I would like to connect to (e. g. a German fixed line) and get connected.

Using tropo, I have no problem achieveing the call-in and keying in the number. However, from tropo I would like to pass on the number to sipsorcery for the actual dial plan processing. I can think of two methods to do so:
1) blindtransfer - disadvantage is that using free call-ins (like IPKall) do not work as the transfer essentially bridges the IPKall leg with the target leg (which IPKall does not allow), similar problems with other (non-free) providers
2) regular SIP call to sipsorcery, but I could not find a method to pass on the target number (e. g. through custom SIP headers, sipsorcery has the SetCustomHeader method but no similar GetCustomHeader which I could use)

Can anyone point me on the right path or maybe already has achieved anything similar?

Many thanks!
Christian
christian_schwarz
 
Posts: 10
Joined: Mon Jan 04, 2010 5:55 am

Re: Callthrough - how?

Postby MikeTelis » Sun May 29, 2011 3:08 am

Here is a chunk of my Tropo code:
Code: Select all
    event = call "sip:#{TransferURI}",
            :callerID => "+#{callid_2}",
            :headers  => { "x-tropo-from" => from }

    if event.name == 'answer'
      log "#{MyName} answered"
      newCall = event.value
# ...

On Sipsorcery side, I retrieve the "from" number as follows:
Code: Select all
from = req.Header.get_unknown_header_value('x-tropo-from')
MikeTelis
 
Posts: 1568
Joined: Wed Jul 30, 2008 6:48 am

Re: Callthrough - how?

Postby christian_schwarz » Sun May 29, 2011 10:35 pm

Mike,

Thanks - that is exactly what I was looking for!
christian_schwarz
 
Posts: 10
Joined: Mon Jan 04, 2010 5:55 am


Return to Technical Support



Who is online

Users browsing this forum: No registered users and 6 guests

Powered by phpBB® Forum Software © phpBB Group
Theme created by StylerBB.net
cron