[Gpephone-devel] How to make phoneserver adapt to different typesof modem?

yu tang tangyu619 at yahoo.com.cn
Sat Mar 17 05:01:35 CET 2007


   Yes,the config file would take some time to be parsed when the phoneserver just starts,but the advantage is that we need not to rebuild the phoneserver,we just need to modify the config file to adapt to different modem.So,phoneserver can be easily deployed to a new modem.
   
     If we remain on binary files,does it mean that we should mantain a lot of binary files or library for each type of modem. And it is hard for someone who does not know the phoneserver's structrue well to add a new type of modem.
   
  Mybe, remaining binary files for modems would be the best solution, at least, OS does so to remain most of the device drivers,and it works well.
   
   
  
Felipe Balbi <felipebalbi at users.sourceforge.net> wrote:

  Hi all,

On 3/16/07, yu tang wrote:
>
> Hi all,
> Mybe the config file also can be used to deal with the unsolited event
> such as incoming call, call status indication.

I think having lots of config files would make the whole design
slower, 'cause would take a litlle time to parse the correct file...

We could remain on binary files, built to the correct modem...
when building phoneserver we should:
make MODEM=XXYYZZ
XXYYZZ would be some string defining one supported modem...

this way, phoneserver would behave a litlle bit better... we wouldn't
need to care about the modem we're using...

And, as cellphones can't change their GSM modem like it was a USB
device, it would be highly stable and a pretty good design...

> for example,a section in the config file mybe as follow:
>
> unsolited_event_begin
> INCOMING_CALL:{"+CRING"OR"+CLIP"}
> ....
> unsolited_event_end
>
> When "+CRING"OR"+CLIP" is read from the modem,phoneserver will create
> INCOMING_CALL event and send it to the application which has been registered
> to the event.

We wouldn't need to care about this too, because phoneserver would
already "know the modem"... it was built to support this modem... so
it knows the modem's commands.



>
> it is a good idea to use Abstract Factory or Factory Method
> Design Pattern to implemented the phoneserver. The MANDATORY commands can be
> writed into the abstract Class and the OPTIONAL commands can be writed into
> a concrete modem-specific classes.
>
> >On Mar 14, 2007, at 10:48 PM, JIANG Dan RD-ILAB-PEK wrote:
> > Yes.
> >
> > This method could deal with some asynchronous calls, such as Dial
> > out, Hold, Hangup, etc.
> >
> > But how does it handler the unsolited event, such as incoming call,
> > call status indication?
> > For different modem, the format of message which is sent to
> > phoneserver may be different.
> > Phoneserver has to analysis the message with certain rules to get
> > proper information.
> >
> > How could this be solved?
> >
> > Is there other method available?
>
>
> ________________________________
> 
>
>
> _______________________________________________
> Gpephone-devel mailing list
> Gpephone-devel at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/gpephone-devel
>
>


-- 
Best Regards,

Felipe Balbi
felipebalbi at users.sourceforge.net


 		
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linuxtogo.org/pipermail/gpephone-devel/attachments/20070317/37a122bb/attachment.htm 


More information about the Gpephone-devel mailing list