[asterisk-users] Calling SIP extension through Local/XXXX negotiates slin codec instead of gsm
Alex Villacís Lasso
a_villacis at palosanto.com
Fri Feb 17 17:33:23 CST 2012
I am configuring a test Asterisk server (1.8.9.2) to practice setting a single codec globally, to avoid transcoding as much as possible. Since all of my recordings are in gsm format, I am trying to make the SIP clients use gsm everywhere. I am using Ekiga
on Fedora 16 x86_64 for my tests.
[root at elx2 asterisk]# cat /etc/asterisk/sip_general_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
vmexten=*97
faxdetect=yes
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-2.8.1(1.8.9.2)
disallow=all
allow=gsm
allow=alaw
allow=ulaw
allow=g729
allow=g723
allow=g722
allow=speex
I am using the originate command through the Asterisk console to test this. With plain SIP/1064, codec negotiation works as expected:
elx2*CLI> channel originate SIP/1064 application playback demo-congrats
elx2*CLI> core show channels
Channel Location State Application(Data)
SIP/1064-00000044 (None) Up Playback(demo-congrats)
1 active channel
0 active calls
86 calls processed
elx2*CLI> core show channel SIP/1064-00000044
-- General --
Name: SIP/1064-00000044
Type: SIP
UniqueID: 1329515589.179
LinkedID: 1329515589.179
Caller ID: 1064
Caller ID Name: device
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
DNID Digits: (N/A)
Language: en
State: Up (6)
Rings: 0
NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264)
WriteFormat: 0x2 (gsm)
ReadFormat: 0x2 (gsm)
WriteTranscode: No
ReadTranscode: No
1st File Descriptor: 17
Frames in: 153
Frames out: 385
Time to Hangup: 0
Elapsed Time: 0h0m10s
Direct Bridge: <none>
Indirect Bridge: <none>
-- PBX --
Context: from-internal
Extension:
Priority: 1
Call Group: 0
Pickup Group: 0
Application: Playback
Data: demo-congrats
Blocking in: ast_waitfor_nandfds
Variables:
SIPCALLID=14a13ecb635daaed76e6ab905ba0cff1 at 192.168.5.193:5060
CDR Variables:
level 1: dnid=
level 1: clid="device" <1064>
level 1: src=1064
level 1: dst=s
level 1: dcontext=from-internal
level 1: channel=SIP/1064-00000044
level 1: lastapp=Playback
level 1: lastdata=demo-congrats
level 1: start=2012-02-17 16:53:09
level 1: answer=2012-02-17 16:53:11
level 1: duration=9
level 1: billsec=7
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1329515589.179
level 1: linkedid=1329515589.179
level 1: sequence=217
However, when I use Local/XXXX at from-internal to call the same extension, I get a different codec:
elx2*CLI> channel originate Local/1064 at from-internal application playback demo-congrats
elx2*CLI> core show channels
Channel Location State Application(Data)
SIP/1064-00000043 1064 at from-internal:1 Up Playback(demo-congrats)
1 active channel
0 active calls
86 calls processed
elx2*CLI> core show channel SIP/1064-00000043
-- General --
Name: SIP/1064-00000043
Type: SIP
UniqueID: 1329515478.176
LinkedID: 1329515478.176
Caller ID: 1064
Caller ID Name: device
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
DNID Digits: (N/A)
Language: en
State: Up (6)
Rings: 0
NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264)
WriteFormat: 0x2 (gsm)
ReadFormat: 0x40 (slin)
WriteTranscode: No
ReadTranscode: Yes gsm->slin
1st File Descriptor: 33
Frames in: 168
Frames out: 560
Time to Hangup: 0
Elapsed Time: 0h0m11s
Direct Bridge: <none>
Indirect Bridge: <none>
-- PBX --
Context: from-internal
Extension: 1064
Priority: 1
Call Group: 0
Pickup Group: 0
Application: Playback
Data: demo-congrats
Blocking in: ast_waitfor_nandfds
Variables:
MACRO_DEPTH=0
BRIDGEPEER=Local/1064 at from-internal-49cb;2
DIALEDPEERNUMBER=1064
SIPCALLID=1166452b23d0a3e611e72eb05d812537 at 192.168.5.193:5060
KEEPCID=TRUE
CWIGNORE=
EXTTOCALL=1064
TTL=64
CDR Variables:
level 1: dnid=
level 1: clid="device" <1064>
level 1: src=1064
level 1: dst=s
level 1: dcontext=from-internal
level 1: channel=SIP/1064-00000043
level 1: start=2012-02-17 16:51:20
level 1: duration=10
level 1: billsec=0
level 1: disposition=NO ANSWER
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1329515478.178
level 1: linkedid=1329515478.177
level 1: sequence=215
Why the difference? Is the client really using slin for one half of the stream? If so, how can I make it use gsm in the Local case?
More information about the asterisk-users
mailing list