Callback Application

New features you'd like see on SIP Sorcery
Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Sun Aug 10, 2008 12:17 am

To be honest I'm still beavering away trying to get it working with a specific Asterisk server rather than providing any kind of generic approach.

Once it does work there's no reason I can think of right now that it any Asterisk or other media server couldn't be used for teh DTMF encoding. The snippet of Asterisk dial plan that I'm using at the moment is:

Code: Select all

exten => 306,1,Playback(please-enter-your)
exten => 306,2,Playback(number)
exten => 306,3,Set(TIMEOUT(digit)=4)
exten => 306,4,Set(TIMEOUT(response)=5)
exten => 306,5,Read(keys)
exten => 306,6,NoOp(${keys})
exten => 306,7,SendText(${keys})
exten => 306,8,Wait(5)
exten => 306,9,Hangup
Regards,

Aaron

trottm
Posts: 38
Joined: Sat Jul 28, 2007 9:52 pm

Post by trottm » Sun Aug 10, 2008 4:43 am

rmclaren
If you are using your own Asterisk server for part of the callback, would it not be better to do the whole thing there? The following is a link to someone that got it working in a nice simple way on the Slug. I keep meaning to try it on my WRT54G Asterisk server.
http://blog.jploh.com/2007/01/28/asteri ... back-disa/
Also Nerd Vittles site has a more comprehensive function that is intended for Trixbox but I am sure the code cod be tailored.

hkr
Posts: 72
Joined: Sat Dec 15, 2007 10:05 am

Post by hkr » Mon Aug 11, 2008 8:48 am

Hello,

Does anyone have a working method to achieve callback with SIP URI's as either or both legs of the call?

hkr

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

Post by Aaron » Mon Aug 11, 2008 9:48 am

Hi hkr,

The Callback application has just been updated so that arbitrary SIP destinations will work with it now. Example:

sys.Callback("303@sip.blueface.ie", "612@fwd.pulver.com")

Regards,

Aaron

hkr
Posts: 72
Joined: Sat Dec 15, 2007 10:05 am

Post by hkr » Mon Aug 11, 2008 10:02 am

Aaron,

Great-great! Thank you-thank you!

I will give it a try now.

Is it possible to pass through the CID information as well?

Regards,

Krisztian

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

Post by Aaron » Mon Aug 11, 2008 10:29 am

Hi Krisztian,

The callback application will now correctly use provider entries so if you can get callerid passed through on a normal call you should be able to get it passed through on a Callback.

Example:

Callback("1234@provider1", "456@provider2")

Note that if you are using ${fromname} and/or ${fromuriuser} in your Provider settings they will extract the values from the request that arrived into the dialplan that initiated the Callback application.

Regards,

Aaron

User avatar
TheFug
Posts: 914
Joined: Sat Oct 06, 2007 8:23 am
Location: The Netherlands, North-Holland

Post by TheFug » Mon Aug 11, 2008 12:05 pm

If i understand correctly, the first is the detected provider, and will call back, in the second part, with that provider the number that has been set in the second part ? if not, please explain.
Thanks, The Fug.

gear: my ISP's Zyxel Modem/Router in bridge, Sitecom WL309 Router, Siemens Gigaset 301D

hkr
Posts: 72
Joined: Sat Dec 15, 2007 10:05 am

Post by hkr » Mon Aug 11, 2008 12:12 pm

The second destination either gets or connected or not... Rather not. But even if it seems to connect, there is no audio.

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

Post by Aaron » Mon Aug 11, 2008 12:27 pm

Hi hkr,

If both legs of your Callback are on private IP addresses the way the application currently works means most of the time the audio between them will not work.

The original request for the Callback application was to be able to place outgoing calls through a provider and to do that reliably we can't use the REFER request, commonly known as a transfer, (since most providers don't support it). So instead we do a re-INVITE. The re-INVITE approach needs at least one of the Callback legs on a public IP address.

Regards,

Aaron

hkr
Posts: 72
Joined: Sat Dec 15, 2007 10:05 am

Post by hkr » Mon Aug 11, 2008 12:32 pm

First leg is always my mobile via Justvoip. Either as Justvoip outgoing or my Justvoip account diverted to my mobile (the trick to get CID and avoid FUP). The callback always reaches me fine.

If second leg is my voice menu or callthrough account on PBX-es, it does not get connected, I get error 407. Why?

If second leg is any PSTN number via another provider, I get connected, but there is no audio in either direction.

Post Reply