1 Reply Latest reply on May 30, 2019 9:39 AM by jwable

    HMR to replace Contact header

    mcdeeiis New Member

      My new sip provider has asked me to send my account number in either the FROM or CONTACT header. I tried the following:


      This is what I get when I use the default configuration:


      From: <sip:2034885265@some.sip.provider:5060;transport=UDP>;tag=3be43e8-7f000001-13c4-46d9e-c3e718c6-46d9e

      Contact: <sip:2034885265@x.x.x.x:5060;transport=UDP>


      This is when I add ANI substitution(where 1111111 is my account number).


      From: <sip:1111111@sip.novanet.net:5060;transport=UDP>;tag=5275ac8-7f000001-13c4-4008bf-bf76c84c-4008bf

      Contact: <sip:1111111@x.x.x.x:5060;transport=UDP>


      The ANi substitution will definitely not work as we need to pass different caller id's based on the projects we do.


      I would like achieve something like this... FROM should contain caller id and CONTACT should contain Account number.


      From: <sip:2034885265@some.sip.provider:5060;transport=UDP>;tag=3be43e8-7f000001-13c4-46d9e-c3e718c6-46d9e

      Contact: <sip:1111111@x.x.x.x:5060;transport=UDP>


      Any help is really appreciated.

        • Re: HMR to replace Contact header
          jwable Frequent Visitor

          Here's what I use to change/add the Diversion header if your SIP Provider accept Diversion as a valid field.  You could probably just change the word diversion to contact below but I have not tested that scenario because our SIP Provider uses diversion for call accounting and not contact.


          hmr policy TRUNK

            rule-set DiversionChange 1



          hmr rule-set DiversionChange

            message-rule CHANGE_Diversion message-type any 1

              match header diversion

              modify header diversion position first-match new-value /sip:@sip.provider.com/ 2


          voice trunk T0X type sip

          hmr TRUNK out


          John Wable