Branko Samardzic
2005-Nov-07 21:51 UTC
[Asterisk-Users] How to make write and read formats equal to native format?
I am playing around with different codecs between 2 * servers. However I don't seem to have any impact on bandwith. I always get something like this: Name: IAX2/ds02-1 Type: IAX2 UniqueID: 1131421484.2 Caller ID: s Caller ID Name: (N/A) DNID Digits: (N/A) State: Up (6) Rings: 0 NativeFormat: 2 WriteFormat: 64 ReadFormat: 64 1st File Descriptor: -1 Frames in: 182 Frames out: 468 Time to Hangup: 0 Elapsed Time: N/A Direct Bridge: Zap/1-1 Indirect Bridge: Zap/1-1 -- PBX -- Context: foo Extension: s Priority: 1 Call Group: 0 Pickup Group: 0 Application: Bridged Call Data: Zap/1-1 Blocking in: ast_waitfor_nandfds Variables: BRIDGEPEER=Zap/1-1 DIALEDPEERNUMBER=ds02/95 Native format represents what I've chosen for codec of preference. However, data exchange is done with Read/Write Format 64 (16 bit Signed Linear PCM). Any idea on how to enforce native format into read and write streams? Any help appreciated. Regards, B.
Matt Riddell
2005-Nov-08 02:30 UTC
[Asterisk-Users] How to make write and read formats equal to native format?
Branko Samardzic wrote:> Any idea on how to enforce native format into read and write streams?In the peer definition (iax.conf or sip.conf) put: disallow=all allow=CODEC_YOU_WANT where CODEC_YOU_WANT is something like gsm, g729, ulaw etc (keep it to one entry at both ends and you're guaranteed they'll use it). -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
Hi, I am trying to make following setup PSTN --> Asterisk_1 ------- IAX2 stream over Internet -----> Asterisk_2 --> PSTN ^ | AGI control App Basically this is calling card solution that accepts calls from PSTN of one country checks user credentials (PIN and access rights), collects destination number and establishes IAX2 connection with another Asterix server in different country that is used to terminate call on another PSTN. So far I made everything working nice except one VERY important thing: IAX2 stream over Internet is at least in one direction bearing 16 bit Signed Linear PCM data although I insisted on GSM codec. As link has limited bandwith (64kpbs) it becomes congested with single call. My iax.conf files contain disallow=all and allow=gsm in general section on both servers but it is of no help. Is there any chance to tweak IAX2 stream to be symetric (i.e. to bring GSM encoded audio in both directions) and how to achieve that. Any help is appreciated. Regards, B.S.