[asterisk-users] Call Hold / Transfer via AMI

Antony Stone Antony.Stone at asterisk.open.source.it
Wed Jul 21 05:38:56 CDT 2021


Hi.

From the lack of response to my question, I'm assuming that either:

a) putting a call on hold is not possible via AMI
or
b) everyone thinks it's so obvious that I should be able to see it for myself

Can anyone confirm one way or the other?

If it simply isn't possible, I'd like to put my efforts into exploring 
alternative solutions instead of spending more time on AMI.

Thanks,


Antony.

On Monday 19 July 2021 at 11:02:19, Antony Stone wrote:

> Hi.
> 
> Nobody has any ideas?
> 
> I have an AMI login to a proprietary PBX (ie: I can't see or modify the
> dial plan).  I can subscribe to all events, get channel numbers when calls
> are set up, etc.  I can issue AMI commands, originate calls...
> 
> How can I use AMI to put a call on hold, and then either resume it, or
> perform a transfer?
> 
> On Thursday 15 July 2021 at 15:01:41, Antony Stone wrote:
> > Hi.
> > 
> > I have the following situation:
> > 
> > An Asterisk 16 server on which I have complete control of the dialplan,
> > and which has (a) a SIP trunk to a PSTN gateway provider, and (b)
> > several SIP credentials for accounts (extensions) on another Asterisk
> > server.  For this example I have SIP username and password for extension
> > 234 on that server.
> > 
> > That "other Asterisk server" is also Asterisk 16, but is a proprietary
> > PBX which I cannot even see the dialplan of, let alone modify it.  I do,
> > however, have full access to the AMI interface on that PBX, and I can
> > write scripts (eg: in Perl) on my own server and connect to the PBX's
> > AMI.
> > 
> > I get an inbound call on my SIP trunk, and I need to dial it on to
> > extension 456 on the PBX, from extension 234.  So far, so good, I can do
> > all this.  The incoming call arrives, I use the SIP credentials for
> > extension 234 to dial 456, and the call gets answered by 456, who sees
> > Caller ID 234.
> > 
> > Then I need to put 456 on hold, so that they get the hold music which is
> > configured on the (proprietary) PBX, and perhaps I then need to dial to a
> > different number from extension 234, and maybe ultimately transfer the
> > call. Alternatively, I might simply want to resume the call that was put
> > on hold.
> > 
> > Putting a call on hold and then having the option to transfer it to
> > another number is easy with a SIP phone, but I need to do it for the
> > call which my Asterisk server (acting as a SIP client to the PBX) has
> > initiated.
> > 
> > I can't do the hold function on my own Asterisk server because that would
> > not generate the correct hold music for the person on 456.
> > 
> > Also, if I transfer the call (so that 456 is now speaking to some other
> > number which I dialled whilst on hold) using my own Asterisk server, I
> > would end up with two calls in progress between my server and the PBX,
> > whereas I want the PBX to completely handle the transferred call, and
> > mine (which took the original incoming call on the SIP trunk) to have
> > nothing further to do with it.
> > 
> > I can find AMI commands such as Atxfer, BlindTransfer, and Redirect.  All
> > of these are fine if I want to actually transfer a call, but how do I
> > simply tell the proprietary PBX to put a call on hold and play the
> > configured music?
> > 
> > I hope this is clear - feel free to ask any questions if not.
> > 
> > Thanks,
> > 
> > 
> > Antony.

-- 
"this restriction will not apply in the event of the occurrence (certified by 
the United States Centers for Disease Control or successor body) of a 
widespread viral infection transmitted via bites or contact with bodily fluids 
that causes human corpses to reanimate and seek to consume living human flesh, 
blood, brain or nerve tissue and is likely to result in the fall of organized 
civilization."

 - https://aws.amazon.com/service-terms/ paragraph 42.10

                                                   Please reply to the list;
                                                         please *don't* CC me.



More information about the asterisk-users mailing list