how to display caller ID with only number instead of ip ?

Catalog of dial plans
Post Reply
qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

how to display caller ID with only number instead of ip ?

Post by qubo » Wed Feb 11, 2015 9:18 pm

HI. my polycom phone is displaying the caller ID as sip.+5233xxxxxxx@97.xxx.xx.xx , how I can make to display only the phone number ?

here my incoming dialplan

Code: Select all

sysEmail_1 = [ "ubj9BBv8PuvLUxxxx@api.pushover.net", "ANTUA Bloqueando a", " #{req.Header.From.FromURI.User}." ] #Blocking configs
 
sysEmail_2 = [ "ubj9BBv8PuvLUFVxx@api.pushover.net", "Transfiriendo a papa", " #{req.Header.From.FromURI.User}." ] #transfer configs
     
sysEmail_3 = [ "ubj9BBv8PuvLUFV5ydscgjxxx@api.pushover.net", "ANTUA al buzon ", " #{req.Header.From.FromURI.User}." ] #voicemail configs
     
sysEmail_Generic = [ "ubj9BBv8PuvLUFV5yxxxxxx@api.pushover.net", "ANTUA Recibiendo Llamada de ", " #{req.Header.From.FromURI.User}." ] #all incomings withou routes

sysEmail_Evernote = [ "jcox@m.evernote.com", "ANTUA Recibiendo Llamada de ", " #{req.Header.From.FromURI.User}." ] #all incomings withou routes

sys.Log("Incoming call from #{req.Header.From.FromURI.ToString()}.")

case req.Header.from.FromURI.User.to_s
 
   #BLACKLIST
   when /^5289\d{8}/ then
      sys.Email(*sysEmail_1)
      sys.Respond(403, "Forbidden")
   when /^523336470738/ then
      sys.Email(*sysEmail_1)
      sys.Respond(403, "Forbidden")
   when /^523334698588/ then
      sys.Email(*sysEmail_1)
      sys.Respond(403, "Forbidden")
   when /^523339xxxxxx0/ then
      sys.Email(*sysEmail_1)
      sys.Respond(403, "Forbidden")
   
   #PAPALIST
   when /^523339490001/ then
      sys.Email(*sysEmail_2)
      sys.Dial("pbxxx@sipsorcery.com")
   when /^523343324/ then
      sys.Email(*sysEmail_2)
      sys.Dial("pxxx@sipsorcery.com")
   when /^52222\d{7}/ then
      sys.Email(*sysEmail_2)
      sys.Dial("pbxxx@sipsorcery.com")

   #VOICEMAIL
   when /^522243324/ then
      sys.Email(*sysEmail_3)
      sys.Email(*sysEmail_Evernote)
      sys.Dial("177xxxxx@in.callcentric.com")
   when /^5288\d{8}/ then
      sys.Email(*sysEmail_3)
      sys.Email(*sysEmail_Evernote)
      sys.Dial("17772492773@in.callcentric.com")
   when /^000000000000/ then
      sys.Email(*sysEmail_3)
      sys.Email(*sysEmail_Evernote)
      sys.Dial("177xxx3@in.callcentric.com")
   
   # ALL OTHERS
   else
      sys.Email(*sysEmail_Generic)
      sys.Email(*sysEmail_Evernote)
      sys.Dial("12xxxx@sipsorcery.com&12xxx@sipsorcery.com&33xxx@sipsorcery.com[dt=2,cd=260]&1777xxxx@in.callcentric.com[dt=50]")
   
end

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: how to display caller ID with only number instead of ip

Post by Aaron » Thu Feb 12, 2015 10:14 am

It depends on whether your Polycom will prioritise certain parts of the From header when it displays the caller ID. Try the change below and see if the Polycom displays thing any differently.

Code: Select all

sys.Dial("12xxxx@sipsorcery.com&12xxx@sipsorcery.com&33xxx@sipsorcery.com[dt=2,cd=260,fd=#{req.Headers.From.DisplayName}]&1777xxxx@in.callcentric.com[dt=50]")

qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

Re: how to display caller ID with only number instead of ip

Post by qubo » Thu Feb 12, 2015 4:25 pm

thanks

Didn't work and as plus the incoming calls didnt go thru. and caller listen one ring and then nothing

qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

Re: how to display caller ID with only number instead of ip

Post by qubo » Thu Feb 12, 2015 5:26 pm

I am testing this


Re: Incoming calls always prefixed "sip:" [ New ]
Options
‎02-25-2013 09:12 PM

Hi,

My generated <mac>-phone.cfg file doesn't have this feature.urlDial parameter. I use 4.0.2B software version. Did I miss anything?

Also, I found out that if I use reg.1.server.1.address="myserver.domain.com" hostname, it will prepend "sip:" for Missed and Received calls. If I use ip address for this field like reg.1.server.1.address="xxx.xxx.xxx.xxx", it will not prepend "sip:". Please advise the reason. Unfortunately, our auto provisioning tool always use hostname. How do I get around it without urlDial parmater?

thanks,

dc

qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

Re: how to display caller ID with only number instead of ip

Post by qubo » Thu Feb 12, 2015 5:50 pm

Didn't work also

qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

Re: how to display caller ID with only number instead of ip

Post by qubo » Fri Feb 13, 2015 10:24 pm

it seems this work.....

sys.Dial("xxxx@local[fd=#{req.Header.From.FromURI.User}]&xxxx@local[fd=#{req.Header.From.FromURI.User}]

User avatar
Flip
Posts: 95
Joined: Sun Aug 19, 2012 3:53 am

Re: how to display caller ID with only number instead of ip ?

Post by Flip » Mon May 23, 2016 1:20 pm

G'day,
This is something I am interested in too.
Instead of showing CID of in/out-bound calls as "UserName", it would be great to display "+61298765432" or "0298765432" instead. Or even "Display Name" as DID and address (SIP URI) - e.g. "+61299998888" <UserName@sipsorcery.com> etcetera.

Also, when an inbound call comes in, I also want to see the CID instead of the IP address or SIP Sorcery user name! We need to be able to specify the DID for our accounts AND display the CID so we can call them back!

Can someone give me a hand with this? Appreciate it! :)

1. Inbound Calls: Display the number that was dialed by the caller (e.g. instead of "UserName", display: "0299998888") in the log. (Primary issue)
2. Outbound Calls: Display the VSP's CID that was used (matched outbound dial plan pattern) - "req.Header.From.ToString" from outbound dial plan. Calling another SIP Sorcery account, seems to only show SIP Sorcery account name and not CID...
3. SIPSorcery Account: Change account to include both user name and custom/chosen DID in Caller ID - "099998888" <UserName@xxxxxxxxx>

4. What is the difference between @sipsorcery.com and @local?
Is this the inbound rule being used to fix the CID & URI?

Code: Select all

sys.Dial("xxxx@local[fd=#{req.Header.From.FromURI.User}]&xxxx@local[fd=#{req.Header.From.FromURI.User}]
EDIT: Nope. Only shows the User Name (outbound) and DID of caller (inbound)... :\ :/

Thanks guys! :wink:
Last edited by Flip on Mon May 23, 2016 6:16 pm, edited 1 time in total.
ISP: Southern Phone ADSL2+ $55 Bundle. 22.4/1.2Mbps, GB Bundle [Telstra].
VSP: SIPTalk¹, Symbio² & MyNetFone³ via SIPSorcery Cloud PBX. [Warning! Avoid DIDLogic!!! Beware!!]
H/W: Asus RT-AC86U; Cisco SPA232D, 2 x SPA901's, SPA3102; Yealink SIP-T46G.

User avatar
Flip
Posts: 95
Joined: Sun Aug 19, 2012 3:53 am

Re: how to display caller ID with only number instead of ip ?

Post by Flip » Mon May 23, 2016 6:03 pm

This is as much as I can work out. There are no doubt more that I am missing, plus better ways to return more fields dependant on which direction (in/out-bound). Several of the fields below are blank. You would have to test with your configuration before removing them.
I hope this is helpful to others.

If anyone wants to share their debug / diagnostics template, please post! :)
Cheers,


Image

Code: Select all

# OUTBOUND DIAGNOSTICS
sys.Log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")
sys.Log("+         NEW OUTBOUND CALL INITIATED!   OUTBOUND CALL LEG INFORMATION!         +")
sys.Log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")
sys.Log("o: req.URI: #{req.URI} // req.URI.User: #{req.URI.User} // req.URI.User.to_s: #{req.URI.User.to_s{}}...")
sys.Log("o: req.URI.Host: #{req.URI.Host} // req.Header: #{req.Header} ...")
sys.Log("o: req.URI.ToString: #{req.URI.ToString{}} // req.URI.Host.to_s: #{req.URI.Host.to_s}...")
sys.Log("o: req.Header.From: #{req.Header.From} // ...")
sys.Log("o: req.Header.From.FromURI: #{req.Header.From.FromURI} // ...")
sys.Log("o: req.Header.From.FromName: #{req.Header.From.FromName} // ...")
sys.Log("o: req.Header.From.ToString: #{req.Header.From.ToString()} // ...")
sys.Log("o: req.Header.To: #{req.Header.To} // ...")
sys.Log("o: req.Header.To.ToURI: #{req.Header.To.ToURI} // req.Header.To.ToName: #{req.Header.To.ToName} ...")
sys.Log("o: req.Header.Contact[0]: #{req.Header.Contact[0]} // ...")
sys.Log("o: req.Header.Contact[0].ContactURI: #{req.Header.Contact[0].ContactURI} ...")
sys.Log("o: req.Header.Contact[0].ContactName: #{req.Header.Contact[0].ContactName} // ...")
sys.Log("o: req.Header.CSeq: #{req.Header.CSeq} // req.Header.CallId: #{req.Header.CallId} ...")
sys.log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")

Image

Code: Select all

# INBOUND DIAGNOSTICS
sys.Log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")
sys.Log("+          NEW INBOUND CALL INITIATED!   INBOUND CALL LEG INFORMATION!          +")
sys.Log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")
sys.Log("i: req.URI: #{req.URI} // req.URI.Host: #{req.URI.Host} // req.URI.Host.to_s: #{req.URI.Host.to_s} ...")
sys.Log("i: req.URI.User: #{req.URI.User} // req.URI.User.to_s: #{req.URI.User.to_s{}} ...")
sys.Log("i: req.URI.ToString: #{req.URI.ToString{}} ...")
sys.Log("i: req.Header: #{req.Header} // ...")
sys.Log("i: req.Header.From: #{req.Header.From} // ...")
sys.Log("i: req.Header.From.FromURI: #{req.Header.From.FromURI} // ...")
sys.Log("i: req.Header.From.FromName: #{req.Header.From.FromName} // ...")
sys.Log("i: req.Header.From.ToString: #{req.Header.From.ToString()} // ...")
sys.Log("i: req.Header.To: #{req.Header.To} // ...")
sys.Log("i: req.Header.To.ToURI: #{req.Header.To.ToURI} // req.Header.To.ToName: #{req.Header.To.ToName} ...")
sys.Log("i: req.Header.Contact[0]: #{req.Header.Contact[0]} // ...")
sys.Log("i: req.Header.Contact[0].ContactURI: #{req.Header.Contact[0].ContactURI} ...")
sys.Log("i: req.Header.Contact[0].ContactName: #{req.Header.Contact[0].ContactName} // ...")
sys.Log("i: req.Header.CSeq: #{req.Header.CSeq} // req.Header.CallId: #{req.Header.CallId} ...")
sys.log("+ - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +")
ISP: Southern Phone ADSL2+ $55 Bundle. 22.4/1.2Mbps, GB Bundle [Telstra].
VSP: SIPTalk¹, Symbio² & MyNetFone³ via SIPSorcery Cloud PBX. [Warning! Avoid DIDLogic!!! Beware!!]
H/W: Asus RT-AC86U; Cisco SPA232D, 2 x SPA901's, SPA3102; Yealink SIP-T46G.

Post Reply