Two stage calling ?

Getting started with the SIP Sorcery
Post Reply
hotm
Posts: 14
Joined: Fri Oct 26, 2007 1:25 pm

Two stage calling ?

Post by hotm » Fri Jan 15, 2010 7:21 pm

Hello!
I can use my Sipsorcery account to forward all my incomming calls to my mobile number if My ATA Device is not registered to Sipsorcery.
Now I have a newbe question: Can sipsorcery provide like Two stage calling ?
If someone call my DID registered in Sipsorcery , and my ATA is not registered, is it possible to obtain a tone to simply dial another number and to be then handled by outbond dial plan ?
Sorry for my poor english!

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Fri Jan 15, 2010 8:39 pm

No sipsorcery won't be able to do that by itself. Because sipsorcery does not deal with media it cannot be used to get the number.

This requirement has come up a lot though and I and a few others have played around with different service providers that offer media services. None of them are perfect because they don't support transferring the call back to sipsorcery. The best one was probably tropo.com.

Regards,

Aaron

hotm
Posts: 14
Joined: Fri Oct 26, 2007 1:25 pm

Post by hotm » Wed Jan 27, 2010 2:34 pm

Hi Aaron, and thanks for the answer.
As I read on your Anouncement site here> http://sipsorcery.wordpress.com/2010/01 ... transfers/ you manage some sort of transfer between Tropo and Sipsorcery. Being a newbe I did not understand all of your explanations there.
So I present my Sipsorcery dial plan and my Tropo Dial Plan in order to give me an ideea where I'm wrong.

#Ruby dial plan for account mysipsorceryaccount@sipsorcery.com

if sys.In then
# Do your incoming call processing customisations here.

if sys.IsAvailable() then # if online
sys.Dial("#{sys.Username}@local")
else # response if phone is not online.
sys.Dial("999142XXXX@sip.tropo.com")
end

else
# Do your outgoing call processing customisations here.
case req.URI.User

when '100' then sys.Dial("1234567890@provider1")
when '100' then sys.Dial("1234567890@provider1")

when /^0035/ then sys.Dial("provider2")
when /^0036/ then sys.Dial("provider3")

else sys.Dial("Voxalot EU")
end
end
# End of Ruby Dial Plan @Sipsorcery


#Ruby Dial plan @Tropo
answer
result=ask ' Please enter phone number', { :choices => '[10 DIGITS]' }
if result.name=='choice'
say 'Great, you said ' + result.value
end
require 'net/http'
transferResult = Net::HTTP.get_response(URI.parse("http://sipsorcery.com/callmanager.svc/b ... 34")).body
log transferResult
hangup
#End of Ruby Dial plan @Tropo

Now when I call my DID number asociated with my "provider1", the call is directed by Sipsorcery at Tropo and is asking me the number, then the number is said by the robo-lady, and after that nothing happens.
All I want is that that number to be sent back to Sipsorcery and to be handled by my outgoing plan in Sipsorcery.
Is it possible !?!

p.s I didn't know what to put instead 1234 (in Tropo's dial plan) and either at CallID

Regards!

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Wed Jan 27, 2010 6:18 pm

Hi

I have been playing around with the callback to enter a number and then the number is dialed trough ss

This was my tropo script

Code: Select all

<?php 
answer(); 
wait (2000); 

$result=prompt( "Welcome, Please enter a phone number for callback..", array( "choices" => "[10-13 DIGITS]" ) ); 

say("$result->value");

call("http://huizenwireless.nl:8080/callmanager/webcallback?user=$currentCall->callerID&number=$result->value");

wait (2000);

hangup();

?>
maybe it helps

hotm
Posts: 14
Joined: Fri Oct 26, 2007 1:25 pm

Post by hotm » Thu Jan 28, 2010 2:21 pm

Hi !
You said that this script is for calling back to SipSorcery...but isn't suppose to exist a line for directing the call to SS? I do not see anything like "www.sipsorcery.com/webcallback..."

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Thu Jan 28, 2010 8:31 pm

hotm wrote:Hi !
You said that this script is for calling back to SipSorcery...but isn't suppose to exist a line for directing the call to SS? I do not see anything like "www.sipsorcery.com/webcallback..."
I am running my own local version

for sipsorcery it should be something like this

Code: Select all

<?php 
answer(); 
wait (2000); 

$result=prompt( "Welcome, Please enter a phone number for callback..", array( "choices" => "[10-13 DIGITS]" ) ); 

say("$result->value"); 

call("http://www.sipsorcery.com/callmanager.svc/webcallback?user=$currentCall->callerID&number=$result->value"); 

wait (2000); 

hangup(); 

?> 

Post Reply