[Sems] using pre-encoded g729 stream with announce

Andrew Radke andrew.radke at yuruga.com.au
Thu Sep 18 07:02:03 CEST 2008


Hi,

I'm having trouble getting precoded_announce to work with g729a (I can  
only choose it or g711u/a due to various factors).

It works perfectly for g711u as a music on hold service but if the  
call uses g729 I get the following when run with -D 2 I'll paste some  
more from a -D3 at the bottom):

#/opt/sems/sbin/sems -E -D 2 -f /opt/sems/etc/sems/sems.conf
Sip Express Media Server (1.0.0-rc1 (i386/linux))


Configuration:
        configuration file:  /opt/sems/etc/sems/sems.conf
        plug-in path:        /opt/sems/lib/sems/plug-in/
        daemon mode:         0
        local SIP IP:        192.168.52.10
        public media IP:
        local SIP port:      5080
        local media IP:      192.168.52.10
        application:         $(mapping)

(16230) INFO: onLoad (SipCtrlInterface.cpp:57): SIP bind_addr:  
`192.168.52.10'.
(16230) INFO: onLoad (SipCtrlInterface.cpp:58): SIP bind_port: `5080'.
(16230) INFO: run (SipCtrlInterface.cpp:305): Starting SIP control  
interface
(16230) ERROR: setCurrentPayload (AmAudio.cpp:81): Could not find  
payload <18>
(16230) ERROR: run (AmSession.cpp:423):  
PrecodedDialog::onSessionStart: Cannot open file

(16230) ERROR: run (AmSession.cpp:431): 500 unexpected exception.

Andrew Radke
Yuruga Nursery Pty Ltd
Clonal Solutions Australia Pty Ltd
PO Box 220
Walkamin Qld 4872
Phone: (07) 4093 3826
Fax: (07) 4093 3869
Email: andrew.radke at yuruga.com.au
Web: www.yuruga.com.au

On 16/09/2008, at 7:20 PM, Stefan Sayer wrote:

> Hello,
>
> o Andrew Radke [09/16/08 03:27]:
>> Hi all,
>> I'd like to use announce as a music on hold service with a pre- 
>> encoded g729 stream. I have it working perfectly with a wav file  
>> and g711u but this is too high bandwidth for MOH with Internet  
>> routed calls.
>> Could announce or SEMS in general be setup to stream pre-encoded  
>> streams in different codecs in the same way it does with wav files  
>> and g711u/a?
> try precoded_announce application, its config file, e.g.
> http://svn.berlios.de/wsvn/sems/branches/1.0.0/apps/precoded_announce/etc/precoded_announce.conf
> point to a .predef file (example here:
> http://svn.berlios.de/wsvn/sems/branches/1.0.0/apps/precoded_announce/wav/test.predef 
>  ) which defines the different available codecs and points to their  
> raw files; for g729 the following line should work
> # format:
> # codec id;payload name;samplerate;channels;format parameters;frame
> # milliseconds;frame bytes;filename (full path)
> 18;g729;8000;1;<none>;20;20;myprecodedg729file.raw;
>
> or, if you want to send 10 ms packets (probably not, if you want to  
> save bandwidth):
> 18;g729;8000;1;<none>;10;10;myprecodedg729file.raw;
>
> Alternatively, if you can, use codecs like speex, or iLBC.
>
> Stefan
>
>> Regards,
>> Andrew Radke
>> Yuruga Nursery Pty Ltd
>> Clonal Solutions Australia Pty Ltd
>> PO Box 220
>> Walkamin Qld 4872
>> Phone: (07) 4093 3826
>> Fax: (07) 4093 3869
>> Email: andrew.radke at yuruga.com.au <file:///Network/Servers/mac-server.internal.yuruga.com.au/Users/andrew.radke/Application%20Data/Microsoft/Signatures/andrew.radke@yuruga.com.au 
>> >
>> Web: www.yuruga.com.au <http://www.yuruga.com.au/>
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Sems mailing list
>> Sems at lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/sems
>
> -- 
> Stefan Sayer
> VoIP Services
>
> stefan.sayer at iptego.com
> www.iptego.com
>
> IPTEGO GmbH
> Am Borsigturm 40
> 13507 Berlin
> Germany
>
> Amtsgericht Charlottenburg, HRB 101010
> Geschaeftsfuehrer: Alexander Hoffmann
>




Sip Express Media Server (1.0.0-rc1 (i386/linux))


Configuration:
        configuration file:  /opt/sems/etc/sems/sems.conf
        plug-in path:        /opt/sems/lib/sems/plug-in/
        daemon mode:         0
        local SIP IP:        192.168.52.10
        public media IP:
        local SIP port:      5080
        local media IP:      192.168.52.10
        application:         $(mapping)

(14874) DEBUG: main (sems.cpp:372): Loading plug-ins
(14874) DEBUG: init (AmPlugIn.cpp:131): adding built-in codecs...
(14874) DEBUG: addCodec (AmPlugIn.cpp:652): codec id 0 inserted
(14874) DEBUG: addCodec (AmPlugIn.cpp:652): codec id 6 inserted
(14874) DEBUG: addPayload (AmPlugIn.cpp:692): payload 'telephone- 
event' inserted with id 96 and order 196
(14874) DEBUG: load (AmPlugIn.cpp:181): AmPlugIn: loading modules  
'wav;precoded_announce;announcement;sipctrl':
(14874) DEBUG: load (AmPlugIn.cpp:191): loading /opt/sems/lib/sems/ 
plug-in//wav.so...
(14874) DEBUG: addCodec (AmPlugIn.cpp:652): codec id 1 inserted
(14874) DEBUG: addCodec (AmPlugIn.cpp:652): codec id 2 inserted
(14874) DEBUG: addPayload (AmPlugIn.cpp:692): payload 'PCMU' inserted  
with id 0 and order 100
(14874) DEBUG: addPayload (AmPlugIn.cpp:692): payload 'PCMA' inserted  
with id 8 and order 108
(14874) DEBUG: addFileFormat (AmPlugIn.cpp:730): file format Wav  
inserted
(14874) DEBUG: load (AmPlugIn.cpp:191): loading /opt/sems/lib/sems/ 
plug-in//precoded_announce.so...
(14874) DEBUG: loadAppPlugIn (AmPlugIn.cpp:519): application  
'precoded_announce' loaded.
(14874) DEBUG: load (AmPlugIn.cpp:191): loading /opt/sems/lib/sems/ 
plug-in//announcement.so...
(14874) DEBUG: loadAppPlugIn (AmPlugIn.cpp:519): application  
'announcement' loaded.
(14874) DEBUG: load (AmPlugIn.cpp:191): loading /opt/sems/lib/sems/ 
plug-in//sipctrl.so...
(14874) DEBUG: load (AmPlugIn.cpp:201): AmPlugIn: modules loaded.
(14874) DEBUG: load (AmPlugIn.cpp:203): AmPlugIn: Initializing  
plugins...
(14874) DEBUG: open (AmPrecodedFile.cpp:188): inserting codec 'PCMU'  
file 'yuruga.ul' and id 0
(14874) DEBUG: open (AmPrecodedFile.cpp:188): inserting codec 'PCMA'  
file 'yuruga.al' and id 8
(14874) DEBUG: open (AmPrecodedFile.cpp:188): inserting codec 'G729'  
file '/opt/sems/lib/sems/audio/precoded_announce/yuruga.g729' and id 18
(14874) DEBUG: addCodec (AmPlugIn.cpp:652): codec id 100 inserted
(14874) INFO: onLoad (SipCtrlInterface.cpp:57): SIP bind_addr:  
`192.168.52.10'.
(14874) INFO: onLoad (SipCtrlInterface.cpp:58): SIP bind_port: `5080'.
(14874) DEBUG: onLoad (SipCtrlInterface.cpp:81): sipctrl:  
accept_fr_without_totag = no
(14874) DEBUG: onLoad (SipCtrlInterface.cpp:92): sipctrl:  
log_raw_messages level = 3
(14874) DEBUG: onLoad (SipCtrlInterface.cpp:98): sipctrl:  
log_parsed_messages = yes
(14874) DEBUG: load (AmPlugIn.cpp:269): AmPlugIn: Initialized plugins.
(14874) DEBUG: main (sems.cpp:386): Starting session container
(14874) DEBUG: main (sems.cpp:389): Starting media processor
(14874) DEBUG: init (AmMediaProcessor.cpp:66): Starting 1  
MediaProcessorThreads.
(14874) DEBUG: main (sems.cpp:395): Starting RTP receiver
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3084012464 is starting.
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3082959792 is starting.
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3081907120 is starting.
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3080854448 is starting.
(14874) INFO: run (SipCtrlInterface.cpp:305): Starting SIP control  
interface
(14874) DEBUG: bind (udp_trsp.cpp:204): UDP transport bound to  
192.168.52.10:5080
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3079801776 is starting.
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3078749104 is starting.
(14874) DEBUG: run (udp_trsp.cpp:92): before recvmsg  
(192.168.52.10:5080)
(14874) DEBUG: run (udp_trsp.cpp:114): recvd msg
--++--
INVITE sip:555 at 192.168.52.10:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.52.158:5060;branch=z9hG4bK-e5c2b263
From: "Andrew Radke" <sip:216 at voip.yuruga.com.au>;tag=aee34ba72482c3c2o0
To: <sip:555 at 192.168.52.10>
Call-ID: 864af14b-4f24ba6e at 192.168.52.158
CSeq: 101 INVITE
Max-Forwards: 70
Contact: "Andrew Radke" <sip:216 at 192.168.52.158:5060>
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 215
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp

v=0
o=- 1065150 1065150 IN IP4 192.168.52.159
s=-
c=IN IP4 192.168.52.159
t=0 0
m=audio 16478 RTP/AVP 18 101
a=rtpmap:18 G729a/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=recvonly
--++--
(14874) DEBUG: parse_sip_uri (parse_uri.cpp:314): Converted URI port  
(5080) to int (5080)
(14874) DEBUG: received_msg (trans_layer.cpp:706): parse_sip_msg  
returned 0
(14874) DEBUG: match_request (hash_table.cpp:82): Matching INVITE  
request
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:396): Received new  
request
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:399): req.method =  
<INVITE>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:404): req.r_uri = <sip:555 at 192.168.52.10:5080 
 >
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:405): req.from_uri =  
<sip:216 at 192.168.52.158:5060>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:406): req.from =  
<"Andrew Radke" <sip:216 at voip.yuruga.com.au>>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:407): req.to = <<sip:555 at 192.168.52.10 
 >>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:408): req.callid = <864af14b-4f24ba6e at 192.168.52.158 
 >
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:409): req.from_tag =  
<aee34ba72482c3c2o0>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:410): req.to_tag = <>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:411): cseq = <101>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:412): req.serKey =  
<38C:0812EF10>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:413): req.route = <>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:414): req.next_hop =  
<>
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:415): hdrs = <Max- 
Forwards: 70
Expires: 240
User-Agent: Linksys/SPA942-5.2.8
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
 >
(14874) DEBUG: handleSipMsg (SipCtrlInterface.cpp:416): body = <v=0
o=- 1065150 1065150 IN IP4 192.168.52.159
s=-
c=IN IP4 192.168.52.159
t=0 0
m=audio 16478 RTP/AVP 18 101
a=rtpmap:18 G729a/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=recvonly
 >
(14874) DEBUG: handleSipMsg (AmSipDispatcher.cpp:44): method:  
`INVITE' [6].
(14874) DEBUG: createSession (AmSessionContainer.cpp:358): match of  
r_uri 'sip:555 at 192.168.52.10:5080' to application precoded_announce
(14874) DEBUG: setLocalTag (AmSession.cpp:260):  
AmSession::setLocalTag() - session id set to 68BAADA5-48D1DDA6000ADDF8- 
B781FBB0
(14874) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying  
to post event
(14874) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event  
posted
(14874) DEBUG: run (udp_trsp.cpp:92): before recvmsg  
(192.168.52.10:5080)
(14874) DEBUG: _start (AmThread.cpp:68): Thread 3077548976 is starting.
(14874) DEBUG: processEvents (AmEventQueue.cpp:69): before processing  
event
(14874) DEBUG: process (AmSession.cpp:542): AmSession::process
(14874) DEBUG: process (AmSession.cpp:546): Session received SIP Event
(14874) DEBUG: onSipRequest (AmSession.cpp:607): onSipRequest: method  
= INVITE
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:379): parse_sdp_line_ex:  
parsing sdp message ..
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:391): parse_sdp_line_ex:  
found version
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:398): parse_sdp_line_ex:  
found origin
(14874) DEBUG: parse_sdp_origin (AmSdp.cpp:923): parse_sdp_line_ex:  
parse_sdp_origin: parsing sdp origin
(14874) DEBUG: parse_sdp_origin (AmSdp.cpp:1014): parse_sdp_line_ex:  
parse_sdp_origin: done parsing sdp origin
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:406): parse_sdp_line_ex:  
found session
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:436): parse_sdp_line_ex:  
found connection
(14874) DEBUG: parse_sdp_connection (AmSdp.cpp:527):  
parse_sdp_line_ex: parse_sdp_connection: parsing sdp connection
(14874) DEBUG: parse_sdp_connection (AmSdp.cpp:585):  
parse_sdp_line_ex: parse_sdp_connection: done parsing sdp connection
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:421): parse_sdp_line_ex:  
found unknown line 't'
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:443): parse_sdp_line_ex:  
found media
(14874) DEBUG: parse_sdp_media (AmSdp.cpp:605): parse_sdp_line_ex:  
parse_sdp_media: parsing media description...
(14874) DEBUG: parse_sdp_media (AmSdp.cpp:694): parse_sdp_line_ex:  
parse_sdp_media: done parsing media description
(14874) DEBUG: parse_sdp_attr (AmSdp.cpp:799): found media attr  
'rtpmap' type '18'
(14874) DEBUG: parse_sdp_attr (AmSdp.cpp:799): found media attr  
'rtpmap' type '101'
(14874) DEBUG: parse_sdp_attr (AmSdp.cpp:848): found media attr 'fmtp'  
type '101'
(14874) DEBUG: parse_sdp_attr (AmSdp.cpp:881): found media attr  
'ptime' value '30'
(14874) DEBUG: parse_sdp_attr (AmSdp.cpp:897): found media attr  
'recvonly'
(14874) DEBUG: parse_sdp_line_ex (AmSdp.cpp:508): parse_sdp_line_ex:  
parsing sdp message done :)
(14874) DEBUG: getCompatiblePayloads (AmSdp.cpp:329): using global  
address:
(14874) DEBUG: negotiate (AmSession.cpp:321): remote party supports  
telephone events (pt=101)
(14874) DEBUG: setRAddr (AmRtpStream.cpp:410): RTP remote address set  
to 192.168.52.159:16478
(14874) DEBUG: setLocalPort (AmRtpStream.cpp:166): local rtp port set  
to 10000
(14874) DEBUG: advertisedIP (AmSession.cpp:876): AmConfig::PublicIP  
is .(14874) DEBUG: init (AmRtpAudio.cpp:144): AmRtpAudio::init(...)
(14874) ERROR: setCurrentPayload (AmAudio.cpp:81): Could not find  
payload <18>
(14874) DEBUG: acceptAudio (AmSession.cpp:791): Sending Rtp data to  
192.168.52.159/16478
(14874) DEBUG: updateStatusReply (AmSipDialog.cpp:129): reply:  
transaction found!
(14874) DEBUG: updateStatusReply (AmSipDialog.cpp:168): req.method =  
INVITE; t.method = INVITE
(14874) DEBUG: send (udp_trsp.cpp:218): send  msg
--++--
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.52.158:5060;branch=z9hG4bK-e5c2b263
From: "Andrew Radke" <sip:216 at voip.yuruga.com.au>;tag=aee34ba72482c3c2o0
To: <sip:555 at 192.168.52.10>;tag=68BAADA5-48D1DDA6000ADDF8-B781FBB0
Call-ID: 864af14b-4f24ba6e at 192.168.52.158
CSeq: 101 INVITE
Contact: <sip:555 at 192.168.52.10:5080>
Content-Type: application/sdp
Content-Length: 201

v=0
o=sems 79813498 1095811146 IN IP4 192.168.52.10
s=session
c=IN IP4 192.168.52.10
t=0 0
m=audio 10000 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
--++--
(14874) DEBUG: reset_timer (sip_trans.cpp:122): New timer of type 0x7  
at time=497
(14874) DEBUG: reset_timer (sip_trans.cpp:122): New timer of type 0x8  
at time=2072
(14874) DEBUG: ~sip_msg (sip_parser.cpp:92): ~sip_msg()
(14874) ERROR: run (AmSession.cpp:423): (14874) DEBUG: run  
(udp_trsp.cpp:114): recvd msg
--++--
ACK sip:555 at 192.168.52.10:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.52.158:5060;branch=z9hG4bK-d3be2c3f
From: "Andrew Radke" <sip:216 at voip.yuruga.com.au>;tag=aee34ba72482c3c2o0
To: <sip:555 at 192.168.52.10>;tag=68BAADA5-48D1DDA6000ADDF8-B781FBB0
Call-ID: 864af14b-4f24ba6e at 192.168.52.158
CSeq: 101 ACK
Max-Forwards: 70
Contact: "Andrew Radke" <sip:216 at 192.168.52.158:5060>
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0

--++--
(14874) DEBUG: parse_sip_uri (parse_uri.cpp:314): Converted URI port  
(5080) to int (5080)
(14874) DEBUG: received_msg (trans_layer.cpp:706): parse_sip_msg  
returned 0
(14874) DEBUG: match_request (hash_table.cpp:82): Matching ACK request
(14874) DEBUG: match_request (hash_table.cpp:101): do_3261_match = 1
(14874) DEBUG: received_msg (trans_layer.cpp:734): ACK matched INVITE  
transaction
(14874) DEBUG: reset_all_timers (sip_trans.cpp:141):  
remove_timer(0x8163930)
(14874) DEBUG: reset_all_timers (sip_trans.cpp:141):  
remove_timer(0x8163bf0)
(14874) DEBUG: ~sip_msg (sip_parser.cpp:92): ~sip_msg()
(14874) DEBUG: remove_trans (hash_table.cpp:400): ~sip_trans()
(14874) DEBUG: ~sip_msg (sip_parser.cpp:92): ~sip_msg()
(14874) DEBUG: run (udp_trsp.cpp:92): before recvmsg  
(192.168.52.10:5080)
PrecodedDialog::onSessionStart: Cannot open file

(14874) ERROR: run (AmSession.cpp:431): 500 unexpected exception.
(14874) DEBUG: destroy (AmSession.cpp:454): AmSession::destroy()
(14874) DEBUG: stop (AmThread.cpp:148): Thread 3077548976 (3077548976)  
calling on_stop, give it a chance to clean up.
(14874) DEBUG: on_stop (AmSession.cpp:444): AmSession::on_stop()
(14874) DEBUG: clearAudio (AmSession.cpp:534): Audio cleared !!!
(14874) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying  
to post event
(14874) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event  
posted
(14874) DEBUG: stop (AmThread.cpp:163): (14874) DEBUG: ~timer  
(wheeltimer.cpp:19): timer::~timer(this=0x8163930)
(14874) DEBUG: ~timer (wheeltimer.cpp:19): timer::~timer(this=0x8163bf0)
Thread 3077548976 (3077548976) finished detach.
(14874) DEBUG: destroySession (AmSessionContainer.cpp:150): session  
stopped and queued for deletion (#sessions=0)
(14874) DEBUG: run (AmSession.cpp:437): session is stopped.
(14874) DEBUG: _start (AmThread.cpp:72): Thread 3077548976 is ending.
(14874) WARNING: sig_usr_un (sems.cpp:91): Signal 2 received.
(14874) INFO: sig_usr_un (sems.cpp:95): Finished.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.iptel.org/pipermail/sems/attachments/20080918/0fd8e513/attachment.htm 


More information about the Sems mailing list