Technical Tip: DID (Direct Inward Dialing) number override by main number in SIP trunk for outgoing call
Description
This article describes that the DID number is overridden by the main number configured in the SIP trunk when making an outbound call.
Scope
For version 5.3 and onward.
Solution
DID configuration.
config dialplan did-mapping
edit Incoming
set incoming-trunk SIP_Trunk
config from-callerid
end
set schedule any_time
config mapping
edit 23
set option inbound outbound
set did 65377345
set extension 340
next
SIP trunk configuration.
config trunk sip-peer
edit SIP_Trunk
config did
end
set caller-number 65362727
set sip-setting sip_trunk_default
set max-channel 5
set max-outgoing-channels 5
next
end
From the packet capture, the outbound call is using the main number instead of the DID number (65377345).

To avoid DID being overridden by the main number, enable update-pai-header in the SIP trunk configuration.
config trunk sip-peer
edit SIP_Trunk
config did
end
set caller-number 65362727
set update-pai-header enable
next
Related document:
