[asterisk-users] Set Call Codec in extension.conf

Faraj Khasib fkhasib at iconnecths.com
Wed Jan 4 12:03:46 CST 2012


there is nothing in sip.conf about what u asked
but 6500 is a queue with following info
[6500]
fullname = testing
strategy = rrmemory
timeout = 15
wrapuptime = 15
autofill = no
autopause = no
joinempty = yes
leavewhenempty = no
reportholdtime = no
maxlen = 0
musicclass = test
member = SIP/6251
member = SIP/6252
member = SIP/6253
member = SIP/6254

now the user 6251 is a user with following info and caller 6000

[6000]
username = 6000
transfer = yes
mailbox = 6000
call-limit = 100
type = peer
fullname = 6000
registersip = no
host = dynamic
callgroup = 1
type = peer
context = DLPN_DialPlan1
cid_number = 6000
hasvoicemail = no
vmsecret =
email =
threewaycalling = no
hasdirectory = no
callwaiting = no
hasmanager = no
hasagent = no
hassip = yes
hasiax = yes
nat = yes
canreinvite = no
dtmfmode = rfc2833
insecure = no
pickupgroup = 1
disallow = all
allow = ulaw,gsm,h263,h263p,h264
autoprov = no
label =
macaddress =
linenumber = 1
LINEKEYS = 1
callcounter = yes

[6251]
username = 6251
transfer = yes
mailbox = 6251
call-limit = 100
type = peer
fullname = 6251
registersip = no
host = dynamic
callgroup = 1
type = peer
context = DLPN_DialPlan1
cid_number = 6251
hasvoicemail = no
vmsecret =
email =
threewaycalling = no
hasdirectory = no
callwaiting = no
hasmanager = no
hasagent = yes
hassip = yes
hasiax = yes
nat = yes
canreinvite = no
dtmfmode = rfc2833
insecure = no
pickupgroup = 1
disallow = all
allow = ulaw,gsm,h263,h263p,h264
autoprov = no
label =
macaddress =
linenumber = 1
LINEKEYS = 1

________________________________________
From: asterisk-users-bounces at lists.digium.com [asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas [danny at debsinc.com]
Sent: Wednesday, January 04, 2012 12:00 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

Please post the sip.conf entries for 6000 and 6500.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 11:56 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

I am the other end .... most codecs are available ....
now my problem is when I make audio call using one side its converted to
video call request (since my other end has also all codecs) my app clients
can do Audio and Video call, now the Video call is ok but the Audio part get
converted to video request ...so I am trying to limit the codec to only
audio codec...
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas
[danny at debsinc.com]
Sent: Wednesday, January 04, 2012 11:54 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

You are fighting a losing battle - you can't control the other end Ignoring
${SIP_CODEC} variable because it is not shared by both ends.

You can probably do a SIP SET DEBUG ON and see what codecs are available on
the other end.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 11:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

    -- Executing [6500 at DLPN_DialPlan1:1] Set("SIP/6000-00000000",
"SIP_CODEC=gsm
") in new stack
    -- Executing [6500 at DLPN_DialPlan1:2] Set("SIP/6000-00000000",
"SIP_CODEC_INB
OUND=gsm") in new stack
    -- Executing [6500 at DLPN_DialPlan1:3] Set("SIP/6000-00000000",
"SIP_CODEC_OUT
BOUND=gsm") in new stack
    -- Executing [6500 at DLPN_DialPlan1:4] Answer("SIP/6000-00000000", "") in
new stack [Jan  4 17:50:16] NOTICE[4131]: chan_sip.c:6180
try_suggested_sip_codec: Changin g codec to 'gsm' for this call because of
${SIP_CODEC} variable [Jan  4 17:50:16] NOTICE[4131]: chan_sip.c:6185
try_suggested_sip_codec: Ignorin g ${SIP_CODEC} variable because it is not
shared by both ends.
[Jan  4 17:50:16] NOTICE[4131]: chan_sip.c:6180 try_suggested_sip_codec:
Changin g codec to 'gsm' for this call because of ${SIP_CODEC} variable [Jan
4 17:50:16] NOTICE[4131]: chan_sip.c:6185 try_suggested_sip_codec: Ignorin g
${SIP_CODEC} variable because it is not shared by both ends.
    -- Executing [6500 at DLPN_DialPlan1:5] Playback("SIP/6000-00000000",
"welcome"
) in new stack
[Jan  4 17:50:16] WARNING[4131]: file.c:650 ast_openstream_full: File
welcome do es not exist in any format [Jan  4 17:50:16] WARNING[4131]:
file.c:953 ast_streamfile: Unable to open welco me (format 0x4 (ulaw)): No
such file or directory [Jan  4 17:50:16] WARNING[4131]: app_playback.c:471
playback_exec: ast_streamfil e failed on SIP/6000-00000000 for welcome
    -- Executing [6500 at DLPN_DialPlan1:6] SIPAddHeader("SIP/6000-00000000",
"emai
l:fkhasib at iconnecths.com") in new stack
    -- Executing [6500 at DLPN_DialPlan1:7] MixMonitor("SIP/6000-00000000",
"2012-0
1-05//2012-01-05_05:50:16_Thursday_fkhasib at iconnecths.com.wav,b") in new
stack
    -- Executing [6500 at DLPN_DialPlan1:8] Queue("SIP/6000-00000000", "6500")
in n ew stack
    -- Started music on hold, class 'default', on SIP/6000-00000000
  == Begin MixMonitor Recording SIP/6000-00000000
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas
[danny at debsinc.com]
Sent: Wednesday, January 04, 2012 11:45 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

CLI output from call?

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 11:44 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

didnt work also ....:(
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas
[danny at debsinc.com]
Sent: Wednesday, January 04, 2012 11:39 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

Move line 5 up to line 3 or line 1 (P.S. - the 1-6 numbering scheme is
cumbersome;  1-n-n-n-n-n is more practical).
Like this
exten=6500,1,Answer
exten=6500,n,Playback(welcome)
exten=6500,n,set(SIP_CODEC=gsm) -- this is not changed ....
exten=6500,n,SIPAddHeader(email:${SIP_HEADER(email)})
exten=6500,n,MixMonitor(${STRFTIME(${EPOCH},GMT-6,%C%y-%m-%d//%C%y-%m-%d_%H:
%M:%S_%A)}_${SIP_HEADER(email)}.wav,b)
exten=6500,n,Queue(${EXTEN})

or
exten=6500,1,set(SIP_CODEC=gsm) -- this is not changed ....
exten=6500,n,Answer
exten=6500,n,Playback(welcome)
exten=6500,n,SIPAddHeader(email:${SIP_HEADER(email)})
exten=6500,n,MixMonitor(${STRFTIME(${EPOCH},GMT-6,%C%y-%m-%d//%C%y-%m-%d_%H:
%M:%S_%A)}_${SIP_HEADER(email)}.wav,b)
exten=6500,n,Queue(${EXTEN})

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 11:32 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

how .... can u give me a command?!..
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas
[danny at debsinc.com]
Sent: Wednesday, January 04, 2012 11:29 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

My guess is that you should set the codec either before SIPADDHEADER or
before ANSWER.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 11:25 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

I tried also in asterisk 1.8 setting outbound variable .... but didnt work
also ....
https://wiki.asterisk.org/wiki/display/AST/chan_sip+Channel+Variables
check the above ... I changed it and tried .... but still I get a video call
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Eric Wieling
[EWieling at nyigc.com]
Sent: Wednesday, January 04, 2012 11:19 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

1.6 does not support setting the outbound codec.    1.8 uses different
variables to set the outbound codec.  See UGRADE.txt in the Asterisk source
for the 1.8 information,.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 12:12 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

1.6 and 1.8  ... I tried changing stuff on both ....
when I make audio call from my client which supports both audio and video
its sent to the other client as video call .....I tried settings the
SIP_CODED_INBOUND and outbound also ... but no luck
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Eric Wieling
[EWieling at nyigc.com]
Sent: Wednesday, January 04, 2012 11:11 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

Providing which version of Asterisk you are using might be helpful.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
Sent: Wednesday, January 04, 2012 12:09 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set Call Codec in extension.conf

anyhelp guys?
 I tried a lot of stuff but it doesnt work .... the Codec for audio call
only cannt be set...how I can set the call type video/audio at dail plan?
________________________________________
From: asterisk-users-bounces at lists.digium.com
[asterisk-users-bounces at lists.digium.com] On Behalf Of Faraj Khasib
[fkhasib at iconnecths.com]
Sent: Wednesday, January 04, 2012 5:53 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Set Call Codec in extension.conf

Hi All,
I am trying to set call codec at extension.conf but it doesnt work ... its
like my command doesnt change anything


exten=6500,1,Answer
exten=6500,2,Playback(welcome)
exten=6500,3,SIPAddHeader(email:${SIP_HEADER(email)})
exten=6500,4,MixMonitor(${STRFTIME(${EPOCH},GMT-6,%C%y-%m-%d//%C%y-%m-%d_%H:
%M:%S_%A)}_${SIP_HEADER(email)}.wav,b)
exten=6500,5,set(SIP_CODEC=gsm) -- this is not changed ....
exten=6500,6,Queue(${EXTEN})

can any body help me with that?
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list