[Home]

Summary:ASTERISK-14679: Originating g729 SIP channel to DialPlan AGI Requiring Decoding
Reporter:Matthew Lemens (customgt)Labels:
Date Opened:2009-08-18 20:44:35Date Closed:2011-06-07 14:00:39
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Im using Eyebeam (g729 capable) and originating a call from a php file via php-asmanger to the Eyebeam via SIP g729.
The ORIGINATE cmd connects it to the asterisk dialplan on connection.
I can check 'g729 show licenses' and it will show im using 1 decoding license.
I can call from the Eyebeam sip phone strait to the dialplan and play (BACKGROUND) a pre-record g729 file and there is no decoding licenses used.

It seems like this is an ORIGINATE issue.

Here is the channel status during the call.

* SIP Call
 Curr. trans. direction:  Outgoing
 Call-ID:                1996e30c2f92a5ea015ea4f02728ec53@84.16.251.31
 Owner channel ID:       SIP/305-09fd8ff0
 Our Codec Capability:   256
 Non-Codec Capability (DTMF):   1
 Their Codec Capability:   256
 Joint Codec Capability:   256
 Format:                 0x100 (g729)
 T.38 support            No
 Video support           No
 MaxCallBR:              384 kbps
 Theoretical Address:    70.238.169.241:15334
 Received Address:       70.238.169.241:15334
 SIP Transfer mode:      open
 NAT Support:            Always
 Audio IP:               84.16.251.31 (local)
 Our Tag:                as6732aee2
 Their Tag:              2733505f
 SIP User agent:         eyeBeam release 1102u stamp 52344
 Username:               305
 Peername:               305
 Original uri:           sip:305@70.238.169.241:15334
 Need Destroy:           No
 Last Message:           Tx: ACK
 Promiscuous Redir:      No
 Route:                  sip:305@70.238.169.241:15334;rinstance=213e296b5ebef93b
 DTMF Mode:              rfc2833
 SIP Options:            (none)
 Session-Timer:          Inactive


Here is the Eyebeam sip.conf:
[305]
type=friend
host=dynamic
defaultuser=305
callerid=My Name
secret=secrete
mailbox=305
dtmfmode=rfc2833
nat=yes
context=internal
disallow=all
allow=g729
qualify=yes

Here is the asterisk dialplan it is connected to:
[callblast2-out]
exten => s,1,AGI(callblast2-program.php,${PHID},${CAMPAIGNID},${NUMBER},${CUSTOMERID},${MESSAGETIMESTAMP})
exten => s,n,Hangup

Here is that callblast2-program.php file:
#!/usr/bin/php -q
<?php
set_time_limit(0);
require('phpagi.php');
$agi = new AGI();
$agi->answer();
$agi->verbose(check_for_license_now);
sleep(3);
$agi->exec("Background callblast2outbound/g729test");
$agi->verbose(check_for_license_again);
sleep(3);
$agi->hangup();
?>


Here is CLI output:
      > Channel SIP/305-0a155040 was answered.
   -- Executing [s@callblast2-out:1] AGI("SIP/305-0a155040", "callblast2-program.php,41476,21,0034661097437,24,1250551121") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/callblast2-program.php
<SIP/305-0a155040>AGI Tx >> agi_request: callblast2-program.php
<SIP/305-0a155040>AGI Tx >> agi_channel: SIP/305-0a155040
<SIP/305-0a155040>AGI Tx >> agi_language: en
<SIP/305-0a155040>AGI Tx >> agi_type: SIP
<SIP/305-0a155040>AGI Tx >> agi_uniqueid: 1250645856.173
<SIP/305-0a155040>AGI Tx >> agi_version: 1.6.1.1
<SIP/305-0a155040>AGI Tx >> agi_callerid: 0034661097437
<SIP/305-0a155040>AGI Tx >> agi_calleridname: unknown
<SIP/305-0a155040>AGI Tx >> agi_callingpres: 0
<SIP/305-0a155040>AGI Tx >> agi_callingani2: 0
<SIP/305-0a155040>AGI Tx >> agi_callington: 0
<SIP/305-0a155040>AGI Tx >> agi_callingtns: 0
<SIP/305-0a155040>AGI Tx >> agi_dnid: unknown
<SIP/305-0a155040>AGI Tx >> agi_rdnis: unknown
<SIP/305-0a155040>AGI Tx >> agi_context: callblast2-out
<SIP/305-0a155040>AGI Tx >> agi_extension: s
<SIP/305-0a155040>AGI Tx >> agi_priority: 1
<SIP/305-0a155040>AGI Tx >> agi_enhanced: 0.0
<SIP/305-0a155040>AGI Tx >> agi_accountcode:
<SIP/305-0a155040>AGI Tx >> agi_threadid: -1237820528
<SIP/305-0a155040>AGI Tx >> agi_arg_1: 41476
<SIP/305-0a155040>AGI Tx >> agi_arg_2: 21
<SIP/305-0a155040>AGI Tx >> agi_arg_3: 0034661097437
<SIP/305-0a155040>AGI Tx >> agi_arg_4: 24
<SIP/305-0a155040>AGI Tx >> agi_arg_5: 1250551121
<SIP/305-0a155040>AGI Tx >>
<SIP/305-0a155040>AGI Rx << ANSWER
<SIP/305-0a155040>AGI Tx >> 200 result=0
<SIP/305-0a155040>AGI Rx << VERBOSE "check_for_license_now" 1
callblast2-program.php,41476,21,0034661097437,24,1250551121: check_for_license_now
<SIP/305-0a155040>AGI Tx >> 200 result=1
84-16-251-30*CLI> g729 show licenses
0/1 encoders/decoders of 2 licensed channels are currently in use

Licenses Found:
File: G729-59BE303A.lic -- Key: G729-59BE303A -- Host-ID: 13:86:e9:ce:90:8e:ed:9e:7f:ee:97:62:9a:bf:f1:dd:5b:19:5a:99 -- Channels: 2 (Expires: 2029-08-07) (OK)

<SIP/305-0a155040>AGI Rx << EXEC Background callblast2outbound/g729test
   -- AGI Script Executing Application: (Background) Options: (callblast2outbound/g729test)
   -- <SIP/305-0a155040> Playing 'callblast2outbound/g729test.g729' (language 'en')
<SIP/305-0a155040>AGI Tx >> 200 result=0
<SIP/305-0a155040>AGI Rx << VERBOSE "check_for_license_again" 1
callblast2-program.php,41476,21,0034661097437,24,1250551121: check_for_license_again
<SIP/305-0a155040>AGI Tx >> 200 result=1
84-16-251-30*CLI> g729 show licenses
0/1 encoders/decoders of 2 licensed channels are currently in use

Licenses Found:
File: G729-59BE303A.lic -- Key: G729-59BE303A -- Host-ID: 13:86:e9:ce:90:8e:ed:9e:7f:ee:97:62:9a:bf:f1:dd:5b:19:5a:99 -- Channels: 2 (Expires: 2029-08-07) (OK)

<SIP/305-0a155040>AGI Rx << HANGUP
<SIP/305-0a155040>AGI Tx >> 200 result=1
   -- <SIP/305-0a155040>AGI Script callblast2-program.php completed, returning -1
Comments:By: Leif Madsen (lmadsen) 2009-08-31 09:00:31

This issue has been acknowledged because both putnopvut and myself feel that you should not need to use a decoder to play a G.729 file to a G.729 capable device.

By: Russell Bryant (russell) 2010-01-06 16:37:59.000-0600

Have you tried adding the "Codecs: G729" header to your originate manager action?

If you still have trouble, please pursue this issue through Digium technical support:

http://www.digium.com/en/supportcenter/