CallerId unavailable

Hello.
People connected to Asterisk with softphones make outgoing calls. After getting connected they sometimes transfer the called party among each other within Asterisk, but the caller ID becomes unavailable. I have already asked this question, but the users are unsatisfied that they do not see caller Ids. I have tested it on myself transferring the call to my own extension. The caller ID is unavailable.

I don’t see that problem with my configurations, but I also use a softphone that does not react to updating the “conneced line”. I don’t know whether this relates to your problem, but you could post a complete SIP trace of a call, transfers included.

How do they perform the transfer?
Do they use a transfer feature in their softphones, or do they use the feature in Asterisk, like pressing ## during a call?

Do they perform an attended or unattended transfer?

What callerID would you expect the receiving party to see?
The original caller?
The party transferring the call?

Du you have a caller ID set in the softphone?
Have you configured Asterisk to allow the softphone to set the caller ID, or does Asterisk override the caller ID sent by the softphone? Does the extension in pjsip.conf/sip.conf have a caller ID configured?
Does the dialplan set a callerID when dialing extensions?

When you call internally between extensions, are caller IDs presented as expected?

If a blind transfer, and using a feature in the phone, does the phone do a true blind transfer or does it do an attended transfer and automate the completion?

This is a blind transfer (the BINDTRANSFER variable exists).

Looking at the pjsip history, the callerId becomes unavailable before making a transfer, after the initial call has been completed.
00005 1651502808 * ==> 172.XX.XX.XX:5060 INVITE sip:8XXXXXXXXXX@172.XX.XX.XX:5060 SIP/2.0
00006 1651502808 * <== 172.XX.XX.XX:5060 SIP/2.0 100 Trying
00007 1651502809 * <== 172.XX.XX.XX:5060 SIP/2.0 180 Ringing
00008 1651502809 * ==> 172.XX.XX.XX:5060 PRACK sip:8XXXXXXXXXX@172.XX.XX.XX:5060;transport=udp SIP/2.0
00009 1651502809 * ==> 10.XXX.XXX.XX:54656 SIP/2.0 180 Ringing
00010 1651502809 * <== 172.XX.XX.XX:5060 SIP/2.0 200 OK
00011 1651502810 * <== 172.XX.XX.XX:5060 SIP/2.0 200 OK
00012 1651502810 * ==> 172.XX.XX.XX:5060 ACK sip:unavailable@172.XX.XX.XX:5060;transport=udp SIP/2.0
00013 1651502810 * ==> 10.XXX.XXX.XX:54656 SIP/2.0 200 OK

Here 172.XX.XX.XXX is the endpoint IP, 10.XXX.XXX.XX is softphone subnet IP.

how is your dialplan for BINDTRANSFER

It looks like there is something wrong with the pjsip configuration.
The dialplan is simple. I just dial from the softphone. The caller ID is visible. Then for some reason the Caller ID changes to unavailable after subscribers get connected.

can you post your extensions.conf and pjsio.conf
and also asterisk + sip log for a call that show the wrong caller id

This is not the wrong caller ID. This is the “unavailable” caller ID, stemming from the contact Contact: “unavailable” sip:unavailable@172.XX.XX.XX:5060;transport=udp. This contact appears after the call is completed.
I have checked the privacy settings with both the softphone extension and the endpoint, and they are allowed_not_screened.

A Contact header should not be used for callerid information by an endpoint.

We really need to see a SIP trace with the complete message contents, otherwise it’s just you analyzing things and everyone else guessing.

What do you mean by a SIP trace? I pjsip history?

So the information you’ve provided so far is merely the exchange, but not the contents of the messages. You can either show each individual message using “pjsip show history entry” on each message, or use “pjsip set logger on” to get the messages all at once.

Here is the SIP trace. First I make a call from my soft phone a PSTN phone, then I transfer the call to myself.
2022-05-03 sip trace.txt (25.9 KB)

Whatever is at “10.137.XXX.XXX:5060” is updating the connected line information to unavailable:

P-Asserted-Identity: "unavailable" <sip:unavailable@10.230.41.20>

You can disable the acceptance of a connected line update from that endpoint by setting “trust_connected_line” to “no” on the endpoint.

Thank you a lot. This helped, althouth dialing a local number (a short number without a city code) does not work.

That option would have no effect on call routing. It merely tells Asterisk whether to ignore connected line update information from an endpoint or not. Your dialing issue is separate, and you’d need to elaborate how it doesn’t work/what happens/show console output.

Thank you. I have already change the dialplan to bring the Caller ID to the national format. Now everything works as expected.