[Spce-user] Multiple ports for peer

Oskar Krigh oskar at voicetech.se
Tue May 3 02:37:37 EDT 2011


Hi, and thanks for the answers.
The second alternative sounds good, but unfortionatly im not able to add the second peer, since it is the same ip as the first one. I haven’t tried to add it directly into the database, I have just used the GUI for this.
Would it be a GUI question or wont it work to add an extra peer with the same IP?

The First alternative works, but my proxy starts to send out packets on that second port to, and that is not what I want.

Hope for more answers
		
/Oskar

-----Original Message-----
From: spce-user-bounces at lists.sipwise.com [mailto:spce-user-bounces at lists.sipwise.com] On Behalf Of Andreas Granig
Sent: den 29 april 2011 21:52
To: spce-user at lists.sipwise.com
Subject: Re: [Spce-user] Multiple ports for peer

Hi,

So you want to send traffic to that peer from your local standard port 5060, and receive traffic from that peer on your local port, let's say, 55060? Then you'd just need to add another listen directive in
/etc/ngcp-config/templates/etc/kamailio/kamailio.cfg.tt2 and execute "ngcpcfg apply". Should work.

Or do you actually mean that your local port stays 5060, but you send requests to peer port 5060, but receive it from peer port 55060? Then you need to create two separate peers in your config. Just add the peer with port 55060 (where you receive traffic from, but never send traffic
to) in a separate group, but don't create any peering rules for it (so it's never used for outbound requests).

Andreas

On 04/29/2011 09:40 PM, Dejan Kurel wrote:
> I believe you would just add one more listen directive as you 
> previously suggested.
> Although I'm not quite sure if you would have to write additional 
> routing logic for that or not. Hopefully someone will clarify, and my 
> thanks go to this person in advance.
> 
> D.
> 
> On 04/29/2011 09:10 PM, Oskar Krigh wrote:
>> Well, i will try this, and i guess it works. I just hoped for a more 
>> "real" solution.
>> When you can have kamilio listening on multiple ports I just hoped 
>> that it would exist a more world known solution to it.
>>
>> If the iptables solution is the only one right now I guess I have to 
>> go for it, but it is Many companies out there that want to go for a 
>> more "secure" solution, and communicate on different ports.
>>
>> /Oskar
>>
>> -----Original Message-----
>> From: Dejan Kurel [mailto:dkurel at cryptotel.com]
>> Sent: den 29 april 2011 20:48
>> To: VoiceTech | Oskar Krigh; spce-user at lists.sipwise.com
>> Subject: Re: [Spce-user] Multiple ports for peer
>>
>> This should be easily accomplished with iptables:
>>
>> iptables -A PREROUTING -p udp --dport 55060 -j REDIRECT --to-port 
>> 5060
>>
>> With this - everything that comes to port UDP 55060 will be 
>> redirected to UDP 5060.
>>
>> Hope this helps. Of course, you can change ports per your specific needs.
>>
>> Dejan
>>
>> On 04/29/2011 09:36 AM, VoiceTech | Oskar Krigh wrote:
>>> Hi
>>> Is it possible to have a peer to be able to communicate on multiple 
>>> ports?
>>> So in my case i have a peer that i communicate with on port 5060, 
>>> and when my peer is going to communicate with me i recieve all 
>>> packets on another port.
>>>
>>> So i guess i first have to get kamailio to listen on multiple ports, 
>>> but that is the easy part.
>>>
>>> So how do i set the peer to accept incoming pacets on more than one 
>>> port?
>>>
>>>
>>> /Oskar
>>>
>>>
>>> _______________________________________________
>>> Spce-user mailing list
>>> Spce-user at lists.sipwise.com
>>> http://lists.sipwise.com/listinfo/spce-user
>>
> 
> 
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user






More information about the Spce-user mailing list