<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    for changing the user-agent header you can use:<br>
    <br>
    remove_hf("User-Agent");<br>
    append_hf("User-Agent: abc\r\n");<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 02/02/16 11:20, Steven Maddox wrote:<br>
    </div>
    <blockquote cite="mid:56B082D7.6070500@lantizia.me.uk" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      Hi,<br>
      <br>
      I've brought up this topic up before (here and on IRC) and I feel
      like I'm getting closer but still a bit stuck.  Since it takes a
      while to explain the idea (and get past any confusion!) I've
      summarized it in a diagram for easier understanding.<br>
      <br>
      At work my employers have decided to use this god awful hosted PBX
      which is picky about which phones can register and checks their
      user agent, the hosted PBX is marked on the diagram as the purple
      blob.<br>
      <br>
      <br>
      <br>
      The progress I've made since last time is getting Kamailio 4.2.4
      on that little white device, the *only* purpose of that device is
      to change the user agent - nothing more... since it has lots of
      ports it could have lots of "Unapproved" phones directly connected
      to it.<br>
      <br>
      Someone gave me a link to this as a starting point... <a
        moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/"><a class="moz-txt-link-freetext" href="https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/">https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/</a></a>
      <br>
      However I'm not sure what portions of the default kamailio.cfg
      should be kept to use this, additionally it doesn't include
      anything about changing user agents.<br>
      <br>
      The normal configuration of an "Approved" phone is *like*...<br>
      <br>
      username="441234111999"<br>
      password="rAnD0Mp4s5"<br>
      auth_user="jsmith"<br>
      domain="company.co.uk"<br>
      registrar/proxy="uk.ic.56hnt.hlpcom.co.uk"<br>
      <br>
      In terms of the configuration of an "Unapproved" phone I can
      either...<br>
      <br>
      1) Put in exactly the same as above (as though it isn't intending
      to contact Kamailio)... but since the phone is directly connected
      to the Kamailio device - perhaps Kamailio could watch SIP traffic
      coming in on eth1 (even if it isn't addressed to it), alter the
      user agent and pass it out through eth0 ?  I'm not sure even
      Kamailio is capable of this - but it'd be cool if possible.<br>
      <br>
      2) Put in exactly the same as above however just change the
      registrar/proxy to be the IP of the Kamailio device... Kamailio
      can then keep all other configuration the same as it passes it
      through - just change the user agent.<br>
      <br>
      Any thoughts?<br>
      <br>
      n.b.<br>
      1) Yes changing the user agent definitely does allow you connect,
      it's not just a guess - tested it with Asterisk.<br>
      2) No I don't think the hosted PBX supports path extensions - I'd
      rather not rely on it supporting undocumented stuff anyway.<br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Steven Maddox</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://miconda.eu">http://miconda.eu</a></pre>
  </body>
</html>