Fromuser appears as caller ID when call sent over SIP trunk

This is intended for someone who persistently uses the wrong forum.

There are two asterisk boxes cross connected via static IP friends with fromuser and defaultuser set to the same value on each side, but different from the other side. The sip.conf section names are different from all other names.

The question: why does the fromuser name appear as the caller ID, when calling from one system to the other.

The answer. That is expected behaviour. By default SIP uses the user part of the From header as the caller ID value. Setting fromuser takes precedence over any upstream caller ID.

As fromuser doesn’t match a section name on the other system:

  1. the only possible intent of fromuser in this configuration is to force the value of the caller ID;

  2. having type=friend has no useful purpose, as it is impossible to get a user type match. type=peer would be better (as in most SIP configurations).

(defaultuser also serves no useful purpose, and may contribute to the problem - I can’t remember the precise use of defaultuser.)

In cases where fromuser is needed in order to authenticate with a remote system, but the remote system doesn’t require the caller ID to match, it may be possible to use sendrpid=yes, or pai, to get the caller ID across. Not all systems will honour this, and Asterisk will only do so if trustrpid is set.