Create softphone answer button using AMI bridge action

What I actually want to do is, for example, I have a Polycom SoundPoint IP 330 model phone and I registered it to asterisk. And I want to control the channel of this registered phone with AMI web application. The controls can be defined as dialing, answering, hanging up, attended transfer, blind transfer, queue login, queue logout, pause, unpause. I think I actually made the functions except for answering calls. There is also the fact that the originate action works a little strangely for dialing.

Recording or queue control is controlled by the dial plan. It was simply an application name for example.

Could you give me an example of SIP NOTIFY to answer? The hard phone that I can use is Polycom’s SoundPoint IP 330 model, Audiocodes’ 420HD IP Phone model, and Stonehenge’s IP255GL model.

As mentioned, not every phone manufacturer supports this. Even the ones that do, have different expectations.

Looks like Poly and Audiocodes support the ‘talk’ event.

See page 112 https://www.audiocodes.com/media/13482/400hd-series-ip-phone-administrators-manual-ver-2216.pdf

Isn’t the 330 a rather old model?

Yes, it is. But I only have this.

The obvious way (to me) would be to have the softphone permanently on a call to a bridge, and then attach other channels to that bridge and detach and hang them up when done.

wow! Thank you. I’ll have to try it right away.

I don’t understand permanently on a call to a bridge. How can I do it?

An example would be dialing into a conference and never leaving it.

There used to be Agent channels which, although they didn’t hold you on a bridge did involve a long time call from the phone, on which multiple incoming calls were presented. I never got round to investigating the agent pool feature that replaced it, but that might still be able to do something similar.

Thank you for telling me. I’m trying the sip notify approach.

I have sent an action in the format below to use the PJSIPNotify action of AMI.
but, I got a 501 Not Implemented SIP response.
(1102 made an internal call to 1101 and sent an action while 1101 was ringing.)

Action: PJSIPNotify
Channel: PJSIP/1101-00000033
Variable: Event=talk
Call-ID: 3436c78f-29a7-4673-b9c2-7bd841957dbe

Although the types of phones are limited, I have finally completed the answering function. Thank you everyone.

function answerCall() {
const apiUrl = ‘https://192.168.1.XXX/manager’;
const params = new URLSearchParams({
action: ‘PJSIPNotify’,
channel: answerChannel,
variable: ‘Event=talk’
});
fetch(${apiUrl}?${params})
.then(response => {
if (!response.ok) {
throw new Error(‘Failed to answer call’);
}
})
.catch(error => {
console.error(error);
});
};

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.