0
votes

I'm running a bunch of Asterisk servers that make outbound calls to the same ISP with multiple billing accounts and therefore need some SIP+RTP proxy.

https://wiki.asterisk.org/wiki/display/AST/PJSIP+with+Proxies In this guide they are referring to a proxy, but from my understanding Kamailio is SIP only. What would be the best way to set up a proxy like in the guide?

Background

My set up is:

ISP XYZ __ billing account 1 ___ my asterisk server 10.0.0.3
        \_ billing account 2 __/

Since the ISP authenticates by IP (and they are not going to change it), I've no way to tell that some calls are on billing 1 and some are on billing 2.

Therefore I was tyring to come up with the right proxy I can use outbound_proxy

ISP XYZ __ billing account 1 __ SIP/RTP proxy on IP 10.0.0.1 ___ my asterisk server 10.0.0.3
        \_ billing account 2 __ SIP/RTP proxy on IP 10.0.0.2 __/
2
Hi! Why you need SIP + RTP proxy? I think for your case you will need only SIP proxy - Kamailio. Your ISP most is interested from where SIP traffic is routed I'm very confident that they don't care if RTP goes from same IP and in some legit cases this even might be a case. And by the way if you use Kamailio you can have several separate IPs assigned to same server and then you can route based on that, so I think you just need one Kamailio with several IPsos11k
@os11k using multiple outbound is a great idea but I couldn't figure out how to do it, so I resorted to having two distinct machines. Thank you for the SIP only heads up, I'll try to confirm thisM4rk
you just need to have several "listen" parameters in Kamailio and then you need to check $Ri what is received IP, seems simple for me. :)os11k

2 Answers

1
votes

Maybe you don't need 2 sip proxy, only 2 ip address for asterisk.

You can define 2 pjsip transport, one for each IP address.

[transport-account-1]
type = transport
protocol = udp
bind = 10.0.0.1

[transport-account-2]
type = transport
protocol = udp
bind = 10.0.0.2

then you can define 2 trunks for outbound calls, one with

transport = transport-account-1 

and the other with

transport = transport-account-2 
-2
votes

You can use rtpproxy proxy or mediaproxy with kamailio.

You can use simple NAT and port forward and your asterisks.

Anyway, I not see how it related to asterisk and this is NOT programming question.