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