Ringback?

I have a Siemens IP/Dect phone with a ringback facility.

Currently ringback only works when using the POTS line. With Voip I get IP status 486 back to the phone and a hangup. The option to ringback isn’t shown at all.

So I’m wondering if it’s possible to make some kind of ringback in Asterisk itself? This is an experimental recipe that I’ve been playing with:

exten => _0XX.,n,Dial(SIP/${EXTEN}@draytel,,rW) exten => _0XX.,n,GotoIf($[${DIALSTATUS} = BUSY]?Setnum) exten => _0XX.,n,Set(BUSYNUM="",g) exten => _0XX.,n,hangup() exten => _0XX.,n(Setnum),Set(BUSYNUM=${EXTEN},g) exten => _0XX.,n(Busy),Playtone(Busy) exten => _0XX.,n,Wait(10) exten => _0XX.,n,Dial(SIP/${BUSYNUM}@draytel,,rW) exten => _0XX.,n,GotoIf($[${DIALSTATUS} = BUSY]?Busy) exten => _0XX.,n,Dial(SIP/dec450,20,w) exten => _0XX.,n,hangup()

The problem is that my phone hangs up as soon as it hears the Playtone(Busy) and that immediately causes a fallthrough to h and stops the recipe. I tried to add some detection in h:

exten => h,1,GotoIf($["${BUSYNUM}" = ""]?Stop:Busy2) exten => h,n(Busy2),Noop(BUSYNUM) exten => h,n,Wait(10) exten => h,n,Dial(SIP/${BUSYNUM}@draytel,,rW) exten => h,n,GotoIf($[${DIALSTATUS} = BUSY]?Busy2) exten => h,n,Dial(SIP/dec450,20,w) exten => h,n,hangup() exten => h,n(Stop),Noop(${BUSYNUM}) exten => h,n,hangup()

But this doesn’t work.

I can get the ringback to work if I don’t use the Playtone(busy), but then there’s no way of knowing whether the other end is ringing normally or is engaged.

Any ideas on how to get something like this to work?

Ultimately I’d like to somehow enter a code/number from my handset to initiate ringback, and then have another to cancel it.

What type of Siemens DECT phone do you have? I used Siemens DECT phones quite a lot and I never had problems with the phones. So there is a big chance that your Asterisk server is miss-configured. Did you do any debugs from Asterisk CLI?

Its an S450 IP phone (well really a unlocked DP450 that is branded by Tesco).

When I phone an engaged number it displays something like ‘IP Status 486’ and the only option on the phone is ‘End’ (but I can hear the engaged tone). At this point asterisk reports a hangup situation. CLI output shows:

-- Called SIP/xxxxxx@draytel -- SIP/draytel-00000001 is making progress passing it to SIP/dec450-00000000 -- Got SIP response 486 "Busy here" back from xxxxxxxxxxx:5060 -- SIP/draytel-00000001 is busy == Everyone is busy/congested at this time (1:1/0/0) -- Executing [xxxxxx@external:4] Hangup("SIP/dec450-00000000", "") in new stack == Spawn extension (external, xxxxxx, 4) exited non-zero on 'SIP/dec450-00000000' -- Executing [h@external:1] Hangup("SIP/dec450-00000000", "") in new stack == Spawn extension (external, h, 1) exited non-zero on 'SIP/dec450-00000000

My normal recipe is:

[external] exten => _0XX.,1,Set(DYNAMIC_FEATURES=automon) exten => _0XX.,n,Set(TOUCH_MONITOR=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M)}) exten => _0XX.,n,Dial(SIP/${EXTEN}@draytel,,rW) exten => _0XX.,n,hangup()

I have other recipes like _Z. but are the same kind of recipe. I do have an h recipe which is simply:

Calling to the SIP provider does not have much to do with your IP phone.

-- SIP/draytel-00000001 is busy

This says that Draytel is returning a “Busy” status for the called number. So this is triggered by the VoIP service provider and not Asterisk or IP phone.

Yeah I’m not disputing that. All I’m asking if anyone has implemented a ringback service in asterisk.

I’m sorry, I don’t know what you mean by “ringback service”.

Just to be clear - currently the call setup is correct. You are calling a busy number and the phone shows that it’s busy. I am glad that we agree on that :smile:

This is what I mean by ringback (there is also something called a ringback tone, which is a different thing entirely):

Basically, when a number you call is engaged you get the option of having the phone, or asterisk in this case, keeping trying the number until it is no longer engaged. When the called number begins to ring, asterisk will call back to the originating phone and connect it once it’s picked up.

Ah, now I get it :smile:

I don’t think that Asterisk has a built in support for that, but I am not sure. I would also like to have some info on that.

I am aware of Call Completion Supplementary Services (CCSS), but I am not sure if this can be used for public numbers.

Hey! That sounds like exactly what I’m looking for. I need to read it through but the description is spot on.

Edit*

Ok it does look like it’s for SIP phones only, rather than say going through a Voip provider/POTS.

So it’s back to plan 1. I remember the first time I saw someone using a call completion he would press a key, his phone would stay open (on speaker) and it would dial the other person’s phone until it was no longer engaged. On hearing the ringing tone the caller would pick up his phone again and wait for the called party to answer. This was way back in France maybe 20-30 years ago and it was all done by the phone itself. This is what I will attempt to get asterisk to do, more or less.