Does Media server PlayCollect support wildcard character and range-of-digit in digit pattern

97 views
Skip to first unread message

Anake Sirinanthawit

unread,
Oct 12, 2012, 6:45:08 AM10/12/12
to mobicent...@googlegroups.com

Hi :

         I am trying to use JSR-309   SignalDetector to detect  user Input DTMF, the digit pattern that user input can be any digit number up to ten and end with  # key.

According to RFC 2897  MGCP Advanced Audio Package document which reference digit pattern syntax on section 7.1.14  of megaco document, the DigitMap Syntax can compose of

the letter "x"  which is used as a wildcard , designating any event corresponding to symbols in the range "0"-"9".

the dot symbol "." stands for zero or more repetitions of the event selector (event, range of events, set of alternative events, or wildcard) that precedes it.

I am using  MSS-1.8.0_Jboss5.1  and    MMS-3.0.0.CR1 .    My code is  outline  as follow:

/////////////////////////////////////////////////////////////////

MediaGroup  mg = ms.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR);

sipSession.setAttribute("MEDIAGROUP", mg);

mySignalDetector = mg.getSignalDetector();

mySignalDetector.addListener(new MySignalDetectorListener());

Parameters collectOptions = msControlFactory.createParameters();
collectOptions.put(SignalDetector.PROMPT, URI.create(“pathToAudioWaveFile”));
collectOptions.put(SignalDetector.PATTERN[0], "x.#");
collectOptions.put(SignalDetector.ENABLED_EVENTS, new EventType[] SignalDetectorEvent.PATTERN_MATCHED[0]});
Parameter[]  patterns =  { SignalDetector.PATTERN[0] };
mySignalDetector.receiveSignals(-1, patterns, new RTC[] {MediaGroup.SIGDET_STOPPLAY}, collectOptions);

///////////////////////////////////////////////////////////////////

The captured  mgcp protocol  message:

RQNT 318933471 mobicents/ivr/1...@127.0.0.1:2427  MGCP 1.0

N:msco...@127.0.0.1:2727

X:2

S:AU/pc(dp=x.#  ip=file:///F:/voiceFiles/pressAnyDigit.wav)

R:AU/oc (N),AU/of (N)

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

200 318933471 Success

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

The problem is  Media Server does not   send Notify to delivered SignalDetectorEvent, even user input DTMF  that is matched with the pattern.

I   try  to test  with  each  special  digitMap   character ,  such as   dot symbol ".";  the only  letter "x"   

all of  following pattern are not work:

“[0-9].”

“xxxx”

 

Please give me some advise, how can we use  DigitMap Syntax on Mobicents media server?
If this syntax is  not supported on current version, is there any other way to specify  PlayCollect event to detect  DTMF digit number up to some number in length and end with  # key?
 
Thanks and Regards,
Anake

yulian_o

unread,
Oct 12, 2012, 11:35:05 AM10/12/12
to mobicent...@googlegroups.com
Hello
Currently MMS supports java regex
Please see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html
for more details

Best regards
Yulian Oifa

Anake Sirinanthawit

unread,
Oct 15, 2012, 4:12:32 AM10/15/12
to mobicent...@googlegroups.com
Hi Yulian:
 
         Thanks a lot for your advice. 

 I   try these  digit patterns, they work very well

“\\d+#”
“\d{10}”

 

But  with  these patterns :

“\d{4,10}”

“\d{10}||\d{1,9}#”

 

The media server throw MgcpCommandException at
org.mobicents.media.server.mgcp.tx.cmd.NotificationRequestCmd$Request.perform(NotificationRequestCmd.java:153)

 

The captured  mgcp messages is:

 

RQNT 579995869 mobicents/ivr/1...@127.0.0.1:2427  MGCP 1.0

N:msco...@127.0.0.1:2727

X:3

S:AU/pc(dp=\d{10}||\d{1,10}# ip=file:///F:/voiceFiles/pressAnyDigit.wav)

R:AU/oc (N),AU/of (N)

 
Response:

 512 579995869 10}# ip=file:

 

  The transaction could not be executed,  error response code: 512
 Response String: 10}# ip=file:
 


 

It is  obvious that  when a comma appear in the  digitPattern of  SignalRequests parameter,   the media server would be wrong parsing  dp symbol.

Is there any method to specify min-max digits without causing parsing error?

Regards,
Anake

yulian_o

unread,
Oct 15, 2012, 4:31:55 AM10/15/12
to mobicent...@googlegroups.com
Hello
There is mn and mx parameters that you can send with pc request
There is also end input key(eik) parameter

Best regards
Yulian Oifa

yulian_o

unread,
Oct 15, 2012, 4:32:58 AM10/15/12
to mobicent...@googlegroups.com
Issue 85 : http://code.google.com/p/mediaserver/issues/detail?id=85&colspec=ID%20Type%20Status%20Priority%20Version%20Owner%20Summary
has been opened , you can follow up this issue to see progress and status

Best regards
Yulian Oifa

Anake Sirinanthawit

unread,
Oct 15, 2012, 6:54:14 AM10/15/12
to mobicent...@googlegroups.com
Hi  Yulian:
 
     Thanks again for your advices.
 
     From  JSR-309 Media Server Control API (javax.media.mscontrol.*)  based program,  is there any way  to set mn; mx and eik  parameters of AU package?
 
     Is there any documents and coding example I can learn from ?
 
Regards
Anake

yulian_o

unread,
Oct 15, 2012, 7:10:07 AM10/15/12
to mobicent...@googlegroups.com
Hello
The First parameter of receiveSignals sets max number of digits, all other are not supported by jsr 309 currently

Best regards
Yulian Oifa

Anake Sirinanthawit

unread,
Oct 17, 2012, 5:36:41 AM10/17/12
to mobicent...@googlegroups.com
Hi  Yulian
  
   Thanks you for your advices. 

As  JSR-309 API (javax.media.mscontrol.*) is not flexible enough and has a limitation to support many  AU package parameters such as  mn; eik  etc.
 

Is there any other choice or other MGCP Call Agent Stack API  that are more flexible that can be use by Sip-Servlet application from  MSS-1.8.0_Jboss5.1

to compose  AU signals/events params ?

Regards,
Anake

George Vagenas

unread,
Oct 17, 2012, 6:46:14 AM10/17/12
to mobicent...@googlegroups.com

Anake Sirinanthawit

unread,
Oct 17, 2012, 8:44:06 AM10/17/12
to mobicent...@googlegroups.com
Thank you George.
 
 The MediaJSR309Application example according to your reccommended link also used javax.media.mscontrol.*;
the JSR-309 API  which has limitation to support composing of some AU package params.
 
There is no any line of code in this app that show composing   mn ; eik(minimum digits or end-of-key)params of PlayCollect event when sending RQNT   
 
Regards,
Anake

George Vagenas

unread,
Oct 17, 2012, 9:43:09 AM10/17/12
to mobicent...@googlegroups.com
Aneke,

Mobicents provide MGCP Client which you can use to support AU params http://code.google.com/p/mediaserver/source/browse/#git%2Fclient%2Fmgcp%2Fdriver

The MGCP Client is included in the latest MMS 3.0.0.CR1 download : http://mediaserver.googlecode.com/files/3.0.0.CR1.zip.

Let me know if you need more help there.

George
--
George Vagenas

Anake Sirinanthawit

unread,
Oct 18, 2012, 4:26:48 AM10/18/12
to mobicent...@googlegroups.com
Hi George :
 
         Thanks you for your advise. 
  Is there any documents or  coding example of  using MGCP Client
 
Regards,
Anake

George Vagenas

unread,
Oct 19, 2012, 3:23:49 AM10/19/12
to mobicent...@googlegroups.com
Anake,

You can check the tests provided with the mgcp client to get some examples.

George
--
George Vagenas

Reply all
Reply to author
Forward
0 new messages