[Freeswitch-users] how to pass arbitrary headers from A leg to B leg when bridging
Dave Horton
dave at dchorton.com
Tue Apr 12 20:49:42 MSD 2011
So I'm guessing this isn't possible without hacking the source code, which I've already done to solve my problem for now.
But I'd like to make sure there isn't a better way of doing things, and thus I'd like to revise and restate my question for clarity. First, though, let me describe what I am doing, because I think it's a not-uncommon scenario that I think would be something that others may want to do. I basically want to use FS as a simple transcoding server between two endpoints, call them A and B. Calls coming in from A will be using speex codec and I want to send them out to B using PCMU; calls coming in from B will be PCMU and I want to send them to A using speex. The FS server will be a B2BUA and will be doing transcoding only -- no authentication (and no registration). Simple, right? The only fly in the ointment is that A is authenticating calls with B by providing a Proxy-Authorization header. So I need to take the Proxy-Authorization header received on the A leg and include it on the B leg.
So far, the only way I have found to do that is to hack the code to create a new channel variable. I've done this, and it works. However, this leads me to the following questions
1) Is there a better way to do this? If there is no way to do it as a dialplan out of the box, can it be done as a script?
2) sofia has parsed all of the sip headers on the incoming invite for us, and they're all available from mod_sofia. Shouldn't those all be available to us (i.e., application developers) by some means (i.e., channel variables)?
Dave
More information about the FreeSWITCH-users
mailing list