No outbound cid with asterisk 11.7

Hi

The problem that I have, is that with version 11.7 I can’t have the outbound cid. When I call I always have the default number. This are the logs:
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [XXXXXXXXX095@from-internal:3] Set(“SIP/6-00000037”, “MOHCLASS=default”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [XXXXXXXXX095@from-internal:4] ExecIf(“SIP/6-00000037”, “1?Set(TRUNKCIDOVERRIDE=XXXXXXXXX56)”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [XXXXXXXXX095@from-internal:5] Set(“SIP/6-00000037”, “_NODEST=”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [XXXXXXXXX095@from-internal:6] Macro(“SIP/6-00000037”, “record-enable,6,OUT,”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-record-enable:1] GotoIf(“SIP/6-00000037”, “1?check”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Goto (macro-record-enable,s,4)
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-record-enable:4] ExecIf(“SIP/6-00000037”, “0?MacroExit()”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-record-enable:5] GotoIf(“SIP/6-00000037”, “0?Group:OUT”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Goto (macro-record-enable,s,15)
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-record-enable:15] GotoIf(“SIP/6-00000037”, “0?IN”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-record-enable:16] ExecIf(“SIP/6-00000037”, “1?MacroExit()”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [XXXXXXXXX095@from-internal:7] Macro(“SIP/6-00000037”, “dialout-trunk,2,XXXXXXXXX095,”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“SIP/6-00000037”, “DIAL_TRUNK=2”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/6-00000037”, “0?sub-pincheck,s,1”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/6-00000037”, “0?disabletrunk,1”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“SIP/6-00000037”, “DIAL_NUMBER=XXXXXXXXX095”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“SIP/6-00000037”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“SIP/6-00000037”, “OUTBOUND_GROUP=OUT_2”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/6-00000037”, “0?nomax”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/6-00000037”, “0?chanfull”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/6-00000037”, “0?skipoutcid”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:10] Set(“SIP/6-00000037”, “DIAL_TRUNK_OPTIONS=”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-dialout-trunk:11] Macro(“SIP/6-00000037”, “outbound-callerid,2”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/6-00000037”, “0?Set(CALLERPRES()=)”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/6-00000037”, “1?Set(REALCALLERIDNUM=6)”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/6-00000037”, “1?normcid”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Goto (macro-outbound-callerid,s,6)
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“SIP/6-00000037”, “USEROUTCID=XXXXXXXXX56”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“SIP/6-00000037”, “EMERGENCYCID=”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“SIP/6-00000037”, “TRUNKOUTCID=”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/6-00000037”, “1?trunkcid”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Goto (macro-outbound-callerid,s,12)
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/6-00000037”, “0?Set(CALLERID(all)=)”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/6-00000037”, “1?Set(CALLERID(all)=XXXXXXXXX56)”) in new stack
[Mar 24 12:56:04] VERBOSE[11832][C-0000001b] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/6-00000037”, “1?Set(CALLERID(all)=XXXXXXXXX56)”) in new stack

But when I set sip debug on I see:

From: sip:myusername@sipconnect.sipgate.de;tag=as0796e49b
From: sip:myusername@sipconnect.sipgate.de;tag=as0796e49b

And this must be:
From: XXXXXXXXX56 sip:myusername@sipconnect.sipgate.de;tag=as0796e49b
From: XXXXXXXXX56 sip:myusername@sipconnect.sipgate.de;tag=as0796e49b

Can anyone please help me?

You are setting the caller name, not the caller ID in you desired output.

If you are forced to use fromuser, you could see whether sendrpid helps. If the ITSP insists on abusing the caller name, you could try setting the caller name.

Note responsible ITSPs will require you to prove ownership before you can use a number as caller ID.

Hi first of all, thank you for your answer

I’m not understand this properly…

The thing is that with the sip debug on I have:
From: sip:myusername@sipconnect.sipgate.de;tag=as0796e49b

And I must have:
From: something* sip:myusername@sipconnect.sipgate.de;tag=as0796e49b

these something* if is the caller name like James for example, or extension number 56 etc the oubound cid will be the default one, because in the sip provider I have no phone number “James” or “56” but if this something* is a telephone number that I have contract with the Voip provider the outbound cid will be these number and not the default one.
But the problem, is that for some reason, I’m having always these something* empty, and for these reason always the outbound CID is the default one.

I add the trunk set up too,

username=myusername
dtmfmode=rfc2833
type=friend
srvlookup=yes
secret=mypassword
qualify=no → I have the same result with yes as with no
port=5060
nat=yes → I have the same result with yes as with no
insecure=very
host=sipconnect.sipgate.de
fromuser=myusername
fromdomain=sipconnect.sipgate.de
disallow=all
bindaddr=0.0.0.0 → I have the same result with it as without it
context=from-trunk
allow=ulaw&alaw
outboundproxy=sipconnect.sipgate.de → I have the same result with it as without it
sendrpid=yes → I have the same result with it as without it

I think that you mean sendrpid=yes in the trunk configuration, but I’m having the same results with it as without it

Thanks!

From: caller-name sip:caller-number@host

fromuser is blocking the use of the caller number. It looks like your ITSP wants you to put the caller number in the caller-name field, i.e. CALLERID(name).

Hi!
Thanks very much for the anwser. I discover one thing
this is my macro
[macro-outbound-callerid]
include => macro-outbound-callerid-custom
exten => _X.,1,ExecIf($["${CALLINGPRES_SV}" != “”]?Set(CALLERPRES()=${CALLINGPRES_SV}))
exten => _X.,n,ExecIf($["${REALCALLERIDNUM:1:2}" = “”]?Set(REALCALLERIDNUM=${CALLERID(number)}))
exten => X.,n(start),GotoIf($[ $["${REALCALLERIDNUM}" = “”] | $["${KEEPCID}" != “TRUE”] | $["${OUTKEEPCID${ARG1}}" = “on”] ]?normcid)
exten => _X.,n,Set(USEROUTCID=${REALCALLERIDNUM})
exten => _X.,n,GotoIf($[“foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}” = “foo”]?bypass)
exten => _X.,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${AMPUSER}/outboundcid)})
exten => _X.,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
exten => X.,n,Set(TRUNKOUTCID=${OUTCID${ARG1}})
exten => _X.,n,GotoIf($["${EMERGENCYROUTE:1:2}" = “” | “${EMERGENCYCID:1:2}” = “”]?trunkcid)
exten => _X.,n,Set(CALLERID(all)=${EMERGENCYCID})
exten => _X.,n(exit),MacroExit()
exten => X.,n(trunkcid),ExecIf($[${LEN(${TRUNKOUTCID})} != 0]?Set(CALLERID(all)=${TRUNKOUTCID}))
exten => X.,n(usercid),ExecIf($[${LEN(${USEROUTCID})} != 0]?Set(CALLERID(all)=${USEROUTCID}))
exten => X.,n,ExecIf($[${LEN(${TRUNKCIDOVERRIDE})} != 0 | ${LEN(${FORCEDOUTCID${ARG1}})} != 0]?Set(CALLERID(all)=${IF($[${LEN(${FORCEDOUTCID
${ARG1}})}=0]?${TRUNKCIDOVERRIDE}:${FORCEDOUTCID
${ARG1}})}))
exten => _X.,n(hidecid),ExecIf($["${CALLERID(name)}"=“hidden”]?Set(CALLERPRES()=prohib_passed_screen))

; end of [macro-outbound-callerid]

before instead of _X. was a “s” and I have From: sip:caller-number@host

now with _X. I have From: “tester6” sip:caller-number@host

tester6 is the caller id name, so I’m close but no close enough… How I can send there the USEROUTCID???

Replace all by name.