[Asterisk-Dev] IAX codec negociation (again...)

Rich Adamson radamson at routers.com
Mon Jun 20 15:00:34 MST 2005


> >>>If you define your iax channel in terms of type=user and type=peer, you
> >>>can define your codec preference. At least it works for iax links to
> >>>other asterisk boxes, so presumably it works with iax clients as well.
> >>>
> >>So it should also be possible to define the codec preference for 
> >>incoming and outgoing if you define the iax channel in terms of 
> >>type=friend, isn't it ?
> >>    
> >
> >If I understood your question, no. There is no way to specify a different
> >codec for incoming vs outgoing calls using type=friend. But, I'm not
> >sure what real reason one would have for using two different codec
> >preferences like this.
> >
> >
> You did not understant. I want the opposit: defining the same codec(s) 
> for both incomming and outgoing for a peer using "type=friend". But at 
> he moment it doesn't work. If a peer is defined with "type=friend", the 
> "allow=" line(s) in the [peer] section only has effect for outgoing 
> calls (originating from this peer). For incomming call (routed to this 
> peer in the dialplan), the codec(s) defined with the "allow=" line(s) of 
> the [general] section of iax.conf apply.
> 
> example:
> 
> [phone1]
> type=friend
> host=dynamic
> context=local
> secret=secret
> disallow=all
> allow=gsm
> allow=ilbc
> 
> I would like that, with this, all the calls comming from or going to 
> phone1 only use gsm or ilbc (even if phone1 support other codecs). A the 
> moment, this only impacts calls coming from phone1. Call going to phone 
> 1 are only impacted by the codec choice in the [general] section and of 
> course the codec(s) supported by the phone.

Okay, now I understand. And yes, I see the same thing here. Probably
time to open a bug report on it with clear doc (since I misread the
previous stuff rather easily).

Based on my previous experience connecting two asterisk boxes, we seen
exactly the same issue. Our work around was to simply change the choice
in the [general] section on one system. Since one of these two systems
was on Stable while the other was cvs-head, I didn't think much of it
and simply assumed it was a Stable issue that hadn't caught up. But
apparently a bad assumption on my part.





More information about the asterisk-dev mailing list