[Asterisk-Dev] Multiple Asterisks on one machine

Nicholas Hart nic at gttelegraph.net
Mon Feb 16 07:18:18 MST 2004


Forgive my ignorance of some Linux network intricacies, however....

1) To solve a different problem I was able quite easily to run 2 x
Asterisk on one box, using UML (User mode linux).
2) You mention you are binding Asterisk to specific interfaces, however I
think this only controls the receive side - have you considered the
transmit side?  My understanding is that the send and receive sides of a
session are quite distinct.  In my case I was trying to set up tunnels
(PPTP,L2TP) and it proved impossible to control the used interfaces for
transmitting in a multi-interface system, which in turn prevented
tunnelling from working. (without getting into fixing the code ;-))
3) Why is there a problem with CAPI and jitter buffer? hopefully on CAPI
--> SIP direction the phone buffer should be effective? and surely the
CAPI channel must provide some buffer otherwise it is hardly usefull?

hope this helps...

nic


> Hi all,
>
> I need to get a jitter buffer between my SIP phones and my CAPI ISDN
> lines, to fix stuttering sound on the CAPI lines.
>
> I asked the mailing list a while about whether anyone would be interested
> in modularising the IAX jitter buffer into a generic buffer that would
> work with SIP, H.323, etc. but disappointingly nobody responded that they
> would find it useful.
>
> Hence I'm trying to find a way to use the existing facilities. I've tested
> it using two machines running Asterisk, and it works very well, improves
> the quality greatly. Now I'm trying to get it working using a single
> machine, by running two Asterisk processes on the same machine. This is
> proving trickier than expected, and I could use some advice.
>
> First of all I split my single configuration in two, placing the config
> files in /etc/asterisk-sip and /etc/asterisk-capi. The CAPI configuration
> is almost untouched for now, since I'm just testing this arrangement, but
> the SIP configuration is stripped right down to remove unnecessary modules
> that might conflict with the other process.
>
> First I wanted to simply run IAX2 on a different port between the two
> Asterisk processes, but that doesn't appear to be possible because
> chan_iax2 currently ignores the port option. The code to process it is
> disabled, but enabling it doesn't seem to help.
>
> So instead, I allocated a new IP address to the machine, and bound each
> Asterisk process's CAPI server to its own IP address. netstat -anp shows
> the two processes bound to different IP addresses:
>
> udp        0      0 192.168.123.9:5036      0.0.0.0:*	8617/asterisk
> udp        0      0 192.168.123.2:5036      0.0.0.0:*   8418/asterisk
> udp        0      0 0.0.0.0:5060            0.0.0.0:*   8418/asterisk
> udp        0      0 0.0.0.0:5061            0.0.0.0:*   8617/asterisk
> udp        0      0 192.168.123.9:4569      0.0.0.0:*   8617/asterisk
> udp        0      0 192.168.123.2:4569      0.0.0.0:*   8418/asterisk
>
> The CAPI process is fine and running normally. However, when I start the
> SIP process, they start jabbering at each other like crazy, generating
> enormous amounts of debug logs and loopback network traffic. The SIP
> server IAX2 debug shows:
>
> Rx-Frame Retry[No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: VNAK
>    Timestamp: 02645ms  SCall: 00225  DCall: 00006 [192.168.123.2:5036]
> Tx-Frame Retry[002] -- OSeqno: 000 ISeqno: 001 Type: IAX    Subclass: PONG
>    Timestamp: 00001ms  SCall: 00006  DCall: 00225 [192.168.123.2:5036]
>
> over and over again, very fast. I don't think this is looping back into
> the same process, as tcpdump shows:
>
> 12:32:53.795637 192.168.123.9.4569 > 192.168.123.2.5036: udp 12 [tos 0x10]
> 12:32:53.795868 192.168.123.2.5036 > 192.168.123.9.4569: udp 12 [tos 0x10]
> 12:32:53.796309 192.168.123.9.4569 > 192.168.123.2.5036: udp 12 [tos 0x10]
> 12:32:53.796580 192.168.123.2.5036 > 192.168.123.9.4569: udp 12 [tos 0x10]
>
> Can anyone explain to me what's happening here? Why is the SIP process
> using its own IAX2 port (4569) to talk to the IAX1 port (5036) of the
> other process? I was expecting to see 4569 -> 4569, but I'm no expert on
> the IAX protocols. What are they saying to each other? why send an
> unsolicited PONG, why VNAK, and why the retry?
>
> Cheers, Chris.
> --
> _  __ __     _
>  / __/ / ,__(_)_  | Chris Wilson -- UNIX Firewall Lead Developer |
> / (_  ,\/ _/ /_ \ | NetServers.co.uk http://www.netservers.co.uk |
> \__/_/_/_//_/___/ | 21 Signet Court, Cambridge, UK. 01223 576516 |
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>


------------------------------
Nicholas Hart
GTTelegraph
www.gttelegraph.net
------------------------------



More information about the asterisk-dev mailing list