[SR-Users] [Kamailio]: INVITE Authorization

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 3 11:20:38 CET 2010


Hello,

On 12/2/10 1:42 PM, Spinov Evgeniy wrote:
> Hello.
>
> I have Kamailio ( K in further ) and 2x Asterisk boxes ( A1 and A2 in
> further ) configured, so UAC registers at K and when it sends a call,
> it's routed to A1 or A2, balanced.
>
> The problem is, that I cannot find how to authorize INVITE requests, so
> unregistered UAC could not send INVITE requests. Simply cannot find
> anything.
>
> I'm making registration, using www_authorize() and checking all INVITES
> with proxy_authorize(). Just after kamailio is started - everything
> works fine and as planned: registered UAC can call and not registered -
> cannot. But after aproximately 40 seconds everything is stopped. Not
> calls passed and everybody receives 407 Proxy Authorization is required.
>
> So, the question: how it is correctly to verify that incoming INVITE on
> K is authorized? It seems to me that I'm doing that in wrong way.
you have to do proxy_authorize() for each invite you want to authorize 
(if you look at default config file for v3.1.x and search for WITH_AUTH, 
you will see the config actions for authentication). The asterisks must 
accept SIP traffic based on source ip filtering, allowing only calls 
coming from kamailio.

If you mean that the calls are interrupted after 40 seconds, then it is 
very likely ACK is not routed properly. If you mean something else, 
capture the SIP traffic via ngrep/wireshark, run kamailio in higher 
debug lever (debug=3 in config) and send the SIP trace and the syslog 
messages. Also, try to describe in more details what actually seems to 
go wrong. All these will help people here on mailing list to give you 
proper hints how to solve.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com




More information about the sr-users mailing list