[Spce-user] Multiple ports for peer

Andreas Granig agranig at sipwise.com
Fri Apr 29 15:52:22 EDT 2011


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20110429/5301cc2c/attachment-0001.asc>


More information about the Spce-user mailing list