[OpenSIPS-Users] calling create_dialog() on failover

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jan 26 10:02:55 EST 2017

Yes and Yes.

Keep in mind that all the branches of a parallel/serial fork belong to 
the _same_ call !! when you do failover to the next gateway, you do not 
create a new dialog, but a new branch in the same dialog.


Bogdan-Andrei Iancu
OpenSIPS Founder and Developer

On 01/26/2017 04:56 PM, Richard Robson wrote:
> Hi Bogdan,
> So I'd be better off creating the dialog on the initial INVITE?. Will 
> this persist over the failure routes and the subsequent calls to the 
> next gateway?
> Regards,
> Richard
> On 26/01/2017 14:27, Bogdan-Andrei Iancu wrote:
>> Hi Richard,
>> The dialog creation should be done before any forking. Creating it 
>> during the forking may lead to bogus outcomes. So, be sure that the 
>> "relay" route doesn;t do any dialog creation ...as it may be trigger 
>> more than once for an INVITE. Also using match_dialog() may lead to 
>> bogus results, as this function does more than matching - it updates 
>> the internal dialog state machine, triggers callback.
>> Regards,
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>> On 01/25/2017 07:01 PM, Richard Robson wrote:
>>> I may be answering my own question here, But I going to say Thay I 
>>> should be using match_dialog to see if there is an existing dialog 
>>> and only create one if there is not one already/
>>> R
>>> On 25/01/2017 16:42, Richard Robson wrote:
>>>> I'm wanting to check rate limits and channel limits for calls over 
>>>> several gateways. this I have working, but we are getting instances 
>>>> of failures on upstream carriers. this is due to one carrier in 
>>>> paricular not liking the CLIs our customers are calling from. In 
>>>> this case the call comes back as a 403, which I want to failover 
>>>> from the t_on_failure route to the next gateway. If I reuse my 
>>>> relay route it it will have a subsequent create_dialog() it also 
>>>> does the topology hiding and accounting in. Am I OK to recall the 
>>>> create dialog and reuse the relay route or am i better to do a 
>>>> second route to relay the call to the next gateway assuming that 
>>>> this will be the same dialog from the original call.
>>>> Regards,

More information about the Users mailing list