0
votes

I am using a PBX (Asterisk) and all Inbound calls come through my Proxy (Kamailio). I would like for all outbound calls that go through my PBX to be controlled by the Proxy also. Currently outbound calls go through the PBX and communicate with endpoints. I would like my Proxy to be the endpoint for all communication. In my mind for this to happen, Kamailio would have to make the SIP call. Is this correct?

Thank you!

2
you can use kamailio to "be the endpoint for all communication" but that is not "making SIP calls" so the title is not very accurate.sotoz

2 Answers

1
votes

The question is rather vague, however, if you want to send the call from Asterisk PBX to Kamailio and Kamailio to send it further to a carrier or SIP device, then, yes, it is possible.

One of the common use cases is Asterisk sending the calls to Kamailio, which does least cost routing or load balancing to a group of carriers (see dispatcher, lcr or carrierroute modules).

0
votes

You can use kamailio as an outbound proxy for calls that come from your B2BUA (in that case Asterisk).

An example in the pjsip.conf

[myitsp]
type = endpoint
; other stuff
outbound_proxy = sip:192.168.0.1\;lr

That will tell Asterisk to route all outbound calls through this outbound proxy. You just need to make sure that Kamailio is configured correctly to also receive traffic from your Asterisk server.

More information in the Asterisk docs