To create a dialog, you have to call the create_dialog()
function in the initial request. You don't need to call this function again in sequential requests. The function has three parameters:
P
sends periodical in-dialog pings to the caller.p
sends periodical in-dialog pings to the callee.B
disconnects the call sending a BYE in both directions when the dialog times out. We call this feature BYE on timeout.
You should be careful while using in-dialog pings. This feature works fine with well-behaved end devices such as IP phones, analog terminal adapters, and gateways. However, avoid it when using clients such as dialers or softswitches that possibly will not answer an OPTIONS request. In this case, if the server does not receive an answer or if it receives an answer with the code 481 Call leg does not exist, the call is disconnected. You can control the ping interval by the following parameter:
modparam("dialog", "ping_interval", 20)