Hi list,
I'm trying to configure kamailio to work as a OBP (Outbound Proxy).
Basically KAMAILIO receive requests from UAs, after that it acts like a client and send those requests to the IP-PBX. On the same way the responses are forwarded from IP-PBX to the UAs.
[UA] --> [KAMAILIO] --> [IP-PBX ] [UA] <-- [KAMAILIO] <-- [IP-PBX ]
Following possible call flow:
[UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP Status: 407 Proxy Authentication Required [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 407 Proxy Authentication Required [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO] [UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 183 Session Progress, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 183 Session Progress, with session description [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 180 Ringing, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 180 Ringing, with session description (...) [UA ] -> [KAMAILIO] SIP Request: CANCEL sip:12345678909@[KAMAILIO] [KAMAILIO] -> [UA ] SIP Status: 200 OK [KAMAILIO] -> [IP-PBX ] SIP Request: CANCEL sip:12345678909@[IP-PBX ] [IP-PBX ] -> [KAMAILIO] SIP Status: 200 OK [IP-PBX ] -> [KAMAILIO] SIP Status: 487 Request Terminated [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 487 Request Terminated [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO]
Wondering if anyone could help to make this configuration work?
Thanks, Sunny
Hello,
On 7/5/11 8:46 PM, Sunny wrote:
Hi list,
I'm trying to configure kamailio to work as a OBP (Outbound Proxy).
Basically KAMAILIO receive requests from UAs, after that it acts like a client and send those requests to the IP-PBX. On the same way the responses are forwarded from IP-PBX to the UAs.
[UA] --> [KAMAILIO] --> [IP-PBX ] [UA] <-- [KAMAILIO] <-- [IP-PBX ]
Following possible call flow:
[UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP Status: 407 Proxy Authentication Required [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 407 Proxy Authentication Required [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO] [UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 183 Session Progress, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 183 Session Progress, with session description [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 180 Ringing, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 180 Ringing, with session description (...) [UA ] -> [KAMAILIO] SIP Request: CANCEL sip:12345678909@[KAMAILIO] [KAMAILIO] -> [UA ] SIP Status: 200 OK [KAMAILIO] -> [IP-PBX ] SIP Request: CANCEL sip:12345678909@[IP-PBX ] [IP-PBX ] -> [KAMAILIO] SIP Status: 200 OK [IP-PBX ] -> [KAMAILIO] SIP Status: 487 Request Terminated [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 487 Request Terminated [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO]
Wondering if anyone could help to make this configuration work?
what I understood from above is that you need to update the domain in R-URI from [kamailio] to [ip-pbx]. This is easy to do:
$rd = [ip-pbx];
You have to do this for initial requests (register, invite).
If you need to update From header URI, look at uac module, uac_replace_from().
Cheers, Daniel
Hi Daniel,
I was using: $ru = $(ru{re.subst,/[KAMAILIO]/[IP-PBX ]/}); t_relay_to_udp("[IP-PBX ]", "5060"); but your way looks better.
This works fine in this direction: [UA] --> [KAMAILIO] --> [IP-PBX ]
but not in this: [UA] <-- [KAMAILIO] <-- [IP-PBX ] because Kamailio is not keeping the location of the UA.
I want to register UA's on Kamailio, but the authentication is done by [IP-PBX]... So Kamailio as Outbound Proxy + Location Server ... any idea on how I can achieve this configuration?
Thanks, Sunny
On 8 July 2011 09:38, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
On 7/5/11 8:46 PM, Sunny wrote:
Hi list,
I'm trying to configure kamailio to work as a OBP (Outbound Proxy).
Basically KAMAILIO receive requests from UAs, after that it acts like a client and send those requests to the IP-PBX. On the same way the responses are forwarded from IP-PBX to the UAs.
[UA] --> [KAMAILIO] --> [IP-PBX ] [UA] <-- [KAMAILIO] <-- [IP-PBX ]
Following possible call flow:
[UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP Status: 407 Proxy Authentication Required [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 407 Proxy Authentication Required [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO] [UA ] -> [KAMAILIO] SIP/SDP Request: INVITE sip:12345678909@[KAMAILIO], with session description [KAMAILIO] -> [UA ] SIP Status: 100 Trying [KAMAILIO] -> [IP-PBX ] SIP/SDP Request: INVITE sip:12345678909@[IP-PBX ], with session description [IP-PBX ] -> [KAMAILIO] SIP Status: 100 Trying [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 183 Session Progress, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 183 Session Progress, with session description [IP-PBX ] -> [KAMAILIO] SIP/SDP Status: 180 Ringing, with session description [KAMAILIO] -> [UA ] SIP/SDP Status: 180 Ringing, with session description (...) [UA ] -> [KAMAILIO] SIP Request: CANCEL sip:12345678909@[KAMAILIO] [KAMAILIO] -> [UA ] SIP Status: 200 OK [KAMAILIO] -> [IP-PBX ] SIP Request: CANCEL sip:12345678909@[IP-PBX ] [IP-PBX ] -> [KAMAILIO] SIP Status: 200 OK [IP-PBX ] -> [KAMAILIO] SIP Status: 487 Request Terminated [KAMAILIO] -> [IP-PBX ] SIP Request: ACK sip:12345678909@[IP-PBX ] [KAMAILIO] -> [UA ] SIP Status: 487 Request Terminated [UA ] -> [KAMAILIO] SIP Request: ACK sip:12345678909@[KAMAILIO]
Wondering if anyone could help to make this configuration work?
what I understood from above is that you need to update the domain in R-URI from [kamailio] to [ip-pbx]. This is easy to do:
$rd = [ip-pbx];
You have to do this for initial requests (register, invite).
If you need to update From header URI, look at uac module, uac_replace_from().
Cheers, Daniel
-- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda
2011/7/14 Sunny no7find@gmail.com:
but not in this: [UA] <-- [KAMAILIO] <-- [IP-PBX ] because Kamailio is not keeping the location of the UA.
I want to register UA's on Kamailio, but the authentication is done by [IP-PBX]... So Kamailio as Outbound Proxy + Location Server ... any idea on how I can achieve this configuration?
Use Path mechanism so Kamailio would add a "Path" header in the REGISTER before relaying it to the PBX. But the PBX MUST support Path mechanism (RFC 3327).
Anyhow, for sure you would do much better by making Kamailio also acting as a registrar. Why do you need the PBX to be the registrar?
On 14 July 2011 00:36, Iñaki Baz Castillo ibc@aliax.net wrote:
2011/7/14 Sunny no7find@gmail.com:
but not in this: [UA] <-- [KAMAILIO] <-- [IP-PBX ] because Kamailio is not keeping the location of the UA.
I want to register UA's on Kamailio, but the authentication is done by [IP-PBX]... So Kamailio as Outbound Proxy + Location Server ... any idea on how I can achieve this configuration?
Use Path mechanism so Kamailio would add a "Path" header in the REGISTER before relaying it to the PBX. But the PBX MUST support Path mechanism (RFC 3327).
Anyhow, for sure you would do much better by making Kamailio also acting as a registrar. Why do you need the PBX to be the registrar?
-- Iñaki Baz Castillo ibc@aliax.net
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Yes I want to make it as a register but I don't want to store authentication information in the kamailio. So any REGISTER request is forwarded to the PBX.
No. Time Source Destination Protocol Info 14 2.513377 [UA] [KAMAILIO] SIP Request: REGISTER sip:[KAMAILIO] 15 2.513768 [KAMAILIO] [UA] SIP Status: 100 Trying (0 bindings) 16 2.514937 [KAMAILIO] [IP_PBX] SIP Request: REGISTER sip:[IP_PBX]:5060 17 2.537112 [IP_PBX] [KAMAILIO] SIP Status: 407 Proxy Authentication Required (0 bindings) 18 2.537819 [KAMAILIO] [UA] SIP Status: 407 Proxy Authentication Required (0 bindings) 19 2.580087 [UA] [KAMAILIO] SIP Request: REGISTER sip:[KAMAILIO] 20 2.580486 [KAMAILIO] [UA] SIP Status: 100 Trying (0 bindings) 21 2.581165 [KAMAILIO] [IP_PBX] SIP Request: REGISTER sip:[IP_PBX]:5060
Is it possible to do this in kamailio?