Sip useragent in pjsip

I need to mask the user agent of my asterisk server since my provider does not allow asterisk registrations

In chan_sip I used to have the below

useragent=Cisco-SIPGateway/IOS-12.x

Is there an equivalent in pjsip?

The user agent can be set in the global section of pjsip.conf using the user_agent option.

In pjsip.conf

I did this

[global]

user_agent=Cisco-SIPGateway/IOS-12.x

Then I reloaded pjsip and rebooted asterisk as well

in the console I then typed

pjsip show settings

Global Settings:

 ParameterName             : ParameterValue
 =============================================================
 debug                     : no
 default_from_user         : asterisk
 default_outbound_endpoint : default_outbound_endpoint
 disable_multi_domain      : false
 endpoint_identifier_order : ip,username,anonymous
 keep_alive_interval       : 0
 max_forwards              : 70
 max_initial_qualify_time  : 0
 regcontext                : 
 user_agent                : Asterisk PBX certified/13.8-cert1

The user agent is still Asterisk PBX certified/13.8-cert1

Any reason why?

Yes, in order to have the global section be recognized it must also have a “type=global” line.

worked, thanks a lot

If your provider doesn’t allow you to use Asterisk, you should not use it. There is presumably a good reason for the ban, possibly some incompatibility, or possibly because they only want to provide service to simple telephones.

1 Like