6 thoughts on - SIPAddHeader not working

  • Hello,

    does anyone have a SIP trace for me where the SIPheader “Privacy: id” is
    present ?? If so, what Asterisk version ?

  • Hello,

    none of the 2 SIP headers are sent…

    dialplan :

    exten => 67121212,1,NoOp()
    exten => 67121212,n,Set(CALLERID(all)=”32596666″ <32596666>)
    exten => 67121212,n,SIPAddHeader(P-Preferred-Identity:
    )
    exten => 67121212,n,SIPAddHeader(Privacy: id)
    exten => 67121212,n,Dial(SIP/32596666/67121212)

    CLI :

    INVITE sip:67121212@sip.voip.tld SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.106:5063;branch=z9hG4bK-1b5cdb51
    Remote-Party-ID: “VC” ;screen=yes;party=calling
    Call-ID: 2a80707a-bdb7c895@192.168.1.106
    CSeq: 101 INVITE
    Max-Forwards: 70
    Contact: “VC”

    Expires: 240
    User-Agent: Linksys/SPA941-5.1.8
    Content-Length: 399
    Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
    Supported: replaces
    Content-Type: application/sdp

    Jonas.

  • Indeed !

    This is the correct INVITE :

    /INVITE sip:67121212@ip_itsp SIP/2.0
    Via: SIP/2.0/UDP ip_asterisk:5060;branch=z9hG4bK533e235b;rport
    Max-Forwards: 70
    Contact:
    Call-ID: 60a418e909842287111a1a403498d11b@ip_asterisk
    CSeq: 102 INVITE
    User-Agent: Asterisk PBX 1.6.2.16.1
    Remote-Party-ID: “32596666”
    ;privacy=off;screen=no
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
    Supported: replaces, timer
    Privacy: id
    Content-Type: application/sdp
    Content-Length: 266

    v=0
    o=voip 108024060 108024060 IN IP4 ip_asterisk
    s=Asterisk PBX 1.6.2.16.1
    c=IN IP4 ip_asterisk
    t=0 0
    m=audio 11574 RTP/AVP 8 3 101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    a=sendrecv/

    I notice the presence of the “Privacy: id” SIP header, which is OK !

    I also notice the presence of a “Remote-Party-ID” SIPheader… Where
    does this come from ?! Not from my dialplan…

  • Not really :

    [32596666]
    type=peer
    host=ip_itsp
    username=32596666
    secret=guessthis
    dtmfmode=rfc2833
    canreinvite=no
    qualify=yes
    disallow=all
    allow=alaw
    allow=gsm
    amaflags=documentation

  • That’s why it’s sending RPID. Somewhere in your sip.conf you have sendrpid=yes (wether that’s peer specific, or in general). Try setting it to ‘no’ on the peer?

    S