[Asterisk-Users] Codec Issue
Aisling
ashling.odriscoll at cit.ie
Tue Mar 14 10:18:50 MST 2006
Hi,
I have an issue which is kind of a catch 22 situation. I had outgoing calls
to my new PSTN provider working perfectly. Then I started focussing on
incoming calls. It seems that I can solve an error which gets my incoming
calls working but that in turns means my outgoing calls don't work. -
Strange
Anyhow I was getting an error:
Process_sdp: No compatible codecs!
And from the SIP debug I could see that the incoming SIP INVITE was getting
a sip response of 488 Unacceptable here from my asterisk server.
After doing a bit of searching I determined that this might be the fault of
the codec's particularly the G729 codec. So in the peer block that I have
for my PSTN provider in my sip conf I specified allow=g729.
I called my PSTN geographic number again and was delighted when the incoming
calls worked. However when I next went to make an outgoing call (after
having added in the "allow=g729" line), I got an infinite loop of warnings:
WARNING: chan_sip.c: 2520 sip_write: Asked to transmit frame type 256, while
native formats is 8 (read/write = 8/8)
WARNING: codec_gsm.c165 gsmtolin_framein: Huh? A GSM frame that isn't a
multiple of 33 or 65 bytes long from RTP
After those warnings I thought there might be a problem with the gsm codec
so I commented the lines containing "allow=gsm" and still kept the line
"allow=g729" because as I've said already incoming calls won't work
otherwise 9but outgoing will).
This however just gave another warning:
WARNING: chan_sip.c: 2520 sip_write: Asked to transmit frame type 4 while
native formats is 256 (read/write=64/64).
When I comment this line out again I am back to my original situation where
outgoing calls work and incoming don't.
I have included my sip.conf code and extensions.conf code below:
;sip.conf
[general]
bindport=5064
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
srvlookup=yes
canreinvite=no;
autocreatepeer=yes
nat=yes
;dtmfmode=info
;dtmfmode=rfc2833
insecure=very
registerattempts=0
;context=default
register => username at providerIP/1234
;To make outgoing calls specify this block
[providerIP]
type=peer
user=phone
host=providerIP
port=6060
fromdomain=providerIP
fromuser=username
secret=password
username=username
insecure=very
context=incomingpstn
authname=username
allow=gsm
allow=ulaw
allow=alaw
;allow=g729 ;NBNB This is where the issue is
[314]
type=friend
username=314
canreinvite=no
context=from-provider
insecure=very
host=dynamic
nat=yes
dtmfmode=rfc2833
mailbox=314
disallow=all
allow=alaw
allow=ulaw
allow=g723.1
allow=g729
[2092]
type=friend
username=2092
canreinvite=no
context=from-provider
insecure=very
host=dynamic
nat=yes
dtmfmode=rfc2833
mailbox=2092
disallow=all
allow=alaw
allow=ulaw
allow=g723.1
allow=g729
;extensions.conf
[general]
static=yes
writeprotect = yes
allow=alaw
;specify context for receiving incoming calls
[from-provider]
include => createmenu
include => createconf
include => joinconf
include => playvoicemail
;include => internalExt
;include => incomingpstn
include => default
[createmenu]
;Create an IVR Menu
exten => 20005,1,Wait(2)
exten => 20005,2,Record(/tmp/asterisk-recording:gsm)
exten => 20005,3,Wait(2)
exten => 20005,4,Playback(/tmp/asterisk-recording)
exten => 20005,5,wait(2)
exten => 20005,6,Hangup
[createconf]
;Create a conference call
exten => 20006,1,Wait(1)
exten => 20006,2,MeetMe(|MD)
exten => 20006,3,Hangup
[joinconf]
;Join a conference call
exten => 20007,1,Answer
exten => 20007,2,Wait(1)
exten => 20007,3,MeetMe(|P)
[playvoicemail]
;listen to voicemails
exten => 171,1,VoicemailMain(${CALLERIDNUM})
;Send PSTN calls to Provider
exten => _X.,1,Dial(SIP/${EXTEN}@ipaddressofprovider)
exten => _X.,2,Hangup
[default]
;voicemail
exten => 314, 1,Dial(SIP/314,20)
exten => 314, 2,Voicemail(u314)
exten => 314, 102,Voicemail(b314)
exten => 314, 103,Hangup
exten => 2092, 1,Dial(SIP/2092,20)
exten => 2092, 2,Voicemail(u2092)
exten => 2092, 102,Voicemail(b2092)
exten => 2092, 103,Hangup
[incomingpstn]
;The below two lines dial a particular extension
exten => 4590124,1,Wait(1)
exten => 4590124,n,Dial(SIP/314 at ipaddressofser,20,r)
-------------------Legal Disclaimer---------------------------------------
The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 25440 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060314/83f3eaa9/winmail.bin
More information about the asterisk-users
mailing list