[Asterisk-Users] codec issues between linphone and *

a.ahmad at dsl.pipex.com a.ahmad at dsl.pipex.com
Tue Jul 13 10:36:26 MST 2004


Hello    
     
I am trying to connect linphone 0.12.2 to an * 0.9.1 box over a LAN  using the 
console version of linphone. both boxs are using the latest alsa drivers on a 
LFS kernal 2.4. I am running into errors with codec compatability between 
linphone and *. 
 
A point to note is that I am able to connect to asterisk using other sip    
phones noteably sjphone however linephone is giving me some problems.    
  
I can even connect from the linphone console to asterisk and hear the default  
message however the connection dies on linphones side but the default message 
completes to the end. I get the following output: 
  
  | INFO1 | <ict_callbacks.c: 30> Transaction 1 killed.  
  
I have have configured the .linphone config file (as shown below) to use 
various codecs pcmu gsm & speex and in sip.conf on * to use specific codes to 
no avail. 
 
I have some Q which are still unclear to me despite sifting through the 
archives. 
 
Q1 what is the dtmfmode based on ( i read that it is determined according to 
the phone being use and i have also read that it is base on he codec being 
used, rfc2833 for alaw/ulaw info/outband for others. Does this need to be set 
for me to carry out a test from linphonec to * default message? 
 
Q2 the rtp ports used by asterisk rang from 10000/20000 while linphone uses 
7078, which I changed to 17078 to allow it to fall within the range. however I 
notice during the invite/ok trans. that rtp uses 18XXX and then uses 0 when no 
codec can be agreed upon.  
 
Q3 Does sip and rtp negotiate codes independently of eachother I have noticed 
and read the rtp seems to have a choice of pcmu/gsm/speex despite me having 
asked it to use them. can these be set/controlled from somewhere. 
 
I have yet to find a webpage explaining the possible setting of a linphonec 
config file. I am not sure as to it is using ~/.linphonec or ~/.gnome2/
linphone config file. 
 
I have also seen that there is a sdp patch for when linphone doesn't accept a 
codec (e.g. a payload type), the SDP frame respond with a port equal to 0, but 
the payload type correspondingis not sent. would this help me with my 
problems? 
 
patch link: http://lists.gnu.org/archive/html/linphone-users/2004-07/
msg00009.html 
 
I have attached the the output from linephonec debug output, .linphonec config 
and my asterisk sip.conf file below. any sort of advice would be appreciated  
 
thanks in advance. Amjad 
 
how would i reply to an answer if I have to? do i email replies or is it 
conmtrolled from within the thread? thanks 
 
 
*****************asterisk output******************* 
 
CLI> reloaD 
Jul 13 18:25:14 WARNING[16384]: chan_iax2.c:5689 set_config: Ignoring port for 
now 
Jul 13 18:25:14 NOTICE[16384]: indications.c:394 
ast_unregister_indication_country: Removed default indication country 'uk' 
*CLI> 
 
Sip read: 
INVITE sip:1000 at 192.168.10.20 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.24:5060;branch=z9hG4bK2213492093 
From: <sip:aa at 192.168.10.24>;tag=2982198999 
To: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 20 INVITE 
Contact: <sip:aa at 192.168.10.24> 
max-forwards: 10 
user-agent: oSIP/Linphone-0.12.1 
Content-Type: application/sdp 
Content-Length:   212 
 
v=0 
o=aa 123456 654321 IN IP4 192.168.10.24 
s=A conversation 
c=IN IP4 192.168.10.24 
t=0 0 
m=audio 7078 RTP/AVP 110 101 
b=AS:8 
a=rtpmap:110 speex/8000/1 
a=rtpmap:101 telephone-event/8000 
a=fmtp:101 0-11 
 
11 headers, 10 lines 
Using latest request as basis request 
Sending to 192.168.10.24 : 5060 (non-NAT) 
Found audio format UNKN 
Found audio format UNKN 
Found description format speex 
Found description format telephone-event 
Capabilities: us - 524814, them - 512/0, combined - 512 
Non-codec capabilities: us - 1, them - 1, combined - 1 
Looking for 1000 in default 
list_route: hop: <sip:aa at 192.168.10.24> 
Transmitting (no NAT): 
SIP/2.0 100 Trying 
Via: SIP/2.0/UDP 192.168.10.24:5060;branch=z9hG4bK2213492093 
From: <sip:aa at 192.168.10.24>;tag=2982198999 
To: <sip:1000 at 192.168.10.20>;tag=as062515d4 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 20 INVITE 
User-Agent: Asterisk PBX 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER 
Contact: <sip:1000 at 192.168.10.20> 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
We're at 192.168.10.20 port 17090 
Answering with capability 2 
Answering with capability 4 
Answering with capability 8 
Answering with capability 512 
Reliably Transmitting (no NAT): 
SIP/2.0 200 OK 
Via: SIP/2.0/UDP 192.168.10.24:5060;branch=z9hG4bK2213492093 
From: <sip:aa at 192.168.10.24>;tag=2982198999 
To: <sip:1000 at 192.168.10.20>;tag=as062515d4 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 20 INVITE 
User-Agent: Asterisk PBX 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER 
Contact: <sip:1000 at 192.168.10.20> 
Content-Type: application/sdp 
Content-Length: 236 
 
v=0 
o=root 4112 4112 IN IP4 192.168.10.20 
s=session 
c=IN IP4 192.168.10.20 
t=0 0 
m=audio 17090 RTP/AVP 3 0 8 110 
a=rtpmap:3 GSM/8000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:8 PCMA/8000 
a=rtpmap:110 SPEEX/8000 
a=silenceSupp:off - - - - 
 
 to 192.168.10.24:5060 
 
 
Sip read: 
ACK sip:1000 at 192.168.10.20 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.24:5060;branch=z9hG4bK2088217008 
From: <sip:aa at 192.168.10.24>;tag=2982198999 
To: <sip:1000 at 192.168.10.20>;tag=as062515d4 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 20 ACK 
max-forwards: 10 
user-agent: oSIP/Linphone-0.12.1 
Content-Length: 0 
 
 
9 headers, 0 lines 
Jul 13 18:25:38 NOTICE[311311]: channel.c:1508 ast_set_read_format: Unable to 
find a path from SPEEX to ULAW 
Jul 13 18:25:38 NOTICE[311311]: channel.c:1478 ast_set_write_format: Unable to 
find a path from GSM to SPEEX 
Jul 13 18:25:38 WARNING[311311]: chan_sip.c:1333 sip_write: Asked to transmit 
frame type 4, while native formats is 512 (read/write = 4/2) 
Jul 13 18:25:38 WARNING[311311]: file.c:538 ast_readaudio_callback: Failed to 
write frame 
Jul 13 18:25:38 NOTICE[311311]: channel.c:1478 ast_set_write_format: Unable to 
find a path from ULAW to SPEEX 
Jul 13 18:25:38 WARNING[311311]: file.c:171 ast_stopstream: Unable to restore 
format back to 4 
set_destination: Parsing <sip:aa at 192.168.10.24> for address/port to send to 
set_destination: set destination to 192.168.10.24, port 5060 
Reliably Transmitting: 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 (no NAT) to 192.168.10.24:5060 
Retransmitting #1 (no NAT): 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
Retransmitting #2 (no NAT): 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
Retransmitting #3 (no NAT): 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
Retransmitting #4 (no NAT): 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
Retransmitting #5 (no NAT): 
BYE sip:aa at 192.168.10.24 SIP/2.0 
Via: SIP/2.0/UDP 192.168.10.20:5060;branch=z9hG4bK1b7c2ff1 
From: <sip:1000 at 192.168.10.20>;tag=as062515d4 
To: <sip:aa at 192.168.10.24>;tag=2982198999 
Contact: <sip:1000 at 192.168.10.20> 
Call-ID: 728714378 at 192.168.10.24 
CSeq: 102 BYE 
User-Agent: Asterisk PBX 
Content-Length: 0 
 
 
 to 192.168.10.24:5060 
Jul 13 18:25:44 WARNING[213006]: chan_sip.c:497 retrans_pkt: Maximum retries 
exceeded on call 728714378 at 192.168.10.24 for seqno 102 (Request) 
 
*CLI> 
 
*****************sip.conf************************* 
[general] 
port=5060                       ; Port to bind to 
bindaddr=192.168.10.20          ; Address to bind SIP channel to 
context=default                 ; Default context for incoming calls 
 
;localnet=192.168.10.0          ; Internet NETWORK address 
;localmask=255.255.255.0        ; Internet netmask 
;srvlookup = yes                ; Enable DNS SRV lookups on outbound calls 
;pedantic = yes                 ; Enable slow, pedantic checking for Pingtel 
;tos=lowdelay                   ; IP QoS parameter, either keyword or value 
 
;maxexpirey=3600                ; Max length of incoming registration we allow 
;defaultexpirey=120             ; Default length of incoming/outoing 
registration 
;notifymimetype=text/plain      ; Allow overriding of mime type in NOTIFY 
;videosupport=yes               ; Turn on support for SIP video 
 
dissallow=all                   ; Disallow all codecs 
;allow=all 
;allow=speex 
;allow=ulaw 
;allow=gsm                      ; Allow codecs in order of preference 
:allow=ilbc 
 
*****************.linphonec config file **************************** 
[net] 
if_name=rhine 
con_type=1 
use_nat=0 
 
[sip] 
username=aa 
hostname=192.168.10.24 
sip_port=5060 
use_registrar=0 
as_proxy=0 
expires=900 
 
[sound] 
dev_id=1 
rec_lev=80 
play_lev=80 
source=m 
local_ring=/usr/share/sounds/linphone/rings/oldphone.wav 
remote_ring=/usr/share/sounds/linphone/ringback.wav 
 
[rtp] 
audio_rtp_port=17078 
video_rtp_port=0 
audio_jitt_comp=60 
video_jitt_comp=60 
 
[video] 
enabled=0 
show_local=0 
 
[audio_codec_0] 
mime=PCMU 
rate=8000 
enabled=0 
 
[audio_codec_3] 
mime=GSM 
rate=8000 
enabled=0 
 
[audio_codec_2] 
mime=PCMA 
rate=8000 
enabled=0 
 
[audio_codec_1] 
mime=speex 
rate=8000 
enabled=1 
 
[audio_codec_4] 
mime=speex 
rate=16000 
enabled=0 
 
[audio_codec_5] 
mime=1015 
rate=8000 
enabled=0 
 
[address_book] 
entry_count=0 
--  



More information about the asterisk-users mailing list