Display name of dialed internal number

Hi There! I wonder if someone can help me!!

This is the scenario:
Set A name > Mister x
Set B name > Lady y

When I dial from set A to set B I see on set B display “Mister x” but on set A I only see the number I dialed and not the name “Lady y”. If I do the opposite is the same. only the destination sees the name of the originator.

Can someone point me to a way of you dial an internal extension number and on your display shows up the name of the dialed extension??

Best Regards,

Jose

How would the phone know that the number you dialed is linked to Lady y?

When you dial lady y, text dialing, then your phone would show that.

To my knowledge what you want, dialing an number but showing a name is not possible…

But I could be wrong.

Hi!!

Thanks for your answer.

In first hand the names are declared on sip.conf "callerid = “Mister x” and for the other sets also the same. What I’m looking for is a way that asterisk send back, some how, the name to the originator set.

Or another way that the set could retrieve that name; on traditional PBX things work like that and I would like to had as much features as possible so I can convince customers to change. Names is one of the features everyone likes.

Hope there is a solution since asterisk is an open source and a lot of people have this need, I think!!

Best Regards,

Jose

What version of Asterisk are you using, what is your configuration, and what devices are you using? Asterisk does support connected line updates, which tell the device who they are now talking to which updates their display. This requires either Remote-Party-ID or P-Asserted-Identity to be enabled and only works on SIP.

Hi!!!

thanks for your reply.

I’m using:

asterisk*CLI> core show version
Asterisk 14.2.1 built by root @ asterisk on a x86_64 running Linux on 2017-01-11 14:44:21 UTC

I’m using softphones and a Grandstream set GXP1405.

On sip.conf:

[general]
context=public ; Default context for incoming calls. Defaults to 'default’
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
qualify=yes
canreinvite=no

[ext7000]
type=friend
context=National_Access
callerid="Mister X"
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic
[ext7001]
type=friend
context=National_Access
callerid="Lady Y"
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic

On extensions.conf:

[phones]

exten => 7000,1,NoOp(a marcar…)
same => n,Macro(standardextensiondial,7000,SIP/ext7000) ; SIP connection

exten => 7001,1,NoOp(a marcar…)
same => n,Macro(standardextensiondial,7001,SIP/ext7001) ; SIP connection

[macro-standardextensiondial]
;
; Standard extension macro (with call forwarding):
; ${ARG2} - Device(s) to ring
; ${temp} = cfw target
; ${ARG1} = calling extension
;
;Check if CFW is configured
exten => s,1,Set(temp=${DB(CFW_ALL/${ARG1})}) ; Get CFW_ALL key, if not existing, goto next line
same => n,NoOp(CheckCallForward)
same => n,GotoIf(${temp}?:Check-BusyFWD,1)
same => n,NoOp(CallForwardActivated)
same => n,GotoIf($["${temp}"="${CALLERID(num):3}"]?No-Forward,1); if cfw target and calling are equal then allow to dial the source extension
same => n,Dial(Local/${temp}@phones,240) ; Unconditional forward
same => n,Hangup

;Check if CFW_BUSY is configured
exten => Check-BusyFWD,1,NoOp(CheckBusyFWD)
same => n,NoOp(CheckCallForwardBusy)
same => n,Set(temp=${DB(CFW_BUSY/${ARG1})}) ; Get CFW_BUSY key, if not existing, goto 105
same => n,GotoIf(${temp}?:Check-noanFWD,1)
same => n,NoOp(Busy CallForwardActivated)
same => n,Dial(Local/${temp}@phones/n) ; Forward on busy or unavailable
same => n,Hangup

;Check if CFW_NOAN is configured
exten => Check-noanFWD,1,NoOp(ChecknoanFWD)
same => n,NoOp(CheckCallForwardNoan)
same => n,Set(temp=${DB(CFW_NOAN/${ARG1})}) ; Get CFW_NOAN key, if not existing, goto 105
same => n,GotoIf(${temp}?:No-Forward,1)
same => n,NoOp(noan CallForwardActivated)
same => n,Set(CALLERID(num)=${CALLERID(num):3});gets the caller ID and removes the ext to present the correct CLID
same => n,Dial(${ARG2},20) ;dial first the estension then
same => n,Dial(Local/${temp}@phones,240) ; Forward on noan
same => n,Hangup

; No CFW key so dial the extension
exten => No-Forward,1,NoOp(Dial extension)
same => n,Set(CALLERID(num)=${CALLERID(num):3});gets the caller ID and removes the ext to present the correct CLID
same => n,Dial(${ARG2},240) ; 240sec timeout
same => n,Hangup

[Emergency]
exten => 112,1,Goto(outgoing,${EXTEN},1)
exten => _0112,1,Goto(outgoing,${EXTEN:1},1)

[Internal_Access]
include => Emergency
exten => _*[1-9].,1,Goto(phones,${EXTEN},1);features
exten => _#.,1,Goto(phones,${EXTEN},1);features
exten => _XXXX,1,Goto(phones,${EXTEN},1);internal extensions
exten => _*01XXXX,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _[Ee][x][t]X.,1,Goto(phones,${EXTEN:3},1);internal extensions
[Local_Access]
include => Emergency
include => Internal_Access
exten => _022.,1,Goto(outgoing,${EXTEN:1},1)
exten => _*01022.,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*02022.,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*03022.,1,Goto(features,${EXTEN},1) ; callforward to external numbers
[National_Access]
include => Emergency
include => Internal_Access
include => Local_Access
exten => _0[1-9].,1,Goto(outgoing,${EXTEN:1},1)
exten => _*010[1-9].,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*020[1-9].,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*030[1-9].,1,Goto(features,${EXTEN},1) ; callforward to external numbers

[International_Access]
include => Emergency
include => Internal_Access
include => Local_Access
include => National_Access
exten => _000.,1,Goto(outgoing,${EXTEN:1},1)
exten => _*01000.,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*02000.,1,Goto(features,${EXTEN},1) ; callforward to external numbers
exten => _*03000.,1,Goto(features,${EXTEN},1) ; callforward to external numbers

Best Regards,

Jose

The option to send RPID or PAI is not enabled, so it would not be able to send an update. It can be enabled by using “sendrpid=yes” in each friend section.

Sorry!!!
When you say "friend secttion is like this:

[ext7000]
type=friend
sendrpid=yes
context=National_Access
callerid="Mister X"
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic

Best Regards,

Jose

Yes, just like that.

Hi!!!
Tried but no luck.

The destination set has the name but the originator doesn’t see the name.
This is the sip trace of the invite from the 7001 to the 7000 set:

2017/02/24 12:04:37.858925 10.15.101.125:5060 -> 10.15.101.111:53071
INVITE sip:ext7000@10.15.101.111:53071;rinstance=061bec11ccaff80c SIP/2.0
Via: SIP/2.0/UDP 10.15.101.125:5060;branch=z9hG4bK729cd310
Max-Forwards: 70
From: “Lady Y” sip:7001@10.15.101.125;tag=as0d094e89
To: sip:ext7000@10.15.101.111:53071;rinstance=061bec11ccaff80c
Contact: sip:7001@10.15.101.125:5060
Call-ID: 183fe70574ce11c734e429f8562e8de6@10.15.101.125:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 14.2.1
Date: Fri, 24 Feb 2017 12:04:37 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: “Lady Y” sip:7001@10.15.101.125;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 1896380261 1896380261 IN IP4 10.15.101.125
s=Asterisk PBX 14.2.1
c=IN IP4 10.15.101.125
t=0 0
m=audio 14520 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv

I can see the Remote-Party-ID but the original set display does not show um the name Mister X.
Is there any other configuration needed?

Best Regards,

Jose

Your log is incomplete. After answer you should see a re-invite to the caller and update with the name.

Hi,

Here’s how I did it in PJSIP:

You can create a function to look up the name associated with the phone number you dial and then
use the function connectedline.I’ve been using this for years and it’s working great.
I have added 2 columns called phone_name and extension in ps_endpoints for looking up the name but you could do it by simply looking up the callerid of the callee. The I option with Dial , asterisk will ignore any connected line update It’s basically a way of forcing the update I guess.

exten => 2233,1,NoOp()
same => n,Set(Calee_Aste=${GET_CALLEE_NAME_ASTERISK(${EXTEN})})
same => n,Set(CONNECTEDLINE(all,i)="${Calee_Aste} <${EXTEN}>")
same => n,Dial(PJSIP/2233,15,I)
same => n,Hangup()

;Function in func_odbc
[CALLEE_NAME_ASTERISK]
prefix=GET
dsn=asterisk
readsql=SELECT phone_name FROM ps_endpoints WHERE extension = ‘${ARG1}’

traceSIP_Name.txt (41.7 KB)

Hi!!

In attach is the complete trace of the two calls and no name on the originator.

Best Regards,

Jose

Have you put sendrpid on both?

Yes!! :slight_smile:

[ext7000]
type=friend
context=National_Access
callerid="Mister X"
sendrpid=yes
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic
[ext7001]
type=friend
context=National_Access
callerid="Lady Y"
sendrpid=yes
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic
[ext7010]
type=friend
context=National_Access
callerid="Boss"
sendrpid=yes
Callgroup=1
pickupgroup=1
allow=alaw,ulaw
secret=12345678
host=dynamic

Is there a number in your callerid value in sip.conf or is it just a name like it is here?

It’s exactly like you see there.

Best Regards,

Jose

Add a number to each callerid as well.

callerid="Boss" <1234>

For example.

That’s it.

Thanks :slight_smile:

But this only appears after connection.

Is there a way to show the name during the ring time?

Best Regards,

Jose

You can try enabling “rpid_update=yes” which will attempt to use an UPDATE to convey the information earlier, but it may or may not work depending on the endpoint.

on each friend section, also?