[Asterisk-bugs] [Asterisk 0005866]: AgentCallbackLogin and SIP hold music doesn't work in user to agent direction.

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jul 20 05:51:03 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=5866 
====================================================================== 
Reported By:                tyler
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   5866
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.0-beta3 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-25-2005 20:03 CST
Last Modified:              07-20-2007 05:51 CDT
====================================================================== 
Summary:                    AgentCallbackLogin and SIP hold music doesn't work
in user to agent direction.
Description: 
I have a queue with agents that are callback agents using SIP phones.  When
a caller calls into the queue they hear the hold music just fine, however
once connected to an agent, if the caller puts the agent on hold, the
following scrolls on the console:

Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)
Nov 25 21:01:59 WARNING[19738]: chan_sip.c:2520 sip_write: Asked to
transmit frame type 64, while native formats is 4 (read/write = 4/4)

-- over and over, many lines per second.  The music on hold is coming from
madplay, not the mpg123 default.  It works everywhere else.  This problem
does NOT happen if I add the agents as static members (ie, member =>
Local/100 at agents/n, etc).. The hold music works fine in this case.



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0008487 AgentCallbackLogin and SIP hold music d...
====================================================================== 

---------------------------------------------------------------------- 
 clegall_proformatique - 07-20-07 05:51  
---------------------------------------------------------------------- 
I encounter the same problem as the one described here.

This happens both in Asterisk 1.2 and Asterisk 1.4 versions (revision
76031).

Jul 20 11:14:42 WARNING[30738]: chan_sip.c:2587 sip_write: Asked to
transmit frame type 64, while native formats is 8 (read/write = 8/8)

-------------------------------------------------------------------

the setup is rather simple :
* 2 phones 101 and 102
* 102 registers as an agent with 5102 phone code
* 101 calls 5102 through its dialplan
* 102 answers
* if 102 (the Agent) holds the call, 101 (the User) hears the music
* if 101 holds the call, 102 hears nothing and the above message is
displayed

-------------------------------------------------------------------

What I found up to now :

* in the Agent to User direction (working case), the
ast_set_write_format() function is called once, and sets the writetrans
field of the channel, then the subclass of the frame is set to 8 in
chan_sip.

* in the User to Agent direction (not working case), this function is
called twice : the first one does the same as in A->U, while the second one
sets this writetrans field to NULL. The subclass of the frame in chan_sip
is then 64 (SLINEAR), which leads to the above warning.
 So why is this variable NULL this 2nd time ? the relevant
ast_set_write_format() is called by the CHECK_FORMAT #defined in
res_musiconhold.c (lines 222 and 223 in chan_agent.c (svn 74719, branch
1.2)) :
	if (p->chan->writeformat != ast->rawwriteformat) {	\
		ast_set_write_format(p->chan, ast->rawwriteformat); \
Since ast->rawwriteformat = 8 here, the previous "need for translation" is
canceled.

If I remove these 2 lines, my music plays fine in both directions, but I
guess they have been written on purpose. What could be done to cover all
the use cases ? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-20-07 05:51  clegall_proformatiqueNote Added: 0067620                        
 
======================================================================




More information about the asterisk-bugs mailing list