Change SIP header (from address)


I´ve noticed that Asterisk change the SIP header when recibes an invite message from an user registered in a different server.
For example:

  • Alice is registered in AsteriskA
  • Bob is registered in AsteriskB

If Alice call Bob (sip:Bob@AsteriskB), the information about who is calling Bob is From address: Alice@AsteriskB instead of Alice@AsteriskA.
I´m running 1.2.18 and 1.4.3
Have anybody the same problem?
Any idea?

Thanks in advance

I’m not sure if Asterisk can do it, but OpenSER can definitely rewrite headers and proxy that information so it looks correct for you.

Hello RaginBajin, Thank you very much for your response, but I would like to know the reason why Asterisk changes the field FROM of the SIP Header. I only have found one more person with the same problem but he did´nt obtain response.

When the softphone of the called is ringing I can see the rigth from address with the fuction SIP_HEADER(FROM) in extensions.conf but when the sip message reach the called, this field is wrong.
With the “fromdomain” directive (sip.conf) it´s possible to change the “from domain” of the outgoing call, but this way this field have always the same value.

I´ve posted the question in astersik-bugs list. I´m waiting for a response.

I would like to know if it happens to someone more, this way I would be calmer :unamused:

thanks a lot!