Author Topic: Can SIP Server use Asterisk as a Queue / MOH Source?  (Read 7413 times)

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Can SIP Server use Asterisk as a Queue / MOH Source?
« on: August 07, 2014, 01:44:36 PM »
Hello Everyone,
Here is my scenario:

SIP Server 8.1
Asterisk 1.8 (FreePBX 2.11)
Asterisk is not the gateway for calls in this scenario.

I would like to use Asterisk as the In-queue music source.  That being said, I would not like to use Asterisk to simply play a file from Asterisk.  I am more interested in sending the call to the Asterisk Music On Hold application.

I have a URI (664@xxx.xxx.xxx.xxx:5060) which will answer the call and play music on hold.  But I am just unsure of how to invite a call in queue over to the Asterisk server for MOH services.
I have set up a MOH VoIP Service with this URI in the Contact information under the TServer context and then I get stuck.  I am just unsure of how to call the external MOH server within the IRD Target.
Am I off base in my thinking of where to configure the music in queue and is this even possible?

Thanks,
Perry

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #1 on: August 07, 2014, 02:06:32 PM »
I think that you have to disable MSML on SIP server object, then create VoIP service object just like for StreamManager. The main part of configuration is on Asterisk site where you can properly configure extension.conf , etc.

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #2 on: August 07, 2014, 02:14:34 PM »
Thanks -
I do have this disabled and Asterisk is already configured to play music on hold upon receiving the invite.
I think I have another issue in my lab.  Seems that I am getting an error in the logs of "No treatment services are configured" upon trying to play the music DN in the target.  I guess someone changed something.  I will research that before moving forward.

Thanks,
Perry

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #3 on: August 07, 2014, 02:22:33 PM »
Could you, please, post VoIP service object configuration and SIP server logs covering the frame when SIP server lookup for "announcement" resources?

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #4 on: August 07, 2014, 03:24:54 PM »
Thanks - Here is the information you were requesting:

In IRD I have a simple strategy with a single target.
In that target I have the Busy Treatment set for 'Music'.
In the Music properties I have MUSIC_DN set as MOH_LAB_ASTERISK and there is nothing set for duration.
(Something tells me that this is where I am going wrong.)


[b]VoIP Service Object Config:[/b]
Name: MOH_LAB_ASTERISK

TServer Option in the Annex Tab:
contact = sip:664@10.29.144.100:5060
oos-check = 0
oos-force = 0
service-type = music


[b]SIP Server Log Showing the TreatmentMusic[/b]
[code]message RequestApplyTreatment
AttributeThisDN '18557594731'
AttributeConnID 0209024c9306e17a
AttributeTreatmentType 2 (TreatmentMusic)
AttributeTreatmentParms [31] 00 01 00 00..
'MUSIC_DN' 'MOH_LAB_ASTERISK'
AttributeReferenceID 15962
09:48:13.712 Int 04543 Interaction message "RequestApplyTreatment" received from 748 ("LAB_URS_Pri")
09:48:13.712  -- created: CRequest@4659cf8 RequestApplyTreatment-LAB_URS_Pri[748]/15962
09:48:13.712: $+TLIB:CTI:Unknown:0:111175895
09:48:13.712 +++ CIFace::Request +++
  -- new invoke
  -- thisCall by party
  Parsed: RequestApplyTreatment
  From: LAB_URS_Pri[748]/15962
  Numbers: +<18557594731> -<none>
  Calls: 45f1988:1 none
  Parties: 18557594731.455fa28-45f1988:1
          none
  Status: parsed:1 queued:0 sent:0 acked:0 preevent:0 event:0 context:0 transferred:0
  -----
  -- validate
  -- state check: ok
  CIFace: Sent CRequest@4659cf8 RequestApplyTreatment-LAB_URS_Pri[748]/15962
  FinishRequest CRequest@4659cf8 RequestApplyTreatment-LAB_URS_Pri[748]/15962
  IFace stats: q=0 s=0
  -- complete
09:48:13.712: internal error, invalid media service type 2
09:48:13.712: ERROR: 10000000, GetDeviceManager().ResolveServiceDevice(call, params.m_serviceType, geoLocation.CStr(), device), SipMediaResourceManager.cpp,733
09:48:13.712: ERROR: 10000000, GetMediaResourceManager().CreateMediaService(call, party, *device, params, mediaService), SipCallManagerScenarios.cpp,5583
09:48:13.712: ERROR: 10000000, ApplyTreatment(*scenario,*call,*party,params,context), SipCallManagerCallControl.cpp,4546[/code]

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #5 on: August 07, 2014, 04:02:25 PM »
Hi Perry,

Integration with Asterisk is documented - http://docs.genesys.com/Documentation/SIPS/8.1.1/IntegrationReferenceManual/IntegrationAsterisk

R.

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #6 on: August 07, 2014, 04:24:30 PM »
Yes Rene - Thanks for that...
I have integrated Asterisk before from a full integration perspective.  Much of the documentation you have referred to comes from the original integration guide from 2007.  There are some new things in it too and I appreciate the link.  Good stuff...

But this is slightly different.

Let's look at this from a different angle.
I am looking for some guidance in using an external SIP music on hold source.  It could be Asterisk or any other SIP based music on hold source.
I have the music on hold server set up and ready to receive an invite.  What I am having difficulty with is getting URS / SIP Server to route a call / invite a call to the music on hold URI from within a strategy.

When I attempt to use the Music option within the Target Busy section, SIP Server wants to invoke a treatment.  I am looking for a way to play music from this external server while the call is in queue.

Thanks again
Perry

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #7 on: August 07, 2014, 04:39:57 PM »
As an update -
I am able to get Asterisk to be the external Music On Hold server when an agent places the caller on hold.  So half the battle is won.  However, still working with getting external MOH to play while the caller is in queue....

Thanks,
Perry

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #8 on: August 07, 2014, 05:44:25 PM »
You are showing the DN of type Music (Hold) , but you are applying a Treatment on URS...so you need a DN of type Treatment

Offline pspenning

  • Jr. Member
  • **
  • Posts: 99
  • Karma: 0
    • West Interactive
Re: Can SIP Server use Asterisk as a Queue / MOH Source?
« Reply #9 on: August 07, 2014, 08:05:43 PM »
I managed to get this thing working exactly as I want it to with Music in Queue...
The trick is to use 'request-uri=sip:some_inbound_route@xxx.xxx.xxx.xxx:5060' in the Music_DN option of the Target.

I happen to be using FreePBX so I just set up an inbound route that sends callers to Voicemail forever.  since I have anonymous calls enabled, when that inbound route is hit, the route happens.  Of course, you can secure the Asterisk a bit by establishing a trunk / peer relationship between Asterisk and the Genesys SIP Server, but that's for another day.

I will probably build a dial plan that invokes the MOH application within Astersisk so that all callers will get the same MOH stream.  Again, that's for another day.

Thanks for all of the comments!
Perry