How to edit "s=" in SDP to Match the UA

Hello Community,

I was wondering, it is possible to modify the SDP value “s=” to match the UA, a.k.a. Server: in the SIP messages? I followed the → community.freepbx/t/how-change-user-agent-for-pjsip/72831 to change the UA/Server, worked just fine, but the value in the SDP will remain bounded as “Asterisk” and I want to hide this, or to change it.

I have the following sittuation:

200 OK sent from FreePBX to my PBX (seen on the FreePBX):

There must be a way to edit this to match the Server/UA from the SIP Messages (100 Trying, 200 OK, etc.).

Any help it’s really appreciated!

P.S: link to the tutorial that I followed misses the “https” and “.org” values, since this is a new account and I’m not allowed to add any links.

Thank you,
Swagger

sdp_session can be set at the endpoint scope but not in the global scope.

If you want to set it, you have to do it in the pjsip.endpoint_custom_post.conf file; e.g, for endpoint (extension) 100,

[100](+)
sdp_session=SuperMediaServer9000

docs: Asterisk 18 Configuration_res_pjsip - Asterisk Project - Asterisk Project Wiki

Hi @billsimon,

Thanks a lot for your reply!

Is this possible to do for the SIP Trunks too? The PJSIP ones.

Sure. Use the trunk name in place of the extension number.

Hi @Stewart1,

Should I append this change in what exactly file? endpoint_custom_post.conf file?

Will this look something like:

SIP_TRUNK_NAME
sdp_session=SuperMediaServer9000”

Thanks for the info!

I think, like this:

[SIP_TRUNK_NAME](+)
sdp_session=SuperMediaServer9000

That should work, but I like to make put all manual overrides into /etc/asterisk/pjsip_custom_post.conf
in which case you would use
[SIP_TRUNK_NAME](+type=endpoint)
sdp_session=SuperMediaServer9000

To confirm, after restarting Asterisk, at the Asterisk command prompt type
pjsip show endpoint SIP_TRUNK_NAME
and you should see

sdp_session         : SuperMediaServer9000
1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.