[asterisk-dev] Sending control frame outside a call
wferrell1 at nc.rr.com
wferrell1 at nc.rr.com
Wed Nov 9 13:11:49 CST 2016
Hi,
I have a customer who is running 12.8.2 and since their software needs to be certified at considerable expense and time will not be upgrading Asterisk anytime soon. In addition due to security requirements the only connection between their Asterisks is a single IAX2 peer. They would like to support BFCP (Binary Floor Control Protocol – RFC 4582). The issue is BFCP sends information in the SIP SDP such as TCP connection and port info and then assumes the two endpoints have set up a socket between them to exchange BFCP protocol messages. I am not allowed to open a direct socket between the BFCP endpoints due to security concerns, all traffic, signaling, messaging must go over the single IAX2 connection. So I can open a socket from asterisk to the BFCP client/server using the port information received the SIP SDP. Then the BFCP endpoint sends the protocol message to the asterisk and I need to send it across the IAX2 connection to the other asterisk who will then send it on to its intended destination. What I am trying to do is create a new ast_control_frame_type and send the BFCP protocol message as data in a control frame. The problem I am running into is determining how to send a message to a peer outside a call. All the methods I have found such as ast_queue_control_data assume an active call that has been bridged. I also tried to use the socket send method using the sockfd defined in the iax2_peer structure, but it returned a -1. So what I am looking for is the base methods for sending/reading data to/from an IAX2 peer. Is this possible? If so, can anyone point me to some code that does what I want?
Thanks, Wray
More information about the asterisk-dev
mailing list