FRWI
October 18, 2023, 9:43am
1
Good morning,
I’m trying to be able to recover the endpoint that answered when I run a dial with several endpoints in it:
Dial(${PJSIP_DIAL_CONTACTS(111)}&${PJSIP_DIAL_CONTACTS(123)}&${PJSIP_DIAL_CONTACTS(122)}&${PJSIP_DIAL_CONTACTS(321)},30)
I think this can be done by a macro but I can’t seem to find what to call or search to find the endpoint that answered the call
Any ideas ?
Thanks
jcolp
October 18, 2023, 10:35am
2
The dialplan variable “DIALEDPEERNAME” gets set on the calling party channel with the answered peer name.
FRWI
October 18, 2023, 12:25pm
3
How can I get it back?
I tried with option G in dial function but the call is completely redirected and communication between the two parties does not take place.
jcolp
October 18, 2023, 12:26pm
4
Get it back… when and where?
You’d need to call Bridge. Note that bridge continues after the other party clears, like with “g” on Dial. However, I think you have missed a step in explaining your configuraton.
FRWI
October 18, 2023, 12:33pm
6
I would like to store the endpoint which answered the call (in DB for example)
jcolp
October 18, 2023, 12:36pm
7
Use a hangup handler[1] on the calling channel, which then stores it however is needed at the end of the call. Unless you want to store it when the call is answered (you haven’t specified which is why I asked when), then I don’t know off the top of my head.
[1] Hangup Handlers - Asterisk Documentation
FRWI
October 18, 2023, 12:43pm
8
Sorry,
Indeed, recovering it with the h extensions remains the simplest option.
I would have liked to be able to retrieve it directly after the call was answered but I think I can get by with that
If you have an idea to recover it after answering and during the call, I’m always interested, it could be useful to me later
Thanks
jcolp
Split this topic
November 13, 2023, 4:12pm
9
A post was split to a new topic: Incoming calls fail (FreePBX)