1

I was trying to implement sip redirection. To do this I'm using javax.servlet.sip.Proxy

SipFactory sipFactory = (SipFactory) getServletContext().getAttribute(SIP_FACTORY);
Proxy proxy = request.getProxy();
proxy.setParallel(false);
proxy.setRecordRoute(true);
ArrayList uris = new ArrayList();
SipURI uri2 = sipFactory.createSipURI("48505999666", "some_host");

uris.add(uri2);
proxy.proxyTo(uris);

But in From header i got additional prefix in phone number and on my phone i can't see who is calling. Is there any way to modify From header displayName ?

Gocha
  • 33
  • 1
  • 3

1 Answers1

0

When you say an "additional prefix," do you mean that the proxy is changing the value of the From header? That sounds like incorrect proxy behavior. What is being sent by the UAC, and what is being sent by the proxy?

According to JSR-289, the From header is a system header and thus cannot be modified by a proxy. At the price of additional complexity, you could implement a back-to-back user agent (b2bua) instead.

yotommy
  • 1,472
  • 1
  • 12
  • 17
  • When I say an "additional prefix" I ment that call center add prefix for example I call form number "48505999667" and in sipUri I have "B1448505999667". And when I proxy this to another phone this prefix makes number "unknown". – Gocha Mar 11 '13 at 07:45
  • OK, so the `From` header in initial SIP request has extra characters which the UAS does not like. As stated above, a proxy cannot change the From header. Is there any other header that the UAS will inspect to determine the caller ID? – yotommy Mar 11 '13 at 13:24