1 Reply Latest reply on Jan 8, 2019 2:22 PM by azbrewsky

    How to i manipulate the Contact Header in SIP INVITE to match registration?

    timlytle New Member

      I am using a TA908e, converting SIP to PRI,      SIP trunk  to Softswitch requires registration,  the trunk registers but calls fail,     The issue is that the INVITE for Registration has contact header with the proper information, the INVITE for the Call has the calling number in the contact header, the Softswitch can not associate that contact headed to the registered account and fails the call  

       

      How can i change the Contact header on this trunk to always supply the auth-name and not the calling number information.    I do not want to change the To and from headers

       

       

       

       

       

      voice trunk T10 type sip

        description "SIP_245 SIP Connection to Voice Access Network for PRI"

        sip-server primary x.x.x.x

        registrar primary x.x.x.x

        outbound-proxy primary x.x.x.x

        dial-string source to

        register 123456 auth-name 123456 password "passowrd"

        codec-list Default_List both

        authentication username 123456 password "password"

       

       

       

       

       

       

      Registration

       

      REGISTER sip:x.x.x.x:5060 SIP/2.0

      From: <sip:123456@x.x.x.x:5060;transport=UDP>;tag=4fa49cd8-7f000001-13c4-2419-32d8c585-2419

      To: <sip:123456@x.x.x.x:5060;transport=UDP>

      Call-ID: 4fb1d010-7f000001-13c4-2419-6163690d-2419

      CSeq: 1 REGISTER

      Via: SIP/2.0/UDP y.y.y.y:5060;branch=z9hG4bK-2419-8d021b-73d65b5f

      Max-Forwards: 70

      Supported: 100rel,replaces

      Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER

      User-Agent: ADTRAN_Total_Access_908e_3rd_Gen/R13.2.2.E

      Contact: <sip:123456@y.y.y.y:5060;transport=UDP>

      Expires: 3600

      Content-Length: 0

       

       

       

      Outbound Call

       

      INVITE sip:8125551111@x.x.x.x:5060 SIP/2.0

      From: <sip:8125552222@x.x.x.x:5060;transport=UDP>;tag=4fa9b408-7f000001-13c4-2b0c-2109aaae-2b0c

      To: <sip:8125551111@x.x.x.x:5060>

      Call-ID: 4fad9b28-7f000001-13c4-2b0c-519356f9-2b0c@x.x.x.x

      CSeq: 1 INVITE

      Via: SIP/2.0/UDP y.y.y.y:5060;branch=z9hG4bK-2b0c-a82941-290cb9cb

      Max-Forwards: 70

      Supported: 100rel,replaces

      Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER

      User-Agent: ADTRAN_Total_Access_908e_3rd_Gen/R13.2.2.E

      Contact: <sip:8125552222@y.y.y.y:5060;transport=UDP>

      Content-Type: application/sdp

      Content-Length: 257

        • Re: How to i manipulate the Contact Header in SIP INVITE to match registration?
          azbrewsky New Member

          You will need to change the PAI in your outbound trunk.

           

          !

          !

          voice trunk T01 type sip

            description "Description - not really needed here"

            sip-server primary <ip of carrier> udp 5060

            domain "voip.carrier.com"

            max-number-calls 50

            hmr Trunk1_Outbound out

            register 6027821177 auth-name "<registration ID" password encrypted "<registration password>"

            trust-domain

            codec-list G711 both

            grammar from host domain

            grammar p-asserted-identity host domain

            grammar to host domain

            authentication username "<registration ID" password encrypted "<registration password>"

            transfer-mode network

          !

          !

          hmr policy Trunk1_Outbound

            rule-set Add_PAI_Trunk1 10

          !

          !

          hmr rule-set Add_PAI_Trunk1

            message-rule Initialize_Variables message-type request 10

              set private-variable Add_PAI  new-value false  10

            message-rule Remove_Existing_PAI message-type any 15

              remove header p-asserted-identity position all  10

            message-rule Check_For_PAI_Candidates message-type request 20

              set private-variable Add_PAI  header sip-req-uri position first match-value "/^INVITE /" new-value true  10

            message-rule Add_PAI_If_Needed message-type request 30

              match private-variable Add_PAI match-value true

              add header p-asserted-identity position first new-value /<sip:%public.Privacy_Prefix_1%>/  10

          !

          !

          hmr set public-variable Privacy_Prefix_1 new-value "<sip registration number>@voip.carrier.com"