Asterisk sip Contact change

Dear Team,

I have installed asterisk server 13.14.1.

I have configured sip trunk. When am sending the call ,In SIP Header sip header contact is going as Fromuser which is ther in my sip trunk. I need to change the SIP HEADER contact from dial pan instead of taking from the FROMUSER .

Is it possible ? can anyone help on this ?

Below is sip trunk details.

username=77258998@10.66.10.66
fromuser=77258998
type=peer
secret=1234
qualify=yes
outboundproxy=10.66.10.66
nat=yes
insecure=port,invite
host=10.66.10.66
fromdomain=10.66.10.66
disallow=all
allow=alaw
sendrpid=yes

And below is the sip debug

INVITE sip:9999999999@10.66.10.66 SIP/2.0
Via: SIP/2.0/UDP 10.0.66.130:5061;branch=z9hG4bK74626153;rport
Max-Forwards: 70
From: “MyName Here” sip:77258998@10.66.10.66:5061;tag=as3bb397a9
To: sip:10.66.10.66@10.66.10.66
Contact: sip:77258998@10.0.66.130:5061
Call-ID: 288510cf60155b37003947e326255bad@10.66.10.66
CSeq: 102 INVITE
User-Agent: FPBX-13.0.192.8(13.14.1)
Date: Wed, 01 Aug 2018 19:14:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: “MyName Here” sip:77258999@10.66.10.66;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 248

In the the givenlog i have set the callerid(num) as 77258999 but still am getting the contact as
77258998 number.
I need to set the contact as 77258999 with out changing the from user.

Can any one help me on this ?

Anything that is dependent on the user part of the Contact URI, other than the system that sent it, is broken.

You failed to say that you are using chan_sip, but chan_pjsip sends a completely opaque user part.

You need to fix the peer not to read things into SIP protocol fields that the SIP specification doesn’t associate with those fields.

whatever am sending the fromuser string in SIP.conf that only coming as SIP Header Contact…

Is that possible with out changing the From user to change the contact header.

If you manually configure the trunk as follows

username=77258998@10.66.10.66
fromuser=77258999

Does it work with calllerid as 77258999? Some carriers do not allow this chnage.

As I’ve already said, there is no valid reason for providing such a facility. You need to fix the system that is musing opaque data.

yes. 7725899 i staking as caller id .

From the operator side they will not change…They will accept whet ever the we are sending as SIP Header contact. Hence need to change the asterisk configurations.

Change the operator to one that implements SIP.

You could try moving to PJSIP, as it appears to have some features to work round this sort of broken SIP implementation: PJSIP: Change the user part of the Contact Header