Hello all,
I am trying to debug a new module that I have written. So I have set fork=no and debug=4 and commented out the child line.
The question I have is that the how may times the child_init() function be called ?
The child_init() function in my module sets up a socket connection to a server and I can see that the child_init() function is getting called 3 times. I do not understand this. Am I missing something ?
The mod_init function is getting called only once, like it is supposed to.
I have attached the output from ser startup. The module that I have written is called gl.
Nov 2 14:07:20 sara ser: INFO: glenayre redirector(gl module) initializing Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is initially 65535 Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is finally 262142 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-1 / pid <10269> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost Nov 2 14:07:20 sara ser: INFO: fifo process starting: 10270 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-2 / pid <10270> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost Nov 2 14:07:20 sara ser: SER: open_uac_fifo: fifo server up at /tmp/ser_fifo... Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #1 / pid <10268> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost
any help is appreciated,
thanks, Jignesh Gandhi Software Engineer II Jignesh.Gandhi@glenayre.com
no fork mode means that there will be only one process listening for and processing SIP messages. In addition to that there will be also the timer process (taking care of timers) and fifo process (processing commands sent to ser over the FIFO interface). The child init function will be called for all of them. See:
root@localhost:/home/janakj# serctl ps 0 6266 stand-alone receiver @ 127.0.0.1:5060 1 6267 timer 2 6268 fifo server
If you want to execute the code in the listening process only, then you can ignore calls of child_init that have the parameter set to PROC_TIMER and PROC_FIFO (defined in sr_module.h).
Note that it is usually a good idea to have the same environment in the timer process as in the receiver as some functionality might be called from the timer.
Jan.
On 03-11 10:14, Gandhi, Jignesh wrote:
Hello all,
I am trying to debug a new module that I have written. So I have set fork=no and debug=4 and commented out the child line.
The question I have is that the how may times the child_init() function be called ?
The child_init() function in my module sets up a socket connection to a server and I can see that the child_init() function is getting called 3 times. I do not understand this. Am I missing something ?
The mod_init function is getting called only once, like it is supposed to.
I have attached the output from ser startup. The module that I have written is called gl.
Nov 2 14:07:20 sara ser: INFO: glenayre redirector(gl module) initializing Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is initially 65535 Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is finally 262142 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-1 / pid <10269> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost Nov 2 14:07:20 sara ser: INFO: fifo process starting: 10270 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-2 / pid <10270> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost Nov 2 14:07:20 sara ser: SER: open_uac_fifo: fifo server up at /tmp/ser_fifo... Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #1 / pid <10268> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP connection Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234 Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host = localhost
any help is appreciated,
thanks, Jignesh Gandhi Software Engineer II Jignesh.Gandhi@glenayre.com
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Let me apologize in advance for my question, which is a little rudimentary. We are just starting a project that will use SER and I am being forced to document right now how transfer and conferencing will be handled. I have spent a lot of time looking for definitive information on the subject with no luck. Well, maybe too much luck. There seem to be many proposals and models and so on, but it is not clear to me what is actually being done in practice. I have downloaded all the RFCs and proposal papers on the subject. I am still reviewing them, but I think the folks on this forum can help me a lot.
I need to know the SIP message sequences for performing a call transfer and a blind call transfer and for constructing a conference. I have found information in proposals, but I need to know what actual, available SIP phones can do. We have some phones that we will test, but I do not know what they do when you press their transfer and conference buttons. Pardon me again for my impatience in asking before I have tried this out.
The Transfer models are straightforward, but conferencing is more complicated. We must construct a simple conferencing model where the conferencing is performed by a central server, a SIP IPX. Only conferences of 3 participants need to be supported. We want it to look exactly like 3-way calling on your home phone. During a call, put the call on hold with a conference button, call another phone, hit conference button, the two calls are joined in a 3-way conference.
The document draft-ietf-sipping-service-examples-07.txt seems to be very helpful on the subject, but all examples are in the form of 3 or more UAs and do not address any examples from the point of view of a PBX. I can see how to extend the examples to a PBX case, except for one aspect. If the IP-PBX is to perform the action as a proxy, what does the phone send the IP-PBX to indicate the steps in the process. Put more plainly, what happens when the user hits the Transfer or Conference button on the phone? What message is sent to the IP-PBX?
Can anyone tell me where else I should be looking? Is the service examples draft the best base document to work from?
Thanks in advance, Bob Carlson