I am having trouble with codec negotiation. I have Asterisk running at the office and a SIP phone at home. In my sip.conf, I have allow ordered as follows:
alaw ulaw g729 and gsm
On all my office extensions, I have no allow, or disallow entries. My Cisco gateway is setup to do alaw ulaw g729 and gsm
My home phone does g729 alaw and ulaw. In sip.conf, I have disallow all
and allow g729. In all my extensions and cisco gateway I have canreinvite set to yes and my dial commands don’t have the t option, so all sip endpoints can talk directly to each other (rtp).
If I call from home to the office, calls go through fine. SIP show channels, shows that the call is g729 as one would expect.
If I get a call from Office to home, or from PSTN (via Cisco) to home, the phone rings, but as soon as I answer it hangs up.
May 29 05:45:49 WARNING: channel.c:2115 ast_channel_make_compatible: No path to translate from SIP/390-8a3b(256) to SIP/192.168.44.23-08acccf0(8)
– SIP/390-8a3b is ringing
– SIP/390-8a3b answered SIP/192.168.44.23-08acccf0
May 29 05:45:55 WARNING: channel.c:2115 ast_channel_make_compatible: No path to translate from SIP/192.168.44.23-08acccf0(8) to SIP/390-8a3b(256)
May 29 05:45:55 WARNING: app_dial.c:1006 dial_exec: Had to drop call because I couldn’t make SIP/192.168.44.23-08acccf0 compatible with SIP/390-8a3b
== Spawn extension (default, 390, 1) exited non-zero on ‘SIP/192.168.44.23-08acccf0’
No I am pretty sure what is happening is that as I have no g.729 licences running in Asterisk it can’t bridge the call. When Digium get back to me with my 9.729 licence keys this might work, but why does Asterisk not force a call to be initiated with G.729 at both ends? Other SIP servers find a common codec and send this as an allowed codec to both parties to setup the call in the invite sequence. It appears that Asterisk simply bridges the call and then lets the endpoints sort out codecs on a reinvite. Problem here is that Asterisk needs enough licences and uses CPU cycles bridging calls to start with.
Is there a dial program switch that forces Asterisk to negotiate compatible codecs right from the beginning?
Thanks to the gurus who might no the answer to this one.