<div dir="ltr"><div>Issam,</div><div><br></div><div>mohqueue was designed to provide a way for unanswered calls to a call center or answer group to be dropped into a holding queue until it could be processed. While in queue an audio recording would be played for the caller and when a line was open to receive calls it could be directed out of the FIFO queue. It was not designed to put a call on hold, although that could be a future enhancement.</div><div><br></div><div>With regard to the error you identified, it appears that the INVITE did not complete. You might want to do a SIP trace and look at requests and responses to try to identify why the call failed.</div><div><br></div><div>Hope this helps,</div><div>Bob</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 12, 2017 at 4:25 PM, Issam Hambouz <span dir="ltr"><<a href="mailto:ihambouz@gmail.com" target="_blank">ihambouz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello!<br><br>I am exploring mohqueue module and have few questions:<br><br>- Could it be used to provide MOH service for SIP endpoints? I am aware that its main functionality is to queue calls (along playing a MOH for queued calls) and provides a mechanism to retrieve calls (FIFO), but I had the impression, reading several emails in this group, that it can be used in a way to provide MOH whenever a call is put on-hold<br>-- I tried to use it with the re-INVITE received when a call is put on-hold, but got a log message stating that it works with initial INVITEs only (something like that)<br><br>- On a test setup (Kamailio 4.2.3 / 2.0.0), I was able to reach the queue / listen to the MOH but encountered a strange case where the call gets automatically removed from the queue after 4-5 seconds (can be seen removed from kamailio.mohqcalls as well)<br><br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): mohq_process: Processing INVITE, queue (demo)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): create_call: Added call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47) to queue (demo)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Making offer for RTP link for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Sent RINGING for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Answering RTP link for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): start_stream: Starting RTP link for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)<br>Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Responded to INVITE with RTP for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)<br>Jun 12 22:58:35 ERROR: mohqueue [mohq_funcs.c:1243]: invite_cb(): invite_cb: INVITE failed for call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47)!<br>Jun 12 22:58:35 DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): delete_call: Deleting call (<<a href="mailto:sip%3A6010@10.110.3.57" target="_blank">sip:6010@10.110.3.57</a>>;tag=<wbr>c97a6b26-2bfe-4271-9db1-<wbr>cee38ea96c47) from queue (demo)<br><br>-- route[MOH] is called first at the beginning of request_route()<br>route[MOH] {<br> if (has_totag()) return;<br> if (mohq_process ()) {<br> xlog ("mohqueue: mohq_process");<br> exit;<br> }<br>}<br><br>-- Looking at the SIP trace, all seems ok, except receiving a 404 response after BYE (that's me hanging up after few seconds from getting the above error message)<br><br>Your comments and hints are appreciated!<br><br>Thank you<span class="HOEnZb"><font color="#888888"><br>Issam<br></font></span></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>