[OpenSIPS-Users] Opensips drouting probing

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Apr 5 10:17:48 EDT 2017


Hi Denis,

Indeed, do_routing() returns -1 for all failure cases - no rule matched, 
no available destination or simply internal error. Please open a feature 
request on github, so we can extend and return different negative return 
codes so the script writer can differently handle them.

Best regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/05/2017 04:08 PM, Denis wrote:
> Bogdan, it seems to be working now. Thank you!
> Additional moments.
> 1) As i see in log do_routing returns the same error, '-1', in "no 
> prefix in dr_rules" as weel as in "All the gateways are disabled". For 
> my project it is enough, but, in a future, i think, it will be more 
> useful if do_routing will returns several codes, one for each reason.
> 2) Now, in situation of "All the gateways are disabled" Opensips 
> returns 404 without any script functions. So if 1) will be released, 
> admin will have possibility to chose which SIP code Opensips will send 
> in each reason.
> -- 
> С уважением, Денис.
> Best regards, Denis
> 05.04.2017, 15:02, "Bogdan-Andrei Iancu" <bogdan at opensips.org>:
>> Hi Denis,
>>
>> Thank you for your help - the problem was found and fixed in head, 
>> 2.3 , 2.2 and 1.11 versions.
>>
>> Please update from GIT and give it a try. Let me know if it works for 
>> you now.
>>
>> Best regards,
>> Bogdan-Andrei Iancu
>>    OpenSIPS Founder and Developer
>>    http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>    http://www.opensips.org/events/Summit-2017Amsterdam.html
>> On 04/04/2017 08:38 PM, Bogdan-Andrei Iancu wrote:
>>> Could you send me (off list) the full content of this routeid route ?
>>>
>>> Thanks,
>>> Bogdan-Andrei Iancu
>>>    OpenSIPS Founder and Developer
>>>    http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
>>>
>>> OpenSIPS Summit May 2017 Amsterdam
>>>    http://www.opensips.org/events/Summit-2017Amsterdam.html
>>> On 04/04/2017 06:16 PM, Denis wrote:
>>>> Yes, without routeid Opensips returns 404 code!
>>>> -- 
>>>> С уважением, Денис.
>>>> Best regards, Denis
>>>> 04.04.2017, 17:59, "Bogdan-Andrei Iancu" <bogdan at opensips.org> 
>>>> <mailto:bogdan at opensips.org>:
>>>>> And if you remove the routeid (in the rule definition), does the 
>>>>> routing works ok ?
>>>>>
>>>>> Regards,
>>>>> Bogdan-Andrei Iancu
>>>>>    OpenSIPS Founder and Developer
>>>>>    http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
>>>>>
>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>    http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>> On 04/04/2017 05:56 PM, Denis wrote:
>>>>>> No, i don`t
>>>>>> -- 
>>>>>> С уважением, Денис.
>>>>>> Best regards, Denis
>>>>>> 04.04.2017, 16:22, "Bogdan-Andrei Iancu" <bogdan at opensips.org> 
>>>>>> <mailto:bogdan at opensips.org>:
>>>>>>> Do you do an "drop" or "exit" in that routeid ??
>>>>>>> Bogdan-Andrei Iancu
>>>>>>>    OpenSIPS Founder and Developer
>>>>>>>    http://www.opensips-solutions.com 
>>>>>>> <http://www.opensips-solutions.com/>
>>>>>>>
>>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>>    http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>> On 04/04/2017 03:16 PM, Denis wrote:
>>>>>>>> Bogdan,
>>>>>>>> Ok, dr_rules has filled 'routeid' column.
>>>>>>>> In routeid i, using dialplan, verify dialed prefix for some 
>>>>>>>> reason. If dialed prefix verified i make some action, if not, 
>>>>>>>> returns to the parent route.
>>>>>>>> In my example, dialed prefix does not verified.
>>>>>>>> So, route with do_routing
>>>>>>>> 951: xlog ("Prepare routing");
>>>>>>>> 952: if (!do_routing("$avp(5)",,,"$avp(300)","$avp(3)",)) {
>>>>>>>> 953: send_reply("404", "Not found");
>>>>>>>> 954: exit;
>>>>>>>> 955: }
>>>>>>>> route [routeid] {
>>>>>>>> 1848: if (dp_translate("20004", "$rU/$rU", "$avp(999)")) {
>>>>>>>>
>>>>>>>>    ........
>>>>>>>> } else {
>>>>>>>>     ......
>>>>>>>> }
>>>>>>>> 1867: }
>>>>>>>> The last strings for the call flow in syslog:
>>>>>>>> :951][me][core xlog]
>>>>>>>> :952][me][module do_routing]
>>>>>>>> :1867][me][core if]
>>>>>>>> :1848][me][module dp_translate]
>>>>>>>> INFO:drouting:do_routing: All the gateways are disabled
>>>>>>>> That is all. After that only my CANCEL from the caller, because 
>>>>>>>> there is no provisioning message after 100 Trying from Opensips.
>>>>>>>> -- 
>>>>>>>> С уважением, Денис.
>>>>>>>> Best regards, Denis
>>>>>>>> 04.04.2017, 14:14, "Bogdan-Andrei Iancu" <bogdan at opensips.org> 
>>>>>>>> <mailto:bogdan at opensips.org>:
>>>>>>>>> Hi Denis,
>>>>>>>>>
>>>>>>>>> Again, as drouting is not doing any signalling action, it 
>>>>>>>>> CANNOT block/freeze your OpenSIPS.
>>>>>>>>>
>>>>>>>>> Use script_trace() function to see how your INVITE is handled :
>>>>>>>>> http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43
>>>>>>>>>
>>>>>>>>> Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170405/9b22a3df/attachment.html>


More information about the Users mailing list