[asterisk-dev] Channels in a bridge
Wray Ferrell
wferrell1 at nc.rr.com
Fri Jun 2 07:17:45 CDT 2017
Hi,
Is there anyway for a channel to know the other channels in their
current bridge? The reason I ask is I have a customer application that
negotiates a port using the SIP SDP for out of call signalling using
UDP. For security purposes they want to route all traffic through their
box which is running Asterisk instead of allowing the two phones to set
up a direct socket between them. In other words both phones will
negotiate a port with Asterisk and I need to take the incoming message
from phone A and send it on the Phone B. So I added some fields to the
configuration file and now Asterisk is listening on the negotiated ports
for incoming messages. The problem is since the message is out of the
call I get just the data and the IP address/Port it was sent from. Since
I saved the negotiated port in the sip_pvt structure, I can iterate over
all the active dialogs to get the sip_pvt structure for the channel, but
I don't know how to reach the other channel in the call. It seems to me
that writing my own channel tech doesn't help because of the lack of a
call-id associated with the message so I was hoping to piggyback on the
existing call by stuffing the data in a SIP info messge and calling
__sip_xmit with the sip_pvt pointer for the other call leg. Or maybe
there is a more elegant way to solve this issue?
Thanks, Wray
More information about the asterisk-dev
mailing list