[ previous ] [ next ] [ threads ]
 To :  tillmanz@w...
 From :  Diana Cionoiu <diana-liste@d...>
 Subject :  Re: [yate] yate module / cpp tutorial
 Date :  Mon, 17 Oct 2005 17:16:37 +0200
Hello Tillman,

I think you didn't understand that module because it's started by me :) 
(i'm a blonde - http://www.null.ro/pic_0088.jpg)
Anyway most of the documentation you are looking for can be found at:
http://yate.null.ro/pmwiki/index.php/Main/Callroute
and the message documentation can be found at:
http://yate.null.ro/docs/api/TelEngine__MessageHandler.html and 
http://yate.null.ro/docs/api/TelEngine__Message.html

A message has 2 values that are interesting for the module who sent the 
message: the retValue and the result of the dispatch method which can be 
true or false.

A MessageHandler receive method should return true if is considering 
that this message has been handle forever, otherwise should return false 
to give the chance to another module to modify the parameters of that 
message. Most of the routing modules i know return false because the 
it's unclear if you need a second routing module.
The retValue for call.route it's the destination where the call should go.
Anyway when a message is used is used right now from just a one place, 
so no need to lock the message.

Diana

tillmanz@w... wrote:

>Thanks Paul for making my day! :-)
>
>Now that "mymodule" is properly registered with yate I do receive the call.route messages and can start my application logic.
>I tried to check register.cpp since it looks as if you are doing some PostegreSql based routing decsision there as well but apparently I am too blind/blonde(which I am not*g) to see how you are actually performing the routing itself.
>Could you perhaps give some insight on how I would be able to change the routing info of an existing call?
>
>Like for example a call coming in with CLD "12345" and I receive the call.route message. I have read in your docs that the messages are using shared memory - so would that mean that I just change the "called" value inside the message to "54321" and then "release" the message somehow? If the memory is shared then I assume I should either lock it first or at least tell the engine that mymodule is working on it currently? On the other hand, before I start interpreting wildly, please be so kind and help me out a little. :-)
>
>
>Cheers,
>
>Tillman
>
>
>  
>
>>Hi again!
>>
>>I apologise for not checking Tili's tutorial from the Web page. It had 
>>obvious syntax errors and I don't understand how/if it ever worked.
>>
>>I fixed that small piece of code which now looks like this:
>>
>>public:
>>    MyModule()
>>        : Module("MyModule1","misc"), m_init(false) {}
>>
>>that is, an inline do-nothing constructor that just initializes the 
>>inherited object and the new member variables.
>>
>>Thanks for pointing out the problem.
>>
>>
>>Paul Chitescu
>>
>>On Mon, 17 Oct 2005 tillmanz@w... wrote:
>>    
>>
>>>Hi there!
>>>
>>>I figured it's gonna be more effictive to prefom my ani/cld depended
>>>routing in a native yate module so I had a look at your "Tili's cpp
>>>tutorial". However I encoutner the following problems:
>>>
>>>[...]
>>>
>>>would not compile with complaining about expecting an ";" after the
>>>constructer Since I have to admit that I have never used that kind of
>>>notation for inheritence myself, I took the liberty in changing it a
>>>little to read:
>>>
>>>[...]
>>>      
>>>
>
>______________________________________________________________
>Verschicken Sie romantische, coole und witzige Bilder per SMS!
>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>  
>