1

Using Asterisk as the PBX for a client and they have a situation I can't seem to program my way around.

They have taken in a bunch of DDI's to act as an agent for a number of companies - almost like a secretarial type situation.

What the client wants is an easy way to transfer this to the intended company (they understand they'll be paying for the outbound leg of the call). They don't want a huge pause while someone looks up the number in an online directory etc. This is a huge use-case for click-to-call but I can't find a way to tie the extension to the workstation of the user easily (that the client will actually implement) (note, I can't get them to use queues either and a ring strategy that doesn't have 34 home workers all hearing the phone ring at once so lets not get into that debate).

I gave this some thought and figured that I could make a ghost extension like 5678 that could do this and the call taker would just put the call on hold, transfer to the ghost extension and some logic would make that into an outbound call

So off I went to write some extension logic to store the

Call arrives via DDI 1, I can get the number that was called (note, not the caller ID of the person calling) via ${CALLERID(dnid)} just fine.

I stored this in a variable.

Made a call to the DDI, received it, blind transferred it and bam - I can see the value in the variable in the receiving extensions logic.....

But!!!!

Made a call to the same DDI, received it, attended transfer and the variable has been wiped.

Once the extension logic can see the number of the line called, I can easily turn this into the actual number through a quick database lookup.

Can anyone tell me why this happens between an attended and blind transfer?

Can anyone suggest a way to persist this information for that call across the transfer so the newly created channel can see the original information?

I've tried the single underscore and double underscore methods but that doesn't seem to work.

I'm running Asterisk 13.25 at the moment - realise i'm quite behind on this particular person's box but its a complicated setup. According to the docs 1.6 implemented the underscore variable names.

JamesB
  • 499
  • 8
  • 23

1 Answers1

0

Likly blind transfer was done by your phone, not asterisk core.

Other option is channel rename or masquerade. Nobody can say what exactly happens at your side.

Most compatible way is check linked channel and check it's variables via CHANNEL() function.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • I never considered that the phone itself was creating the blind transfer and not Asterisk - its a Grandstream GXP2170. intrigued about looking up linked channels - will delve – JamesB Apr 08 '20 at 18:24
  • any chance you could point me in the right direction on how to access another channels variables? I can't seem to find the syntax to talk to the variable via something like CHANNEL(linkedid) – JamesB Apr 09 '20 at 11:28
  • There are multiple ways. Exact way is set SHARED variable via same function and use SHARED(varname[,channel]), where CHANNEL is linked channel – arheops Apr 09 '20 at 13:14