Callback Application
Hi hkr,
A 407 response indicates there is an authentication problem.
Here is an example of a Callback that works correctly for me:
sys.Callback("003531xxxxxxx@voipstunt", "00612xxxxxxxx@blueface")
I get audio correctly.
We will be doing some more work on the Callback application in the near future but even then it's unlikely to work universally with all providers as it's using some tricks.
The best bet would be to find a combination of providers it will work with and stick with those.
Regards,
Aaron
A 407 response indicates there is an authentication problem.
Here is an example of a Callback that works correctly for me:
sys.Callback("003531xxxxxxx@voipstunt", "00612xxxxxxxx@blueface")
I get audio correctly.
We will be doing some more work on the Callback application in the near future but even then it's unlikely to work universally with all providers as it's using some tricks.
The best bet would be to find a combination of providers it will work with and stick with those.
Regards,
Aaron
Could it also be, that (all) router settings, needs to be "sharpend" ? in the case of NAT issue's ?
I still not understand how the call back function works,
calling > options ? and get called, by set number, or
calling > hangup > get called by in MSS set number
Edit: forget this remark,I just read the other newer responds in these posts, and I'm completely lost already ..
I guess I'll wait for the success stories to come... and then get some explanations
I still not understand how the call back function works,
calling > options ? and get called, by set number, or
calling > hangup > get called by in MSS set number
Edit: forget this remark,I just read the other newer responds in these posts, and I'm completely lost already ..
I guess I'll wait for the success stories to come... and then get some explanations
Last edited by TheFug on Mon Aug 11, 2008 11:10 pm, edited 2 times in total.
Thanks, The Fug.
gear: my ISP's Zyxel Modem/Router in bridge, Sitecom WL309 Router, Siemens Gigaset 301D
gear: my ISP's Zyxel Modem/Router in bridge, Sitecom WL309 Router, Siemens Gigaset 301D
The regular CallBack method:TheFug wrote:Could it also be, that (all) router settings, needs to be "sharpend" ? in the case of NAT issue's ?
I still not understand how the call back function works,
calling > options ? and get called, by set number, or
calling > hangup > get called by in MSS set number
-You Call wait a few seconds and hangup (hence no charge for the call)
-Now MSS calls the two numbers that are set up (one should be yours)
-By using conditional statements you can activate callback for different callers, within the same MSS acct.
The new method proposed seems to do this:
-You Call
-You are presented with the option to enter number you wish to call
-Call hangs up
-You then receive a call, and the number you entered is also called
Aaron, a suggestion (keeping in mind my understanding of the programming you are having to do is very limited)
Wouldn't it be possible to do anything like this:
1. Initiate a CallBack between <user number> and <306@194.213.29.54:5061>
2. Have the server at 194.213.29.54 ask for a number, then call <Entered number>@<user@sip.mysipswitch.com; usr; pass> and either proxy the call, or do a blind transfer
(Is there any way for MySipSwitch to pass information about the MSS acct. involved, to the server at 194.213.29.54, so the server can then initiate the second leg of the call using that account instead of having to hangup and pass a message to MSS? )
That said though, the current CallBack method (no media server involved) can be very easily used in conjuction with PBXes or LiberaIlVoip's CallThru applications ... or your own asterisk server's DISA
Hi emoci,emoci wrote:The regular CallBack method:TheFug wrote:Could it also be, that (all) router settings, needs to be "sharpend" ? in the case of NAT issue's ?
I still not understand how the call back function works,
calling > options ? and get called, by set number, or
calling > hangup > get called by in MSS set number
-You Call wait a few seconds and hangup (hence no charge for the call)
-Now MSS calls the two numbers that are set up (one should be yours)
-By using conditional statements you can activate callback for different callers, within the same MSS acct.
The new method proposed seems to do this:
-You Call
-You are presented with the option to enter number you wish to call
-Call hangs up
-You then receive a call, and the number you entered is also called
Aaron, a suggestion (keeping in mind my understanding of the programming you are having to do is very limited)
Wouldn't it be possible to do anything like this:
1. Initiate a CallBack between <user number> and <306@194.213.29.54:5061>
2. Have the server at 194.213.29.54 ask for a number, then call <Entered number>@<user@sip.mysipswitch.com; usr; pass> and either proxy the call, or do a blind transfer
(Is there any way for MySipSwitch to pass information about the MSS acct. involved, to the server at 194.213.29.54, so the server can then initiate the second leg of the call using that account instead of having to hangup and pass a message to MSS? )
That said though, the current CallBack method (no media server involved) can be very easily used in conjuction with PBXes or LiberaIlVoip's CallThru applications ... or your own asterisk server's DISA
The first thing to bear in mind is that the new mechanism in the Callback application is new and imperfect. I've certainly tested it and had calls work with the providers I used but there's almost certainly going to be some situations where it's not successful. I am planning on putting some more work into the Callback app as soon as time permits. I haven't managed to do any work on it for a week and a half now due to other issues cropping up with the sipswitch.
So bearing the above in mind the new Callback mechanism is:
1. Place a call to the sipswitch to initiate the callback,
2. Place your end (or the person exepecting the callback) in as the first leg,
3. For the second leg use 306@194.213.29.54:5061,
4. Once connected you enter the number you wish to connect to followed by #,
5. The call to 306 will then complete and the second leg of the call will be replaced by the one configured in the new MESSAGE processing block. The first leg of the Callback stays connected the whole time.
I think that process actually matches your description in point 1.
Point 2 is pretty much the same as the process above but instead of a MESSAGE request it would use a REFER request. The advantage of MESSAGE is that it could end up being more flexible and a better way to transfer information from an external application, in this case DTMF encodings from a PBX. A blind transfer/REFER would not be as flexible as without corrupting the way it is used it would only be able to convey the exact destination to call. It's a bit of semantics though and for teh sake of teh Callback either request would work.
Regards,
Aaron
Last edited by Aaron on Tue Aug 12, 2008 12:22 pm, edited 1 time in total.
-
- Posts: 43
- Joined: Mon Sep 24, 2007 4:40 pm
- Location: bangalore, india
Hey Aaron,1. Place a call to the sipswitch to initiate the callback,
2. Place your end (or the person exepecting the callback) in as the first leg,
3. For the second leg use 306@194.213.29.54:5061,
4. Once connected you enter the number you wish to connect to followed by #,
5. The call to 306 will then complete and the second leg of the call will be replaced by the one configured in the new MESSAGE processing block. The first leg of the Callback stays connected the whole time.
Should this be working already, or is this what you're working on making possible?
This is what I've tried
DialPlan:
Code: Select all
#Ruby
if req.Method.ToString() == "MESSAGE".ToString() then
sys.Log("message=#{req.Body}")
sys.Dial("#{req.Body}@Provider")
else
sys.Callback("0794169399xxx@Provider", "306@194.213.29.54:5061")
end
-I call in to trigger CallBack and Hang Up
-MSS calls me back, and the server correctly prompts me to enter a number
-Upon entering number followed by # the call hangs up
Monitor:
It's my understanding that the dialplan needs to somehow capture that incoming MESSAGE information
Hi emoci,
It is working at least with the providers I've tested with. Try cahnging your code to:
I know the string matching thing in Ruby is a real pain in the arse at the moment and fingers crossed it will get sorted out soon.
In regards the Callback though I've been thinking a bit more about it and I think your suggestion of using a REFER request instead of a MESSAGE one may be a better way to go. The REFER could be treated the same as any other call arriving into the dialplan and therefore could be processed without having to explicity specify another set of rules.
So there is likely to be some more work done on the Callback app in teh near future so it would be best not to spend too much time with the current MESSAGE mechanism.
Regards,
Aaron
It is working at least with the providers I've tested with. Try cahnging your code to:
Code: Select all
if req.Method.ToString().to_s == "MESSAGE".to_s then
In regards the Callback though I've been thinking a bit more about it and I think your suggestion of using a REFER request instead of a MESSAGE one may be a better way to go. The REFER could be treated the same as any other call arriving into the dialplan and therefore could be processed without having to explicity specify another set of rules.
So there is likely to be some more work done on the Callback app in teh near future so it would be best not to spend too much time with the current MESSAGE mechanism.
Regards,
Aaron
-
- Posts: 20
- Joined: Mon Jul 07, 2008 9:48 pm
I am having the same problem, I also tried changing the ToString according to your suggestion Aaron. The sys.Dial("#{req.Body}@Provider") line never executes at all.emoci wrote: This is what I've tried
DialPlan:Process:Code: Select all
#Ruby if req.Method.ToString() == "MESSAGE".ToString() then sys.Log("message=#{req.Body}") sys.Dial("#{req.Body}@Provider") else sys.Callback("0794169399xxx@Provider", "306@194.213.29.54:5061") end
-I call in to trigger CallBack and Hang Up
-MSS calls me back, and the server correctly prompts me to enter a number
-Upon entering number followed by # the call hangs up
Monitor:
It's my understanding that the dialplan needs to somehow capture that incoming MESSAGE information
What is more, I notice that now the old way of using callback doesn't work either, a line like
sys.Callback("0794169399xxx@Provider", "PBXes@Voxalot")
executes and connects the two calls, but there is no voice transmitted between the two legs. I tried different providers and it's the same. Actually that was quite a useful way of using the Callback function, but the new application seams even more useful if it works. What is weird is that it works if one of the legs is 306@194.213.29.54:5061 .
Although, I still cannot get the new callback method to work any further than reported above.....What is more, I notice that now the old way of using callback doesn't work either, a line like
sys.Callback("0794169399xxx@Provider1", "PBXes@Voxalot")
executes and connects the two calls, but there is no voice transmitted between the two legs.
I tried different providers and it's the same. Actually that was quite a useful way of using the Callback function, but the new application seams even more useful if it works. What is weird is that it works if one of the legs is 306@194.213.29.54:5061 .
.....The old callback method, which just connected two legs, is working fine for me, both call legs are connected and audio works fine...
If you're having audio issues, it helps to take a look at your provider...
Especially if you're using VoXalot to complete one of the Call Legs in MySipSwitch you may want to consider the following:
-I've found that if you need to use a 'VoXalot Registered Provider' with MSS callback, the Optimize Audio Function in VoXalot needs to be set to 'No', otherwise you'll encounter audio problems, or the call will drop after about 30 sec
-Because MSS does not negotiate codecs, and provided ony one of the call legs is being handled by VoXalot, you want to make sure that you've allowed for the correct codecs in VoXalot for that specific provider, such that it can negotiate the appropriate codec with Provider1 ...
-
- Posts: 20
- Joined: Mon Jul 07, 2008 9:48 pm
Yes, I checked my Voxalot settings and it's working the old way now.
I am looking forward to getting the new application working though, since it will be much more useful for me, my provider doesn't support DTMF, if it actually starts working with the MESSAGE I can just use SipBroker to trigger the callback and enter the number (less than 1 minute call) and then it will call me back(free) and connect me(cheap). That would be pretty nice.
I am looking forward to getting the new application working though, since it will be much more useful for me, my provider doesn't support DTMF, if it actually starts working with the MESSAGE I can just use SipBroker to trigger the callback and enter the number (less than 1 minute call) and then it will call me back(free) and connect me(cheap). That would be pretty nice.