Hadar Pedhazur
2004-Mar-08 17:02 UTC
[Asterisk-Users] Codec Translation Problem on IAX Softphones - Incoming Only
This is my first post to the list, and while I am sorry that I have a problem that I need to bring to the list, I have been a very satisfied reader/lurker on the list, which has saved me from asking lots of questions so far :-). Apologies in advance for the length... I am new to *, but am already hooked, and have a reasonably complicated setup working nearly perfectly. I have three separate * servers under my control. One is on a static publically available server (no boards in it, so it's more like a "switch"). The other two are behind NAT'ed routers, and each have two Digium X100P cards in them, with Sipura 2000 connected to the phones for each card. I have ITSP accounts for outgoing with VoicePulse and NuFone as well. I never know where I am going to be, so I set up the servers for multiple ringing. If a call comes in to any of the three * servers, the appropriate line(s) ring in all locations at the same time. This works fantastically well. In addition to this, I badly want to use an IAX softphone as well, since I already stare at my laptop screen for 12+ hours every day, with a headset on (listening to MP3s :-), so it would take less time to answer the call on the laptop than to switch headsets to the phone. Now to the problem... If I use Sipura connected phones, everything works flawlessly, every time. If I initiate a call from the softphone (my current favorite is DIAX, latest version), then all is fine as well. I get in trouble if I _answer_ a call with any IAX softphone, that came in on a "real" Zap channel. It's most definitely a codec translation problem, but I can dial _out_ from DIAX via a Zap channel, and have that call answered and be able to communicate, so I'm not sure exactly what the problem is. First, the specific error: Mar 8 18:03:20 NOTICE[1209277232]: channel.c:1097 ast_read: Dropping incompatible voice frame on IAX2[apartment]/4 of format GSM since our native format has changed to ULAW I get hundreds of these in rapid succession until I kill the call. Just to pendatically repeat myself, the same exact devices work fine if DIAX initiates the call (even if it ends up passing over a real Zap channel to the Sipura), and if the Sipura initiates the call and DIAX picks it up, the above is the error. Here are the relevant sections of the iax.conf file: [general] port=5036 bandwidth=high disallow=all allow=ulaw allow=alaw allow=gsm allow=iLBC tos=lowdelay ; ; Connect to the apartment * server ; [apartment] context=apartment-in type=friend host=apartment.XXXXX.com secret=mysecret auth=md5 [hadar] type=friend context=from-hadar secret=mysecret auth=md5 host=dynamic callerid="Hadar Pedhazur" <(XXX) XXX-XXXX> mailbox=100 In the "apartment" server iax.conf file, I have an identical set of declarations in the [general] section, and nearly identical sections for the devices there (meaning, no one is overriding the codecs defined in general). I have played with a number of permutations of playing with the codecs in general as well as the individual ones, and the above works best for everything except a call _answered_ by DIAX. Any pointers would be greatly appreciated!
Hadar Pedhazur
2004-Mar-09 09:15 UTC
[Asterisk-Users] Codec Translation Problem on IAX Softphones - Incoming Only
Philipp von Klitzing was kind enough to send the solution to me off list, and I want to save others from responding as well, since his solution worked! Here's what he wrote: Add this to the [hadar] context and reload the server: disallow=all allow=gsm Only after seeing this, did I realize how obvious it is. Clearly, the IAX softphones can only handle GSM, and by not overriding the default setting of allowing ulaw, I was telling * that it was OK to change the format from GSM to ULAW since the Sipura wanted ULAW. Doh. On a separate note, I was having trouble getting cut off after 20-30 seconds on calls from DIAX to other IAX2 servers, but not from my hard phones connected via Sipuras. A quick google of the list solved that problem too, by adding: notransfer=yes to the same context above. I think that's because my softphone is behind NAT, on the same segment that another * server is behind NAT as well, or something similar to that. Anyway, all is right with the world again :-) Thanks Philipp! ----------------------------------------------------------------- Lots of snipping, just summary problem and conf files left in... Hadar Pedhazur wrote:> Just to pendatically repeat myself, the same exact devices > work fine if DIAX initiates the call (even if it ends up > passing over a real Zap channel to the Sipura), and if the > Sipura initiates the call and DIAX picks it up, the above is > the error. > > Here are the relevant sections of the iax.conf file: > > [general] > port=5036 > bandwidth=high > disallow=all > allow=ulaw > allow=alaw > allow=gsm > allow=iLBC > tos=lowdelay > > ; > ; Connect to the apartment * server > ; > [apartment] > context=apartment-in > type=friend > host=apartment.XXXXX.com > secret=mysecret > auth=md5 > > [hadar] > type=friend > context=from-hadar > secret=mysecret > auth=md5 > host=dynamic > callerid="Hadar Pedhazur" <(XXX) XXX-XXXX> > mailbox=100 > > In the "apartment" server iax.conf file, I have an identical > set of declarations in the [general] section, and nearly > identical sections for the devices there (meaning, no one is > overriding the codecs defined in general). I have played > with a number of permutations of playing with the codecs in > general as well as the individual ones, and the above works > best for everything except a call _answered_ by DIAX. > > Any pointers would be greatly appreciated!