[Asterisk-Users] Asterisk codec detection problem !

Hamid Hashemi hamid at morva.net
Thu Apr 13 14:32:03 MST 2006


Hi ,

Here is my scenario :
I have an 7940 Cisco IP phone which can handle g711ulaw,g711alaw and 
g729 codecs itself. A Quintum A800 which configured to work with 
g711ulaw and a Cisco Gateway which configured to accept g729 codecs 
only. The Quintum gateway is local gateway which connected to PSTN for 
Local PSTN calls and Cisco Gateway is on the internet which can handle 
international Calls.
The problem is that when I configure my sip.conf like this on my asterisk :

[Cisco-7940]
type=friend
secret=<PRIVATE>
username=hamid
host=dynamic
disallow=all
allow=ulaw
alllow=g729

[quintum]
type=peer
context=from-pstn
host=xxx.xxx.xxx.xxx
callerid=From PSTN
disallow=all
allow=ulaw

[Cisco-Int]
type=peer
host=xxx.xxx.xxx.xxx
disallow=all
allow=g729

the preffered codec for cisco-7940 will be ulaw and it will work OK for 
calls to PSTN ( I mean quintum ). but when I want to call international 
numbers ( I mean Cisco-Int ) it will warn that there is no g729 to ulaw 
translation available and will disconnect the call ( Cause I don't have 
chan_g729.so on my asterisk ) however my own Cisco-7940 can handle g729 
codec itself and the asterisk should just passthrough ( make bridge ) to 
work with g729 codec. The same problem will happen for quintum if I 
change the allow=g729 position with allow=ulaw on cisco-7940 config. How 
can I solve this ?

BTW I check the same scenario with OpenSER and everythings working like 
a charm without any problem. I mean my PSTN calls go through the Quintum 
with ulaw codec and the international calls go through the Cisco with 
g729 as codec without any problem.

Regards
Hamid Hashemi



More information about the asterisk-users mailing list