[erlang-questions] Multiple SCTP associations

Kenneth Flanagan <>
Mon Apr 21 16:07:51 CEST 2008

Hi Serge,
Thanks for that. It's multiple single homed I trying to use and I've
worked out what I'm doing wrong. Initially I had problems sending h.248
because I couldn't find hrl's for record #sctp_sndrcvinfo where you need
to change the ppid (7 for h.248). I eventually copied in the structure
to my own hrl and set assoc_id = 1 by default, so every instance of my
MGW tried to use the same.

Once I make assoc_id dynamic (i.e. different for every instance of the
MGW) it works fine. Thanks again for the mail. I've muddled my own way
with SCTP_o_erlang up to now. Nice to know someone can help out :)

Best Regards,

-----Original Message-----
From: Serge Aleynikov [mailto:] 
Sent: 20 April 2008 03:02
To: Kenneth Flanagan
Subject: Re: [erlang-questions] Multiple SCTP associations

I am not able to reproduce your problem on Fedora Core 8, R11B-5.  Note
that for the sake of example I opened the multi-homed server socket on
two IPs, though this works even if you augment the IPs (e.g. 


4> f(S), {ok, S} =
5> gen_sctp:listen(S, true).
6> gen_sctp:recv(S).
7> gen_sctp:recv(S).
8> gen_sctp:recv(S).

1> f(S), {ok, S} = gen_sctp:open([{ip, {192,168,0,14}}]).
2> f(A), {ok, A} = gen_sctp:connect(S, {192,168,0,13}, 1234, []).

1> f(S), {ok, S} = gen_sctp:open([{ip,{192,168,0,13}}]).
2> f(A), {ok, A} = gen_sctp:connect(S, {192,168,0,13}, 1234, []).

3> gen_sctp:send(S, A, 3, <<"Test">>).

Kenneth Flanagan wrote:
> Hello,
> I have written a very simple H.248/SCTP Media Gateway application for 
> loading up our Gateway Controller. Initially I had a lot of problems 
> getting SCTP working, and finally it did with Debian Linux and Erlang 
> OTP R11B-5. It works fine simulating one MGW, accepting over a 1000 
> calls/second, but I need to simulate multiple MGWs (to show calls 
> between MGWs, and I have enough processor capacity & bandwidth to do 
> it).
> There is only 1 network card available for SCTP, and I have multiple 
> virtual interfaces. The problem is when I open another association and

> try to send data I get error "epipe". It does not matter if I open 
> another erlang node, or try it on the same node. The IP addresses work

> individually, i.e. it's not the address that has the problem.
> I would appreciate any help/comments on this, Best Regards, Ken.
> ----------------------------------------------------------------------
> --
> ----------------------------------------------------------------------
> --
> ----------------------------------------------------------------------
> -
> LM Ericsson Limited
> Registered Office: Beech Hill, Clonskeagh, Dublin 4 Registered Number 
> in Ireland : 21679

More information about the erlang-questions mailing list