[OpenSER-Users] OpenSER as Asterisk/CallWeaver frontend

Christian Schlatter cs at unc.edu
Tue Aug 28 05:56:09 CEST 2007


Eugene Prokopiev wrote:
> Hi,
> 
> Can anybody tell some success story about using OpenSER as 
> Asterisk/CallWeaver frontend? I tried to googling first but where are no 
> detailed useful stories :(

OpenSER can come in quite handy to augment asterisk's SIP channel. I'm 
combining asterisk with an openser instance on one host to act as our 
emergency calling (911) border controller. Openser is used to rewrite 
SIP pings issued by asterisk to check the SIP over VPN trunk to our 911 
provider.

Openser is listening on port 5069,

(openser.cfg)

e.g. listen=udp:x.x.x.x:5069

and asterisk's SIP channel is configured with an outbound proxy like

(/etc/asterisk/sip.conf)

[911-provider]
type=peerInside openser's routing script you could
host=y.y.y.y
port=5069
outboundproxy=x.x.x.x


You could let openser listening on both virtual interfaces like

listen=udp:10.0.0.2:5060
listen=udp:10.0.0.3:5060

and use openser's force_send_socket() to select the interface for 
outgoing SIP requests targeted for provider1/2.

http://www.openser.org/dokuwiki/doku.php/core-cookbook:1.2.x#force_send_socket_protoaddress_port

Asterisk/CallWeaver would send all SIP traffic to one of openser's 
listening sockets e.g. using the outboundproxy setting. The openser 
routing script would be responsible for sending the requests to the 
correct provider.

I haven't tested this scenario but I think it should work like that.

/Christian


> 
> Now I have CallWeaver (Asterisk fork) installed on Linux server which 
> connected to 2 different providers via one wan interface but 2 ip 
> addresses from one network, for example:
> 
> eth0 - 10.0.0.2/24 -> provider1(10.0.2.1)
>      - 10.0.0.3/24 -> provider1(10.0.3.1)
> 
> So, I need send SIP requests to provider1 from address 10.0.0.2/24 and 
> to provider2 from 10.0.0.3/24. This must be done because my internet 
> provider must account trafic on router 10.0.0.1 for 2 VoIP providers 
> separately and it's billing system can do it only by different source ip 
> addresses and can't do it by destination ip addresses.
> 
> I can separate SIP requests between 2 ip addresses with linux kernel 
> 2.6.18 or higher by using ip_nat_sip iptables module and MARK/SNAT. But 
> this approach can't be used in OpenVZ virtial environment in which 
> CallWeaver must be used.
> 
> Is it possible to send SIP requests from CallWeaver via OpenSER and 
> modify them with OpenSER to replace source addresses in UDP headers and 
> SIP headers? How can I say CallWeaver to send SIP requests via OpenSER? 
> How can I implement this routing logic in OpenSER? Can anybody give me a 
> simple example?
> 
> -- 
> Thanks,
> Eugene Prokopiev
> 
> 
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users





More information about the sr-users mailing list