[mohqueue] MOH service / A case with MOH queue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[mohqueue] MOH service / A case with MOH queue

Issam Hambouz
Hello!

I am exploring mohqueue module and have few questions:

- 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
-- 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)

- 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)

Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): mohq_process: Processing INVITE, queue (demo)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): create_call: Added call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47) to queue (demo)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Making offer for RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Sent RINGING for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Answering RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): start_stream: Starting RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Responded to INVITE with RTP for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:35 ERROR: mohqueue [mohq_funcs.c:1243]: invite_cb(): invite_cb: INVITE failed for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)!
Jun 12 22:58:35 DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): delete_call: Deleting call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47) from queue (demo)

-- route[MOH] is called first at the beginning of request_route()
route[MOH] {
  if (has_totag()) return;
  if (mohq_process ()) {
    xlog ("mohqueue: mohq_process");
    exit;
  }
}

-- 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)

Your comments and hints are appreciated!

Thank you
Issam

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [mohqueue] MOH service / A case with MOH queue

Robert Boisvert
Issam,

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.

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.

Hope this helps,
Bob

On Mon, Jun 12, 2017 at 4:25 PM, Issam Hambouz <[hidden email]> wrote:
Hello!

I am exploring mohqueue module and have few questions:

- 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
-- 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)

- 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)

Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): mohq_process: Processing INVITE, queue (demo)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): create_call: Added call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47) to queue (demo)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Making offer for RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): first_invite_msg: Sent RINGING for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Answering RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): start_stream: Starting RTP link for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:30 - DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): send_rtp_answer: Responded to INVITE with RTP for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)
Jun 12 22:58:35 ERROR: mohqueue [mohq_funcs.c:1243]: invite_cb(): invite_cb: INVITE failed for call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47)!
Jun 12 22:58:35 DEBUG: mohqueue [mohq_funcs.c:2369]: mohq_debug(): delete_call: Deleting call (<[hidden email]>;tag=c97a6b26-2bfe-4271-9db1-cee38ea96c47) from queue (demo)

-- route[MOH] is called first at the beginning of request_route()
route[MOH] {
  if (has_totag()) return;
  if (mohq_process ()) {
    xlog ("mohqueue: mohq_process");
    exit;
  }
}

-- 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)

Your comments and hints are appreciated!

Thank you
Issam

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [mohqueue] MOH service / A case with MOH queue

Issam Hambouz
In reply to this post by Issam Hambouz
Hello Robert,

Thank you for your response.

Point 1 is crystal clear, just needed such confirmation.

Point 2: Looking at the below trace, can't find anything wrong (except the 404 response for BYE at the end). Moreover, it looks to me that the INVITE gets positively completed, taking into account the 200 OK + MOH getting played. Yet, the mentioned error appears after 4-5 seconds, at the same moment the call gets removed from mohqcalls table .. as for the MOH, it keeps playing as expected.

Hints and comments are appreciated!

U 2017/06/14 14:56:28.132052 +0300 172.16.21.12:5060 -> 10.110.3.57:5060

INVITE [hidden email] SIP/2.0
Via: SIP/2.0/UDP 172.16.21.12:5060;rport;branch=z9hG4bKPjb1ac7743-b936-4074-9a5d-98e345a33f26
Max-Forwards: 70
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>
Contact: <sip:6010@172.16.21.12:5060>
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14866 INVITE
Subject: Phone call
Allow: SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, OPTIONS, MESSAGE, PUBLISH
Supported: replaces
Content-Type: application/sdp
Content-Length:   399

v=0
o=yakama 3706430188 0 IN IP4 172.16.21.12
s=sflphone
c=IN IP4 172.16.21.12
t=0 0
m=audio 32298 RTP/AVP 0 3 8 9 110 111 112 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:110 speex/8000
a=rtpmap:111 speex/16000
a=rtpmap:112 speex/32000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtcp:32299 IN IP4 172.16.21.12

U 2017/06/14 14:56:28.132412 +0300 10.110.3.57:5060 -> 172.16.21.12:5060

SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 172.16.21.12:5060;rport=5060;branch=z9hG4bKPjb1ac7743-b936-4074-9a5d-98e345a33f26;received=172.16.21.12
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=20db48d68ad8cea70ceb54cf4988a90d.fe0d
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14866 INVITE
Proxy-Authenticate: Digest realm="10.110.3.57", nonce="WUElmFlBJGysi4cnHPxRxIhhn6VcSB1i"
Server: kamailio (4.2.3 (x86_64/linux))
Content-Length: 0


U 2017/06/14 14:56:28.142416 +0300 172.16.21.12:5060 -> 10.110.3.57:5060

ACK [hidden email] SIP/2.0
Via: SIP/2.0/UDP 172.16.21.12:5060;rport;branch=z9hG4bKPjb1ac7743-b936-4074-9a5d-98e345a33f26
Max-Forwards: 70
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=20db48d68ad8cea70ceb54cf4988a90d.fe0d
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14866 ACK
Content-Length:  0


U 2017/06/14 14:56:28.142768 +0300 172.16.21.12:5060 -> 10.110.3.57:5060

INVITE [hidden email] SIP/2.0
Via: SIP/2.0/UDP 172.16.21.12:5060;rport;branch=z9hG4bKPj63038e66-0dc3-4cce-8e07-04549f40d72b
Max-Forwards: 70
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>
Contact: <sip:6010@172.16.21.12:5060>
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14867 INVITE
Subject: Phone call
Allow: SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, OPTIONS, MESSAGE, PUBLISH
Supported: replaces
Proxy-Authorization: Digest username="6010", realm="10.110.3.57", nonce="WUElmFlBJGysi4cnHPxRxIhhn6VcSB1i", uri="[hidden email]", response="cf367b584f49117c1cf2d3a20ef629bd"
Content-Type: application/sdp
Content-Length:   399

v=0
o=yakama 3706430188 0 IN IP4 172.16.21.12
s=sflphone
c=IN IP4 172.16.21.12
t=0 0
m=audio 32298 RTP/AVP 0 3 8 9 110 111 112 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:110 speex/8000
a=rtpmap:111 speex/16000
a=rtpmap:112 speex/32000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtcp:32299 IN IP4 172.16.21.12

U 2017/06/14 14:56:28.148654 +0300 10.110.3.57:5060 -> 172.16.21.12:5060

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.16.21.12:5060;rport=5060;branch=z9hG4bKPj63038e66-0dc3-4cce-8e07-04549f40d72b;received=172.16.21.12
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=2f2adbacc4317338a374a6531765d255-9497
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14867 INVITE
Contact: <sip:demo@10.110.3.57:5060>
Server: kamailio (4.2.3 (x86_64/linux))
Content-Length: 0


U 2017/06/14 14:56:28.149767 +0300 10.110.3.57:5060 -> 172.16.21.12:5060

SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.21.12:5060;rport=5060;branch=z9hG4bKPj63038e66-0dc3-4cce-8e07-04549f40d72b;received=172.16.21.12
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=2f2adbacc4317338a374a6531765d255-9497
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14867 INVITE
Contact: <sip:demo@10.110.3.57:5060>
Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, PRACK
Supported: 100rel
Accept-Language: en
Content-Type: application/sdp
User-Agent: Kamailio MOH Queue v1.0
Server: kamailio (4.2.3 (x86_64/linux))
Content-Length: 166

v=0
o=- 1 1 IN IP4 10.110.3.57
s=Kamailio MOH Queue v1.0
c=IN IP4 10.110.3.57
t=0 0
a=sendrecv
m=audio 49464 RTP/AVP 3
a=rtpmap:3 GSM/8000
a=nortpproxy:yes

U 2017/06/14 14:56:28.165176 +0300 172.16.21.12:5060 -> 10.110.3.57:5060

ACK sip:demo@10.110.3.57:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.21.12:5060;rport;branch=z9hG4bKPj69bbf40b-cc63-4699-bc05-fb41e210ac12
Max-Forwards: 70
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=2f2adbacc4317338a374a6531765d255-9497
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14867 ACK
Content-Length:  0


U 2017/06/14 14:56:34.592956 +0300 172.16.21.12:5060 -> 10.110.3.57:5060

BYE sip:demo@10.110.3.57:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.21.12:5060;rport;branch=z9hG4bKPjd58e78ac-48c1-440c-833c-7d6b6c91038b
Max-Forwards: 70
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=2f2adbacc4317338a374a6531765d255-9497
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14868 BYE
Contact: <sip:6010@172.16.21.12:5060>
Content-Length:  0


U 2017/06/14 14:56:34.593103 +0300 10.110.3.57:5060 -> 172.16.21.12:5060

SIP/2.0 404 Not here
Via: SIP/2.0/UDP 172.16.21.12:5060;rport=5060;branch=z9hG4bKPjd58e78ac-48c1-440c-833c-7d6b6c91038b;received=172.16.21.12
From: <[hidden email]>;tag=8bfd31ff-59ad-4efd-8ae5-47fde1862ef1
To: <[hidden email]>;tag=2f2adbacc4317338a374a6531765d255-9497
Call-ID: 2116d060-8211-4f5c-beba-4a7d6c4fd08f
CSeq: 14868 BYE
Server: kamailio (4.2.3 (x86_64/linux))
Content-Length: 0


Regards,
Issam

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Loading...