Endpoint disregarding CallerID since Upgrade

Hello,

I am currently upgrading an old Asterisk13 Setup to Asterisk18. I am using a realtime setup to dynamically configure endpoints and dialplans. The setup works as far as I can register endpoints and make calls between them.

For some reason though, the Enpoints (microSIP) dont show the CallerID of the incoming call but instead there own extension number.

I definitely set the CallerID in my dialplan as I can see it in the log:
CallerID

I suspect that while migrating from chan_sip to pj_sip i missed an option or something that stops the callerid from being transmitted to the endpoint. A flag in the DB-table ps_endpoints maybe?
But for the life of me I cant find anything of the sort.
The problem is that I dont get any kind of error-message I can track down so I am a bit lost.

Any advice on how to track down this problem would be much appreciated.

Regards,
Florian Seifer

You need to show the configuration or at least the output with verbosity 3 or higher.

Hi,
thank you for taking an interest.

What part of the Config do you need? I cannot upload files as a new user.

Had to edit the output a bit for privacy reasosn:

Asterisk Ready.
    -- Executing [2538@Standort:1] Set("PJSIP/2297-1-00000000", "CHANNEL(language)=de") in new stack
    -- Executing [2538@Standort:2] NoOp("PJSIP/2297-1-00000000", "=>Einstieg in Standort-Allgemein, _.- Macro") in new stack
    -- Executing [2538@Standort:3] GotoIf("PJSIP/2297-1-00000000", "0?4:8") in new stack
    -- Goto (Standort,2538,8)
    -- Executing [2538@Standort:8] GotoIf("PJSIP/2297-1-00000000", "0?9:11") in new stack
    -- Goto (Standort,2538,11)
    -- Executing [2538@Standort:11] Set("PJSIP/2297-1-00000000", "_FromExternal=0") in new stack
    -- Executing [2538@Standort:12] Set("PJSIP/2297-1-00000000", "CALLERID(num)=2297") in new stack
    -- Executing [2538@Standort:13] NoOp("PJSIP/2297-1-00000000", "Finish if_if_StandortAllgemein_170_171") in new stack
    -- Executing [2538@Standort:14] NoOp("PJSIP/2297-1-00000000", "Finish if_StandortAllgemein_170") in new stack
    -- Executing [2538@Standort:15] NoOp("PJSIP/2297-1-00000000", "sn=>StandortAllgemein, FromExternal: 0") in new stack
    -- Executing [2538@Standort:16] AGI("PJSIP/2297-1-00000000", "/opt/asterisk/scripts/AstGetLdapValue,2297,displayName") in new stack
    -- Launched AGI Script /opt/asterisk/scripts/AstGetLdapValue
    -- <PJSIP/2297-1-00000000>AGI Script /opt/asterisk/scripts/AstGetLdapValue completed, returning 0
    -- Executing [2538@Standort:17] GotoIf("PJSIP/2297-1-00000000", "0?18:19") in new stack
    -- Goto (Standort,2538,19)
    -- Executing [2538@Standort:19] NoOp("PJSIP/2297-1-00000000", "Finish if_StandortAllgemein_172") in new stack
    -- Executing [2538@Standort:20] Set("PJSIP/2297-1-00000000", "CALLERID(name)=Florian Seifer") in new stack
    -- Executing [2538@Standort:21] GotoIf("PJSIP/2297-1-00000000", "0?22:23") in new stack
    -- Goto (Standort,2538,23)
    -- Executing [2538@Standort:23] NoOp("PJSIP/2297-1-00000000", "Finish if_StandortAllgemein_173") in new stack
    -- Executing [2538@Standort:24] Set("PJSIP/2297-1-00000000", "ZIEL=2538") in new stack
    -- Executing [2538@Standort:25] Gosub("PJSIP/2297-1-00000000", "ast-redirect,~~s~~,1(2538)") in new stack
    -- Executing [~~s~~@ast-redirect:1] MSet("PJSIP/2297-1-00000000", "LOCAL(ziel)=2538") in new stack
    -- Executing [~~s~~@ast-redirect:2] AGI("PJSIP/2297-1-00000000", "/opt/asterisk/scripts/AstRedirect,2538") in new stack
    -- Launched AGI Script /opt/asterisk/scripts/AstRedirect
    -- <PJSIP/2297-1-00000000>AGI Script /opt/asterisk/scripts/AstRedirect completed, returning 0
    -- Executing [~~s~~@ast-redirect:3] NoOp("PJSIP/2297-1-00000000", "sn=>Ergebnis: ") in new stack
    -- Executing [~~s~~@ast-redirect:4] GotoIf("PJSIP/2297-1-00000000", "1?5:6") in new stack
    -- Goto (ast-redirect,~~s~~,5)
    -- Executing [~~s~~@ast-redirect:5] Set("PJSIP/2297-1-00000000", "REDIRECTNUMBER=") in new stack
    -- Executing [~~s~~@ast-redirect:6] NoOp("PJSIP/2297-1-00000000", "Finish if_ast-redirect_12") in new stack
    -- Executing [~~s~~@ast-redirect:7] GotoIf("PJSIP/2297-1-00000000", "0?8:16") in new stack
    -- Goto (ast-redirect,~~s~~,16)
    -- Executing [~~s~~@ast-redirect:16] NoOp("PJSIP/2297-1-00000000", "Finish if_ast-redirect_13") in new stack
    -- Executing [~~s~~@ast-redirect:17] Return("PJSIP/2297-1-00000000", "") in new stack
    -- Executing [2538@Standort:26] GotoIf("PJSIP/2297-1-00000000", "0?27:34") in new stack
    -- Goto (Standort,2538,34)
    -- Executing [2538@Standort:34] NoOp("PJSIP/2297-1-00000000", "sn=>Intern=>Main") in new stack
    -- Executing [2538@Standort:35] NoOp("PJSIP/2297-1-00000000", "sn=>CALLERID(num): 2297") in new stack
    -- Executing [2538@Standort:36] NoOp("PJSIP/2297-1-00000000", "sn=>CALLERID(name): Florian Seifer") in new stack
    -- Executing [2538@Standort:37] NoOp("PJSIP/2297-1-00000000", "sn=>Absprung in Main Context") in new stack
    -- Executing [2538@Standort:38] NoOp("PJSIP/2297-1-00000000", "sn=>--------------------------------------------------------------------------------------------") in new stack
    -- Executing [2538@Standort:39] Goto("PJSIP/2297-1-00000000", "Main,2538,1") in new stack
    -- Goto (Main,2538,1)
    -- Executing [2538@Main:1] NoOp("PJSIP/2297-1-00000000", "sn=>Wahl nach Intern") in new stack
    -- Executing [2538@Main:2] NoOp("PJSIP/2297-1-00000000", "sn=>FromExternal: 0") in new stack
    -- Executing [2538@Main:3] Gosub("PJSIP/2297-1-00000000", "-dial,~~s~~,1(2538)") in new stack
    -- Executing [~~s~~@-dial:1] MSet("PJSIP/2297-1-00000000", "LOCAL(ziel)=2538") in new stack
    -- Executing [~~s~~@-dial:2] NoOp("PJSIP/2297-1-00000000", "sn=>-dial zu 2538") in new stack
    -- Executing [~~s~~@-dial:3] NoOp("PJSIP/2297-1-00000000", "sn=>DeviceState 2538-0: UNAVAILABLE") in new stack
    -- Executing [~~s~~@-dial:4] NoOp("PJSIP/2297-1-00000000", "sn=>DeviceState 2538-1: NOT_INUSE") in new stack
    -- Executing [~~s~~@-dial:5] NoOp("PJSIP/2297-1-00000000", "sn=>DeviceState 2538-2: UNAVAILABLE") in new stack
    -- Executing [~~s~~@-dial:6] Set("PJSIP/2297-1-00000000", "db_base=/phones/2538") in new stack
    -- Executing [~~s~~@-dial:7] Set("PJSIP/2297-1-00000000", "vm_status=") in new stack
    -- Executing [~~s~~@-dial:8] NoOp("PJSIP/2297-1-00000000", "sn=>db_base: /phones/2538") in new stack
    -- Executing [~~s~~@-dial:9] NoOp("PJSIP/2297-1-00000000", "sn=>DB-multiline: ") in new stack
    -- Executing [~~s~~@-dial:10] NoOp("PJSIP/2297-1-00000000", "sn=>vm_status: ") in new stack
    -- Executing [~~s~~@-dial:11] GotoIf("PJSIP/2297-1-00000000", "0?12:20") in new stack
    -- Goto (-dial,~~s~~,20)
    -- Executing [~~s~~@-dial:20] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_56") in new stack
    -- Executing [~~s~~@-dial:21] GotoIf("PJSIP/2297-1-00000000", "0?22:26") in new stack
    -- Goto (-dial,~~s~~,26)
    -- Executing [~~s~~@-dial:26] Set("PJSIP/2297-1-00000000", "PJSIP_HEADER(add,Alert-Info)=<http://nohost>") in new stack
    -- Executing [~~s~~@-dial:27] Set("PJSIP/2297-1-00000000", "PJSIP_HEADER(add,info)=alert-internal") in new stack
    -- Executing [~~s~~@-dial:28] Set("PJSIP/2297-1-00000000", "PJSIP_HEADER(add,x-line-id)=0") in new stack
    -- Executing [~~s~~@-dial:29] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_57") in new stack
    -- Executing [~~s~~@-dial:30] GotoIf("PJSIP/2297-1-00000000", "0?31:68") in new stack
    -- Goto (-dial,~~s~~,68)
    -- Executing [~~s~~@-dial:68] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_58") in new stack
    -- Executing [~~s~~@-dial:69] GotoIf("PJSIP/2297-1-00000000", "0?70:73") in new stack
    -- Goto (-dial,~~s~~,73)
    -- Executing [~~s~~@-dial:73] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_64") in new stack
    -- Executing [~~s~~@-dial:74] GotoIf("PJSIP/2297-1-00000000", "0?75:85") in new stack
    -- Goto (-dial,~~s~~,85)
    -- Executing [~~s~~@-dial:85] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_65") in new stack
    -- Executing [~~s~~@-dial:86] Set("PJSIP/2297-1-00000000", "vm_timeout=0") in new stack
    -- Executing [~~s~~@-dial:87] GotoIf("PJSIP/2297-1-00000000", "0?88:89") in new stack
    -- Goto (-dial,~~s~~,89)
    -- Executing [~~s~~@-dial:89] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_68") in new stack
    -- Executing [~~s~~@-dial:90] NoOp("PJSIP/2297-1-00000000", "sn=>vm_timeout: 0 Sekunden") in new stack
    -- Executing [~~s~~@-dial:91] Set("PJSIP/2297-1-00000000", "DialString=Local/2538@Dial2Internal") in new stack
    -- Executing [~~s~~@-dial:92] GotoIf("PJSIP/2297-1-00000000", "0?93:104") in new stack
    -- Goto (-dial,~~s~~,104)
    -- Executing [~~s~~@-dial:104] NoOp("PJSIP/2297-1-00000000", "Finish if_-dial_69") in new stack
    -- Executing [~~s~~@-dial:105] NoOp("PJSIP/2297-1-00000000", "sn=> Vor Dial") in new stack
    -- Executing [~~s~~@-dial:106] NoOp("PJSIP/2297-1-00000000", "sn=> Dialstring: Local/2538@Dial2Internal, vm_timeout: 0") in new stack
    -- Executing [~~s~~@-dial:107] GotoIf("PJSIP/2297-1-00000000", "1?108:110") in new stack
    -- Goto (-dial,~~s~~,108)
    -- Executing [~~s~~@-dial:108] Dial("PJSIP/2297-1-00000000", "Local/2538@Dial2Internal") in new stack
    -- Called Local/2538@Dial2Internal
    -- Executing [2538@Dial2Internal:1] NoOp("Local/2538@Dial2Internal-00000000;2", "sn=>Dial2Internal-Context") in new stack
    -- Executing [2538@Dial2Internal:2] Dial("Local/2538@Dial2Internal-00000000;2", "PJSIP/2538-0&PJSIP/2538-1&PJSIP/2538-2") in new stack
[Jun 18 09:51:46] ERROR[92515]: res_pjsip.c:4006 ast_sip_create_dialog_uac: Endpoint '2538-0': Could not create dialog to invalid URI '2538-0'.  Is endpoint registered and reachable?
[Jun 18 09:51:46] ERROR[92515]: chan_pjsip.c:2656 request: Failed to create outgoing session to endpoint '2538-0'
[Jun 18 09:51:46] WARNING[92553][C-00000001]: app_dial.c:2598 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Jun 18 09:51:46] ERROR[92515]: res_pjsip.c:4006 ast_sip_create_dialog_uac: Endpoint '2538-2': Could not create dialog to invalid URI '2538-2'.  Is endpoint registered and reachable?
[Jun 18 09:51:46] ERROR[92515]: chan_pjsip.c:2656 request: Failed to create outgoing session to endpoint '2538-2'
[Jun 18 09:51:46] WARNING[92553][C-00000001]: app_dial.c:2598 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
    -- Called PJSIP/2538-1
    -- PJSIP/2538-1-00000001 is ringing
    -- Local/2538@Dial2Internal-00000000;1 is ringing
  == Spawn extension (-dial, ~~s~~, 108) exited non-zero on 'PJSIP/2297-1-00000000'
    -- Executing [h@-dial:1] Goto("PJSIP/2297-1-00000000", "9991") in new stack
    -- Goto (-dial,h,9991)
    -- Executing [h@-dial:9991] Set("PJSIP/2297-1-00000000", "~~parentcxt~~=Main") in new stack
    -- Executing [h@-dial:9992] GotoIf("PJSIP/2297-1-00000000", "0?9996") in new stack
    -- Executing [h@-dial:9993] GotoIf("PJSIP/2297-1-00000000", "1?9994:9996") in new stack
    -- Goto (-dial,h,9994)
    -- Executing [h@-dial:9994] StackPop("PJSIP/2297-1-00000000", "") in new stack
  == Spawn extension (Dial2Internal, 2538, 2) exited non-zero on 'Local/2538@Dial2Internal-00000000;2'
    -- Executing [h@-dial:9995] Goto("PJSIP/2297-1-00000000", "Main,h,1") in new stack
    -- Goto (Main,h,1)
    -- Executing [h@Main:1] GotoIf("PJSIP/2297-1-00000000", "0?2:6") in new stack
    -- Goto (Main,h,6)
    -- Executing [h@Main:6] NoOp("PJSIP/2297-1-00000000", "Finish if_Base_160") in new stack
    -- Executing [h@Main:7] NoOp("PJSIP/2297-1-00000000", "sn=>Gespraech beendet") in new stack
    -- Executing [h@Main:8] NoOp("PJSIP/2297-1-00000000", "sn=>FromExternal: 0") in new stack
    -- Executing [h@Main:9] NoOp("PJSIP/2297-1-00000000", "sn=>DIALSTATUS: CANCEL") in new stack

What is this? Looks like a Rube Goldberg machine to me. You need to isolate the problem. Call Dial() with the simplest arguments. If that works you can then start to make it more complicated.

Anyway, it starts with a basic problem when you look at the error messages “Is endpoint registered and reachable?” I.e. have you actually checked that your softphones are registered or online?

The Endpoint 2538-1 is ringing, the other two are not online.

Ill try to test it with a simpler dialplan but my question remains, is there a configuration I need to check to ensure that PJSip transmits the CallerID?
Other than CallerID(name)=XYZ?

Regards,
Florian

CallerID() is an undefined function. CALLERID(name) should not affect the caller ID number, which is what is normally understood as the caller ID.

The default behaviour of Asterisk is to pass the caller ID received through as the From: header and in any other ways configured. To stop it you would need to explicitly configure something that does that, e.g. fromuser, in chan_sip. Without seeing your pjsip configuration, we can’t see if you are doing that, and without a protocol trace, we can’t see if you are sending caller ID, but not in a form the downstream system is looking for

Hi,
by protocol trace you mean the output of “pjsip logger on”?:

*CLI> <--- Received SIP request (1014 bytes) from UDP:172.18.252.209:58373 --->
INVITE sip:2538@asterisk18 SIP/2.0
Via: SIP/2.0/UDP 172.18.252.209:58373;rport;branch=z9hG4bKPj457e0702b4304016acb4bc5b9321e56e
Max-Forwards: 70
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>
Contact: "Seifer, Florian <2297>" <sip:2297-1@172.18.252.209:58373;ob>
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
CSeq: 7856 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.20.3
Content-Type: application/sdp
Content-Length:   346

v=0
o=- 3833007776 3833007776 IN IP4 172.18.252.209
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 8 0 101
c=IN IP4 172.18.252.209
b=TIAS:64000
a=rtcp:4003 IN IP4 172.18.252.209
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:1126370866 cname:70ad46d32e216ca5

<--- Transmitting SIP response (575 bytes) to UDP:172.18.252.209:58373 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.18.252.209:58373;rport=58373;received=172.18.252.209;branch=z9hG4bKPj457e0702b4304016acb4bc5b9321e56e
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=z9hG4bKPj457e0702b4304016acb4bc5b9321e56e
CSeq: 7856 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1624011776/10ff9e198ea383ab468d3c7ef1d5f72f",opaque="5c69b2157c285e6a",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.4.0
Content-Length:  0


<--- Received SIP request (392 bytes) from UDP:172.18.252.209:58373 --->
ACK sip:2538@asterisk18 SIP/2.0
Via: SIP/2.0/UDP 172.18.252.209:58373;rport;branch=z9hG4bKPj457e0702b4304016acb4bc5b9321e56e
Max-Forwards: 70
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=z9hG4bKPj457e0702b4304016acb4bc5b9321e56e
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
CSeq: 7856 ACK
Content-Length:  0


<--- Received SIP request (1306 bytes) from UDP:172.18.252.209:58373 --->
INVITE sip:2538@asterisk18 SIP/2.0
Via: SIP/2.0/UDP 172.18.252.209:58373;rport;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Max-Forwards: 70
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>
Contact: "Seifer, Florian <2297>" <sip:2297-1@172.18.252.209:58373;ob>
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
CSeq: 7857 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.20.3
Authorization: Digest username="2297-1", realm="asterisk", nonce="1624011776/10ff9e198ea383ab468d3c7ef1d5f72f", uri="sip:2538@asterisk18", response="ecd5f45ce84d9e16ffa0289d6a388e83", algorithm=md5, cnonce="309de7cb26ae4baf8f5037062f849f9b", opaque="5c69b2157c285e6a", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   346

v=0
o=- 3833007776 3833007776 IN IP4 172.18.252.209
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 8 0 101
c=IN IP4 172.18.252.209
b=TIAS:64000
a=rtcp:4003 IN IP4 172.18.252.209
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:1126370866 cname:70ad46d32e216ca5

<--- Transmitting SIP response (377 bytes) to UDP:172.18.252.209:58373 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.18.252.209:58373;rport=58373;received=172.18.252.209;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>
CSeq: 7857 INVITE
Server: Asterisk PBX 18.4.0
Content-Length:  0


    -- Executing [2538@Standort:1] Set("PJSIP/2297-1-00000004", "CHANNEL(language)=de") in new stack
    -- Executing [2538@Standort:2] NoOp("PJSIP/2297-1-00000004", "=>Einstieg in Standort-Allgemein, _.- Macro") in new stack
    -- Executing [2538@Standort:3] GotoIf("PJSIP/2297-1-00000004", "0?4:8") in new stack
    -- Goto (Standort,2538,8)
    -- Executing [2538@Standort:8] GotoIf("PJSIP/2297-1-00000004", "0?9:11") in new stack
    -- Goto (Standort,2538,11)
    -- Executing [2538@Standort:11] Set("PJSIP/2297-1-00000004", "_FromExternal=0") in new stack
    -- Executing [2538@Standort:12] Set("PJSIP/2297-1-00000004", "CALLERID(num)=2297") in new stack
    -- Executing [2538@Standort:13] NoOp("PJSIP/2297-1-00000004", "Finish if_if_StandortAllgemein_170_171") in new stack
    -- Executing [2538@Standort:14] NoOp("PJSIP/2297-1-00000004", "Finish if_StandortAllgemein_170") in new stack
    -- Executing [2538@Standort:15] NoOp("PJSIP/2297-1-00000004", "sn=>StandortAllgemein, FromExternal: 0") in new stack
    -- Executing [2538@Standort:16] AGI("PJSIP/2297-1-00000004", "/opt/asterisk/scripts/AstGetLdapValue,2297,displayName") in new stack
    -- Launched AGI Script /opt/asterisk/scripts/AstGetLdapValue
    -- <PJSIP/2297-1-00000004>AGI Script /opt/asterisk/scripts/AstGetLdapValue completed, returning 0
    -- Executing [2538@Standort:17] GotoIf("PJSIP/2297-1-00000004", "0?18:19") in new stack
    -- Goto (Standort,2538,19)
    -- Executing [2538@Standort:19] NoOp("PJSIP/2297-1-00000004", "Finish if_StandortAllgemein_172") in new stack
    -- Executing [2538@Standort:20] Set("PJSIP/2297-1-00000004", "CALLERID(name)=Florian Seifer") in new stack
    -- Executing [2538@Standort:21] GotoIf("PJSIP/2297-1-00000004", "0?22:23") in new stack
    -- Goto (Standort,2538,23)
    -- Executing [2538@Standort:23] NoOp("PJSIP/2297-1-00000004", "Finish if_StandortAllgemein_173") in new stack
    -- Executing [2538@Standort:24] Set("PJSIP/2297-1-00000004", "ZIEL=2538") in new stack
    -- Executing [2538@Standort:25] Gosub("PJSIP/2297-1-00000004", "ast-redirect,~~s~~,1(2538)") in new stack
    -- Executing [~~s~~@ast-redirect:1] MSet("PJSIP/2297-1-00000004", "LOCAL(ziel)=2538") in new stack
    -- Executing [~~s~~@ast-redirect:2] AGI("PJSIP/2297-1-00000004", "/opt/asterisk/scripts/AstRedirect,2538") in new stack
    -- Launched AGI Script /opt/asterisk/scripts/AstRedirect
    -- <PJSIP/2297-1-00000004>AGI Script /opt/asterisk/scripts/AstRedirect completed, returning 0
    -- Executing [~~s~~@ast-redirect:3] NoOp("PJSIP/2297-1-00000004", "sn=>Ergebnis: ") in new stack
    -- Executing [~~s~~@ast-redirect:4] GotoIf("PJSIP/2297-1-00000004", "1?5:6") in new stack
    -- Goto (ast-redirect,~~s~~,5)
    -- Executing [~~s~~@ast-redirect:5] Set("PJSIP/2297-1-00000004", "REDIRECTNUMBER=") in new stack
    -- Executing [~~s~~@ast-redirect:6] NoOp("PJSIP/2297-1-00000004", "Finish if_ast-redirect_12") in new stack
    -- Executing [~~s~~@ast-redirect:7] GotoIf("PJSIP/2297-1-00000004", "0?8:16") in new stack
    -- Goto (ast-redirect,~~s~~,16)
    -- Executing [~~s~~@ast-redirect:16] NoOp("PJSIP/2297-1-00000004", "Finish if_ast-redirect_13") in new stack
    -- Executing [~~s~~@ast-redirect:17] Return("PJSIP/2297-1-00000004", "") in new stack
    -- Executing [2538@Standort:26] GotoIf("PJSIP/2297-1-00000004", "0?27:34") in new stack
    -- Goto (Standort,2538,34)
    -- Executing [2538@Standort:34] NoOp("PJSIP/2297-1-00000004", "sn=>Intern=>Main") in new stack
    -- Executing [2538@Standort:35] NoOp("PJSIP/2297-1-00000004", "sn=>CALLERID(num): 2297") in new stack
    -- Executing [2538@Standort:36] NoOp("PJSIP/2297-1-00000004", "sn=>CALLERID(name): Florian Seifer") in new stack
    -- Executing [2538@Standort:37] NoOp("PJSIP/2297-1-00000004", "sn=>Absprung in Main Context") in new stack
    -- Executing [2538@Standort:38] NoOp("PJSIP/2297-1-00000004", "sn=>--------------------------------------------------------------------------------------------") in new stack
    -- Executing [2538@Standort:39] Goto("PJSIP/2297-1-00000004", "Main,2538,1") in new stack
    -- Goto (Main,2538,1)
    -- Executing [2538@Main:1] NoOp("PJSIP/2297-1-00000004", "sn=>Wahl nach Intern") in new stack
    -- Executing [2538@Main:2] NoOp("PJSIP/2297-1-00000004", "sn=>FromExternal: 0") in new stack
    -- Executing [2538@Main:3] Gosub("PJSIP/2297-1-00000004", "-dial,~~s~~,1(2538)") in new stack
    -- Executing [~~s~~@-dial:1] MSet("PJSIP/2297-1-00000004", "LOCAL(ziel)=2538") in new stack
    -- Executing [~~s~~@-dial:2] NoOp("PJSIP/2297-1-00000004", "sn=>-dial zu 2538") in new stack
    -- Executing [~~s~~@-dial:3] NoOp("PJSIP/2297-1-00000004", "sn=>DeviceState 2538-0: UNAVAILABLE") in new stack
    -- Executing [~~s~~@-dial:4] NoOp("PJSIP/2297-1-00000004", "sn=>DeviceState 2538-1: NOT_INUSE") in new stack
    -- Executing [~~s~~@-dial:5] NoOp("PJSIP/2297-1-00000004", "sn=>DeviceState 2538-2: UNAVAILABLE") in new stack
    -- Executing [~~s~~@-dial:6] Set("PJSIP/2297-1-00000004", "db_base=/phones/2538") in new stack
    -- Executing [~~s~~@-dial:7] Set("PJSIP/2297-1-00000004", "vm_status=") in new stack
    -- Executing [~~s~~@-dial:8] NoOp("PJSIP/2297-1-00000004", "sn=>db_base: /phones/2538") in new stack
    -- Executing [~~s~~@-dial:9] NoOp("PJSIP/2297-1-00000004", "sn=>DB-multiline: ") in new stack
    -- Executing [~~s~~@-dial:10] NoOp("PJSIP/2297-1-00000004", "sn=>vm_status: ") in new stack
    -- Executing [~~s~~@-dial:11] GotoIf("PJSIP/2297-1-00000004", "0?12:20") in new stack
    -- Goto (-dial,~~s~~,20)
    -- Executing [~~s~~@-dial:20] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_56") in new stack
    -- Executing [~~s~~@-dial:21] GotoIf("PJSIP/2297-1-00000004", "0?22:26") in new stack
    -- Goto (-dial,~~s~~,26)
    -- Executing [~~s~~@-dial:26] Set("PJSIP/2297-1-00000004", "PJSIP_HEADER(add,Alert-Info)=<http://nohost>") in new stack
    -- Executing [~~s~~@-dial:27] Set("PJSIP/2297-1-00000004", "PJSIP_HEADER(add,info)=alert-internal") in new stack
    -- Executing [~~s~~@-dial:28] Set("PJSIP/2297-1-00000004", "PJSIP_HEADER(add,x-line-id)=0") in new stack
    -- Executing [~~s~~@-dial:29] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_57") in new stack
    -- Executing [~~s~~@-dial:30] GotoIf("PJSIP/2297-1-00000004", "0?31:68") in new stack
    -- Goto (-dial,~~s~~,68)
    -- Executing [~~s~~@-dial:68] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_58") in new stack
    -- Executing [~~s~~@-dial:69] GotoIf("PJSIP/2297-1-00000004", "0?70:73") in new stack
    -- Goto (-dial,~~s~~,73)
    -- Executing [~~s~~@-dial:73] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_64") in new stack
    -- Executing [~~s~~@-dial:74] GotoIf("PJSIP/2297-1-00000004", "0?75:85") in new stack
    -- Goto (-dial,~~s~~,85)
    -- Executing [~~s~~@-dial:85] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_65") in new stack
    -- Executing [~~s~~@-dial:86] Set("PJSIP/2297-1-00000004", "vm_timeout=0") in new stack
    -- Executing [~~s~~@-dial:87] GotoIf("PJSIP/2297-1-00000004", "0?88:89") in new stack
    -- Goto (-dial,~~s~~,89)
    -- Executing [~~s~~@-dial:89] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_68") in new stack
    -- Executing [~~s~~@-dial:90] NoOp("PJSIP/2297-1-00000004", "sn=>vm_timeout: 0 Sekunden") in new stack
    -- Executing [~~s~~@-dial:91] Set("PJSIP/2297-1-00000004", "DialString=Local/2538@Dial2Internal") in new stack
    -- Executing [~~s~~@-dial:92] GotoIf("PJSIP/2297-1-00000004", "0?93:104") in new stack
    -- Goto (-dial,~~s~~,104)
    -- Executing [~~s~~@-dial:104] NoOp("PJSIP/2297-1-00000004", "Finish if_-dial_69") in new stack
    -- Executing [~~s~~@-dial:105] NoOp("PJSIP/2297-1-00000004", "sn=> Vor Dial") in new stack
    -- Executing [~~s~~@-dial:106] NoOp("PJSIP/2297-1-00000004", "sn=> Dialstring: Local/2538@Dial2Internal, vm_timeout: 0") in new stack
    -- Executing [~~s~~@-dial:107] GotoIf("PJSIP/2297-1-00000004", "1?108:110") in new stack
    -- Goto (-dial,~~s~~,108)
    -- Executing [~~s~~@-dial:108] Dial("PJSIP/2297-1-00000004", "Local/2538@Dial2Internal") in new stack
    -- Called Local/2538@Dial2Internal
    -- Executing [2538@Dial2Internal:1] NoOp("Local/2538@Dial2Internal-00000002;2", "sn=>Dial2Internal-Context") in new stack
    -- Executing [2538@Dial2Internal:2] Dial("Local/2538@Dial2Internal-00000002;2", "PJSIP/2538-0&PJSIP/2538-1&PJSIP/2538-2") in new stack
[Jun 18 12:22:56] ERROR[92872]: res_pjsip.c:4006 ast_sip_create_dialog_uac: Endpoint '2538-0': Could not create dialog to invalid URI '2538-0'.  Is endpoint registered and reachable?
[Jun 18 12:22:56] ERROR[92872]: chan_pjsip.c:2656 request: Failed to create outgoing session to endpoint '2538-0'
[Jun 18 12:22:56] WARNING[92884][C-00000003]: app_dial.c:2598 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Jun 18 12:22:56] ERROR[92872]: res_pjsip.c:4006 ast_sip_create_dialog_uac: Endpoint '2538-2': Could not create dialog to invalid URI '2538-2'.  Is endpoint registered and reachable?
[Jun 18 12:22:56] ERROR[92872]: chan_pjsip.c:2656 request: Failed to create outgoing session to endpoint '2538-2'
[Jun 18 12:22:56] WARNING[92884][C-00000003]: app_dial.c:2598 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
    -- Called PJSIP/2538-1
<--- Transmitting SIP request (931 bytes) to UDP:0.0150.16:51767 --->
INVITE sip:2538-1@0.0150.16:51767;ob SIP/2.0
Via: SIP/2.0/UDP 0.0150.17:5060;rport;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>
Contact: <sip:2538-1@0.0150.17:5060>
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
CSeq: 9359 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.4.0
Content-Type: application/sdp
Content-Length:   261

v=0
o=- 1101965221 1101965221 IN IP4 0.0150.17
s=Asterisk
c=IN IP4 0.0150.17
t=0 0
m=audio 29534 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (338 bytes) from UDP:0.0150.16:51767 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 0.0150.17:5060;rport=5060;received=0.0150.17;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>
CSeq: 9359 INVITE
Content-Length:  0


<--- Received SIP response (536 bytes) from UDP:0.0150.16:51767 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 0.0150.17:5060;rport=5060;received=0.0150.17;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>;tag=207c52bbc8bc4a39bda4812e02fee9c9
CSeq: 9359 INVITE
Contact: "Terminalserver" <sip:2538-1@0.0150.16:51767;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length:  0


    -- PJSIP/2538-1-00000005 is ringing
    -- Local/2538@Dial2Internal-00000002;1 is ringing
<--- Transmitting SIP response (717 bytes) to UDP:172.18.252.209:58373 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.18.252.209:58373;rport=58373;received=172.18.252.209;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=72b2e648-b06d-4a53-ab83-2fce0c267629
CSeq: 7857 INVITE
Server: Asterisk PBX 18.4.0
Contact: <sip:0.0150.17:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
P-Asserted-Identity: "Eggert, Julian" <sip:2538@asterisk18>
Remote-Party-ID: "Eggert, Julian" <sip:2538@asterisk18>;party=called;privacy=off;screen=no
Content-Length:  0


<--- Received SIP request (381 bytes) from UDP:172.18.252.209:58373 --->
CANCEL sip:2538@asterisk18 SIP/2.0
Via: SIP/2.0/UDP 172.18.252.209:58373;rport;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Max-Forwards: 70
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
CSeq: 7857 CANCEL
User-Agent: MicroSIP/3.20.3
Content-Length:  0


<--- Transmitting SIP response (414 bytes) to UDP:172.18.252.209:58373 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.18.252.209:58373;rport=58373;received=172.18.252.209;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=72b2e648-b06d-4a53-ab83-2fce0c267629
CSeq: 7857 CANCEL
Server: Asterisk PBX 18.4.0
Content-Length:  0


<--- Transmitting SIP response (694 bytes) to UDP:172.18.252.209:58373 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 172.18.252.209:58373;rport=58373;received=172.18.252.209;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=72b2e648-b06d-4a53-ab83-2fce0c267629
CSeq: 7857 INVITE
Server: Asterisk PBX 18.4.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
P-Asserted-Identity: "Eggert, Julian" <sip:2538@asterisk18>
Remote-Party-ID: "Eggert, Julian" <sip:2538@asterisk18>;party=called;privacy=off;screen=no
Content-Length:  0


  == Spawn extension (-dial, ~~s~~, 108) exited non-zero on 'PJSIP/2297-1-00000004'
    -- Executing [h@-dial:1] Goto("PJSIP/2297-1-00000004", "9991") in new stack
    -- Goto (-dial,h,9991)
    -- Executing [h@-dial:9991] Set("PJSIP/2297-1-00000004", "~~parentcxt~~=Main") in new stack
    -- Executing [h@-dial:9992] GotoIf("PJSIP/2297-1-00000004", "0?9996") in new stack
  == Spawn extension (Dial2Internal, 2538, 2) exited non-zero on 'Local/2538@Dial2Internal-00000002;2'
    -- Executing [h@-dial:9993] GotoIf("PJSIP/2297-1-00000004", "1?9994:9996") in new stack
    -- Goto (-dial,h,9994)
    -- Executing [h@-dial:9994] StackPop("PJSIP/2297-1-00000004", "") in new stack
    -- Executing [h@-dial:9995] Goto("PJSIP/2297-1-00000004", "Main,h,1") in new stack
    -- Goto (Main,h,1)
    -- Executing [h@Main:1] GotoIf("PJSIP/2297-1-00000004", "0?2:6") in new stack
    -- Goto (Main,h,6)
    -- Executing [h@Main:6] NoOp("PJSIP/2297-1-00000004", "Finish if_Base_160") in new stack
    -- Executing [h@Main:7] NoOp("PJSIP/2297-1-00000004", "sn=>Gespraech beendet") in new stack
    -- Executing [h@Main:8] NoOp("PJSIP/2297-1-00000004", "sn=>FromExternal: 0") in new stack
    -- Executing [h@Main:9] NoOp("PJSIP/2297-1-00000004", "sn=>DIALSTATUS: CANCEL") in new stack
<--- Transmitting SIP request (414 bytes) to UDP:0.0150.16:51767 --->
CANCEL sip:2538-1@0.0150.16:51767;ob SIP/2.0
Via: SIP/2.0/UDP 0.0150.17:5060;rport;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
CSeq: 9359 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: Asterisk PBX 18.4.0
Content-Length:  0


<--- Received SIP response (371 bytes) from UDP:0.0150.16:51767 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 0.0150.17:5060;rport=5060;received=0.0150.17;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>;tag=207c52bbc8bc4a39bda4812e02fee9c9
CSeq: 9359 CANCEL
Content-Length:  0


<--- Received SIP response (485 bytes) from UDP:0.0150.16:51767 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 0.0150.17:5060;rport=5060;received=0.0150.17;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>;tag=207c52bbc8bc4a39bda4812e02fee9c9
CSeq: 9359 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length:  0


<--- Transmitting SIP request (422 bytes) to UDP:0.0150.16:51767 --->
ACK sip:2538-1@0.0150.16:51767;ob SIP/2.0
Via: SIP/2.0/UDP 0.0150.17:5060;rport;branch=z9hG4bKPjf67db330-d1d4-4f5a-a230-b87401714edf
From: <sip:2538-1@0.0150.17>;tag=9a0eb0bc-32e8-4bf9-a2ff-c391bc9cbc67
To: <sip:2538-1@0.0150.16;ob>;tag=207c52bbc8bc4a39bda4812e02fee9c9
Call-ID: 503073e0-797d-469a-a2b7-fb1045386eeb
CSeq: 9359 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.4.0
Content-Length:  0


<--- Received SIP request (387 bytes) from UDP:172.18.252.209:58373 --->
ACK sip:2538@asterisk18 SIP/2.0
Via: SIP/2.0/UDP 172.18.252.209:58373;rport;branch=z9hG4bKPj41e286ac59f24ec7a7b876be197777fd
Max-Forwards: 70
From: "Seifer, Florian <2297>" <sip:2297-1@asterisk18>;tag=3d69c13294a84b3eaefac2a57fa42dae
To: <sip:2538@asterisk18>;tag=72b2e648-b06d-4a53-ab83-2fce0c267629
Call-ID: c5e3e0dc1d384cc9b85f7bb770f0cd7a
CSeq: 7857 ACK
Content-Length:  0


type or paste code here

Hi,

my last post is still in the spam filter because its so long I guess.

Just to help you understand, this is the part of my dialplan that sets the CallerID name:

		// Name setzen
		AGI(/opt/asterisk/scripts/AstGetLdapValue,${CALLERID(num)},displayName);
                if ("${VALUE}"="UNKNOWN")
                        Set(VALUE=${CALLERID(num)});

		Set(CALLERID(name)=${VALUE});

I know that CALLERID(num) is set because it uses the number to lookup the Caller Name from LDAP. I have tested this script and it works.
But for some reason the ID either gets overwritten or is disregarded entirely by the answering endpoint.

As for my pjsip.conf, as I said I am using a realtime DB-Connection to store my PJSIP-Configuration:

sorcery.conf:

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts

extconfig.conf:

ps_endpoints => mysql,asterisk
ps_auths => mysql,asterisk
ps_aors => mysql,asterisk
ps_domain_aliases => mysql,asterisk
ps_endpoint_id_ips => mysql,asterisk
ps_outbound_publishes => mysql,asterisk
ps_inbound_publications => mysql,asterisk
ps_asterisk_publications => mysql,asterisk
ps_contacts => mysql,asterisk

That generally makes a quick diagnosis difficult, as it is difficult to see what options you have changed from the defaults. With manually created .conf configurations, there are usually relatively few lines, with most left to defaults.

Theese are the options of the calling endpoint:

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  2297-1/2297                                          Not in use    0 of inf
     InAuth:  2297-1/2297-1
        Aor:  2297-1                                             5
      Contact:  2297-1/sip:2297-1@172.18.252.209:54667;ob  38555bf944 NonQual         nan
  Transport:  transport-udp             udp      0      0  0.0.0.0:5060


 ParameterName                      : ParameterValue
 ===================================================================================================
 100rel                             : yes
 accept_multiple_sdp_answers        : false
 accountcode                        :
 acl                                :
 aggregate_mwi                      : true
 allow                              : (ulaw|alaw)
 allow_overlap                      : true
 allow_subscribe                    : true
 allow_transfer                     : true
 allow_unauthenticated_options      : false
 aors                               : 2297-1
 asymmetric_rtp_codec               : false
 auth                               : 2297-1
 bind_rtp_to_media_address          : false
 bundle                             : false
 call_group                         :
 callerid                           : "Seifer, Florian" <2297>
 callerid_privacy                   : allowed
 callerid_tag                       :
 codec_prefs_incoming_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_incoming_offer         : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_offer         : prefer:pending, operation:union, keep:all, transcode:allow
 connected_line_method              : invite
 contact_acl                        :
 context                            : StandortEssen
 cos_audio                          : 0
 cos_video                          : 0
 device_state_busy_at               : 0
 direct_media                       : false
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_auto_generate_cert            : No
 dtls_ca_file                       :
 dtls_ca_path                       :
 dtls_cert_file                     :
 dtls_cipher                        :
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   :
 dtls_rekey                         : 0
 dtls_setup                         : active
 dtls_verify                        : No
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 fax_detect_timeout                 : 0
 follow_early_media_fork            : true
 force_avp                          : false
 force_rport                        : true
 from_domain                        :
 from_user                          : 2297-1
 g726_non_standard                  : false
 ice_support                        : false
 identify_by                        : username,ip
 ignore_183_without_sdp             : false
 inband_progress                    : false
 incoming_call_offer_pref           : local
 incoming_mwi_mailbox               :
 language                           :
 mailboxes                          :
 max_audio_streams                  : 1
 max_video_streams                  : 1
 media_address                      :
 media_encryption                   : no
 media_encryption_optimistic        : false
 media_use_received_transport       : false
 message_context                    :
 moh_passthrough                    : false
 moh_suggest                        : default
 mwi_from_user                      :
 mwi_subscribe_replaces_unsolicited : no
 named_call_group                   :
 named_pickup_group                 :
 notify_early_inuse_ringing         : false
 one_touch_recording                : false
 outbound_auth                      :
 outbound_proxy                     :
 outgoing_call_offer_pref           : remote_merge
 pickup_group                       :
 preferred_codec_only               : false
 record_off_feature                 : automixmon
 record_on_feature                  : automixmon
 refer_blind_progress               : true
 rewrite_contact                    : false
 rpid_immediate                     : false
 rtcp_mux                           : false
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : false
 rtp_timeout                        : 0
 rtp_timeout_hold                   : 0
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_connected_line                : yes
 send_diversion                     : true
 send_history_info                  : false
 send_pai                           : true
 send_rpid                          : true
 set_var                            :
 srtp_tag_32                        : false
 stir_shaken                        : false
 sub_min_expiry                     : 0
 subscribe_context                  : Hints2297
 suppress_q850_reason_headers       : false
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          :
 tos_audio                          : 0
 tos_video                          : 0
 transport                          : transport-udp
 trust_connected_line               : yes
 trust_id_inbound                   : false
 trust_id_outbound                  : false
 use_avpf                           : false
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                :
 webrtc                             : no

I have now verified that the shown extension when calling an endpoint comes from the recipients “from_user” database entry e.g…: “2538-1” in ps_endpoints.

The question is why? Is that behaviour some kind of fallback in case there is no other ID to display?

I got it working!

Turns out “from_user” overwrites the callerID!
So setting the column “from_user” in the ps_endpoints table to NULL led to the CallerID being displayed correctly!

2 Likes

That is how the core SIP protocol works. Caller ID is passed in the user field of the URI in the From: header. If you set from user, you are overriding this, typically because the end point is an ITSP (or you are accessing another PBX as though you were a simple phone), and the peer needs it to identify you for authentication.

If there is some reason why a particular, fixed, value is needed in the From: header, you may find the device supports Remote-Party-Id, or P-Asserted-Identity, and can enable the relevant one of those.

2 Likes

Thank you for the explanation.

I dont think there is a reason for us to use the “from_user” field. These endpoints were entered manually to test the dialplans.

We still have to figure out exactly what entries from the pj_sip options we want to use.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.