Altering "From" header

I would like to ask if there is a way to change the “From” header when doing Dial().
You see - I have Asterisk and three UAs. One is a bit more specific UA, that does some call processing and is based on SofiaSIP stack.

This is one possible situation:

p1 -> asterisk -> p2 -> asterisk -> p3

p1 and p3 are ordinary UAs registered with asterisk
p2 is that special UA

Asterisk is configured to redirect all incomming calls to p2 for processing.
p2 should answer the call, make the call to p3 and internally join the media streams to ‘create’ media stream between p1 and p3.

I can do this without problems, but p3 sees that p2 is calling. I want p3 to see that p1 is calling so that no one knows that p2 is in between.

I see two possible solutions:

  1. make the p2 alter the ‘From’ header to act as p1.
  • this I have done but that triggered 407 Proxy authentication. And as I understand it correctly, I would have to have password of the p1 to force Asterisk to Dial p3. (Not that I don’t have the password, but this seems to be very clumsy)
  1. Make Asterisk change the ‘From’ header. I can supply the correct ‘From’ to Asterisk using custom headers, but I don’t have an idea how to tell Asterisk to use it.

If you can think of other way to accomplish what I need or if you know how to Dial with different ‘From’, please tell me…


bump… anyone have an idea?