[asterisk-bugs] [JIRA] (ASTERISK-25453) user_agent not set in Server header

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Nov 6 09:02:34 CST 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-25453:
------------------------------------

    Assignee: Ross Beer  (was: Rusty Newton)
      Status: Waiting for Feedback  (was: Triage)

{quote}Sorry it was just an example of how its being set, full global section is:

[global]
type=global
max_forwards=70
user_agent=<Custom User Agent>
debug=no
realm=<Custom Realm>

The realm and user_agent is working correctly, its just not being set in the 'Server:' header.
{quote}

Again your global section example is invalid. 'realm' is not an option for the global section. realm is set in an auth section.

I'm unable to reproduce your described problem testing with latest 13 from Git - Asterisk GIT-13-506aea2

Setting user_agent in the global section correctly populates both the User Agent and Server headers.

{noformat}
<--- Transmitting SIP response (523 bytes) to UDP:10.24.18.16:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.24.18.16:5060;rport=5060;received=10.24.18.16;branch=z9hG4bKPjmhHcOuPaVtnVSjW2AgGSmmRaAiVg9PHp
Call-ID: -e2xHKoB4XlTjKgb7vkJuAvd8hyg11tG
From: "ALICE<6001>" <sip:ALICE at 10.24.18.124>;tag=w22zundV7JYzkWnQx30dB4kvnnsnRT8F
To: <sip:6002 at 10.24.18.124>;tag=2fcfc6cb-291d-4385-8ef7-1831b48c186f
CSeq: 32028 INVITE
Server: MyUserAgentValue
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER, REGISTER
Content-Length:  0


  == Spawn extension (from-internal, 6002, 1) exited non-zero on 'PJSIP/ALICE-00000000'
<--- Transmitting SIP request (412 bytes) to UDP:10.24.21.155:5060 --->
CANCEL sip:BOB at 10.24.21.155:5060 SIP/2.0
Via: SIP/2.0/UDP 10.24.18.124:5060;rport;branch=z9hG4bKPjcec45a11-7822-482d-8183-6439a90b9818
From: "ALICE<6001>" <sip:ALICE at 10.24.18.124>;tag=573aea0f-20d5-4530-9665-88897b6bfc7a
To: <sip:BOB at 10.24.21.155>
Call-ID: 0a586558-4ac4-4308-a316-81a10f1eb23d
CSeq: 24341 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: MyUserAgentValue
Content-Length:  0
{noformat}

and my pjsip.conf global section:

{noformat}
[global]
type=global
max_forwards=70
user_agent=MyUserAgentValue
debug=no
{noformat}

> user_agent not set in Server header
> -----------------------------------
>
>                 Key: ASTERISK-25453
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25453
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 13.6.0
>            Reporter: Ross Beer
>            Assignee: Ross Beer
>            Severity: Minor
>
> user_agent in pjsip.conf is not propagating to the 'server' header in responses.
> {noformat}
> [global]
> user_agent=Custom User Agent
> {noformat}
> {noformat}
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP <IPADDRESS>:5060;rport=5060;received=<IPADDRESS>;branch=z9hG4bK1ed3e105
> Call-ID: 3a30dacd2da58a420e184dda0d8b223f@<IPADDRESS>:5060
> From: "Withheld" <sip:Withheld@<IPADDRESS>>;tag=as58d74c06
> To: <sip:37.157.54.198>;tag=z9hG4bK1ed3e105
> CSeq: 102 OPTIONS
> Accept: application/sdp, application/dialog-info+xml, application/pidf+xml, application/dialog-info+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/simple-message-summary, message/sipfrag;version=2.0
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE, REGISTER
> Supported: 100rel, timer, replaces, norefersub
> Accept-Encoding: text/plain
> Accept-Language: en
> Server: Asterisk PBX 13.6.0-rc3
> Content-Length:  0
> {noformat}
> The value is correctly being used in user-agent headers.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list