Hi David,
Thank you for sharing this.
Allow me to share the configs on my end too.
Here’s the pjsip.conf file:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[6001]
type=endpoint
;context=from-internal
context=call-redirect
disallow=all
allow=ulaw
auth=6001
aors=6001
[6001]
type=auth
auth_type=userpass
password=xxxxxx
username=6001
[6001]
type=aor
max_contacts=1
[mytrunk]
type=endpoint
context=from-external
disallow=all
allow=ulaw
outbound_auth=mytrunk
aors=mytrunk
[mytrunk]
type=aor
contact=sip:xxx.xxx.xxx.xxx:5060
Here’s the extensions.conf file. You’ll find the middle section of the last context commented out, but I’ve found it to behave the same whether it’s commented out or not.
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,SayNumber(${EXTEN})
same = n,Playback(hello-world)
same = n,Hangup()
[some-context]
;same = n,Dial(PJSIP/trunk/sip:1234567890@185.231.78.14:5060)
;same = n,REDIRECTING(to-123123123)
[call-redirect]
exten => 1000,1,NoOp
; For Q.SIG or ISDN point-to-point we should determine the COLR for this
; extension and send it if the call was redirected here.
;exten => 1000,n,GotoIf($[${REDIRECTING(count)}>0]?redirected:notredirected)
;exten => 1000,n(redirected),Set(REDIRECTING(to-num,i)=${CALLERID(dnid)})
;exten => 1000,n,Set(REDIRECTING(to-num-pres)=allowed)
;exten => 1000,n(notredirected),NoOp
; Determine that the destination has forwarded the call.
; …
exten => 1000,n,Set(REDIRECTING(from-num,i)=10000001)
exten => 1000,n,Set(REDIRECTING(from-num-pres,i)=allowed)
exten => 1000,n,Set(REDIRECTING(to-num,i)=1234567890)
; The DivertingLegInformation3 message is needed because at this point
; we do not know the presentation (COLR) setting of the redirecting-to
; party.
exten => 1000,n,Set(REDIRECTING(count,i)=$[${REDIRECTING(count)} + 1])
exten => 1000,n,Set(REDIRECTING(reason,i)=cfu)
; The call will update the redirecting-to presentation (COLR) when it
; becomes available with a redirecting update.
exten => 1000,n,Dial(PJSIP/1234567890@mytrunk,20)
exten => 1000,n,Hangup
And here’s a screenshot from the Asterisk server where you can see there is no SIP 181 sent to the caller. As you can see also, the caller ID is not manipulated on the egress call leg, but I’m sure that will be a dial plan mistake (any help there too will be appreciated)
Thank you!