Hello,
for changing the user-agent header you can use:
remove_hf("User-Agent");
append_hf("User-Agent: abc\r\n");
Cheers,
Daniel
On 02/02/16 11:20, Steven Maddox wrote:
Hi,
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.
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.
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.
Someone gave me a link to this as a starting point...
https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-reques…
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.
The normal configuration of an "Approved" phone is *like*...
username="441234111999"
password="rAnD0Mp4s5"
auth_user="jsmith"
domain="company.co.uk"
registrar/proxy="uk.ic.56hnt.hlpcom.co.uk"
In terms of the configuration of an "Unapproved" phone I can either...
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.
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.
Any thoughts?
n.b.
1) Yes changing the user agent definitely does allow you connect, it's
not just a guess - tested it with Asterisk.
2) No I don't think the hosted PBX supports path extensions - I'd
rather not rely on it supporting undocumented stuff anyway.
--
Steven Maddox
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio -
http://www.asipto.com
http://miconda.eu