Hi,
Can I know where you put this code ? is it in the methode process(AGateway 
gateway, USSDResponse response) if the interface IUSSDNotification ? Is it 
working ?
Thanks.


On Saturday, February 14, 2015 at 9:03:51 PM UTC, Rogan Dawes wrote:
>
> Hi folks,
>
> I have been writing a GSM<->IRC gateway using SMSlib and pircbotx. One 
> thing that arose while testing, is that SMSlib appears not to handle 
> multi-line USSD responses very well. These are quite common with my current 
> service provider (Vodacom South Africa), with their general self service 
> number *111#.
>
> SMS lib was only returning the first line, and ignoring the rest. I 
> discovered that I could update the terminators defined in the ATHandler, 
> and managed to get it to work with the following code:
>
> String[] terminators = gateway.getATHandler().getTerminators();
> if (terminators[9].equals("\\+CUSD:\\s.*\\s"))
>     terminators[9] = "(?s)^\\+CUSD:\\s[012],\".*\",\\d+\\s*$";
> else
>     System.err.println("Couldn't replace the USSD terminator!");
>
> The "(?s)" tells the code that carriage return/line feeds should also 
> match various wild cards, allowing the pattern to match a multi-line string.
>
> The overall pattern seems to be a bit more precise, according to the 
> WaveCom manuals. Anyway, it works for me, using a Sierra Wireless/WaveCom 
> MV8792V on a MiniPCIe to USB carrier board.
>
> Regards,
>
> Rogan
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Discussion Group" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/smslib/ade58ded-8c05-4027-97d8-76568d1a9381%40googlegroups.com.

Reply via email to