[OpenSIPS-Users] Problems with goes_to_gw Drouting

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Nov 2 10:21:13 CET 2010


Hi Sven,

So the IP 146.186.136.146 is the correct one you are trying to detect 
via goes_to_gw() and does not work? If so, I can provide you a small 
patch for extra debugging to doublechecks the checks in goes_to_gw()

Regards,
Bogdan

Sven Schulz wrote:
> Yes I believe Im seeing it resolve when I reload drouting:
>
> Oct 29 13:22:14 testsipcore1 /sbin/opensips[9313]: DBG:core:get_record:
> lookup(sbcma.sip.psu.edu, 35) failed
> Oct 29 13:22:14 testsipcore1 /sbin/opensips[9313]: DBG:core:sip_resolvehost:
> no valid NAPTR record found for sbcma.sip.psu.edu, trying direct SRV
> lookup... 
> Oct 29 13:22:14 testsipcore1 /sbin/opensips[9313]: DBG:core:get_record:
> lookup(_sip._udp.sbcma.sip.psu.edu, 33) failed
> Oct 29 13:22:14 testsipcore1 /sbin/opensips[9313]: DBG:core:sip_resolvehost:
> no valid SRV record found for _sip._udp.sbcma.sip.psu.edu, trying A record
> lookup... 
> Oct 29 13:22:14 testsipcore1 /sbin/opensips[9313]: DBG:drouting:add_dst:
> first gw ip addr [146.186.136.146]
>
> BTW, reloading drouting with 30,000+ routes and debug=6 takes a little while
> :)
>
>
>
>
>
> On 10/29/10 11:58 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>
>   
>> Hi Sven,
>>
>> and it debug=6 do you see in the logs the messages I mentioned ?
>>
>> Regards,
>> Bogdan
>>
>> Sven Schulz wrote:
>>     
>>> HI Bogden,
>>>
>>> I thought this param was enabled by default? But I set it anyways and it
>>> doesn't make a difference.
>>>
>>>
>>> On 10/23/10 6:57 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>>>
>>>   
>>>       
>>>> Hi Steven,
>>>>
>>>> do you have enabled the "force_dns" param:
>>>> http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id294469
>>>> ?
>>>>
>>>> in latest SVN 1.6.3, in debug mode, you should see some messages (at
>>>> startup) like :
>>>> first gw ip addr [xxxxx]
>>>> additional gw ip addr [xxxx]
>>>>
>>>> indicating the DNS resolving of GWs defined by names.
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>> Sven Schulz wrote:
>>>>     
>>>>         
>>>>> Using opensips 1.6.3 SVN # 7282
>>>>>
>>>>>
>>>>> I noticed that if I have a gateway defined in the dr_gateways tables
>>>>> as a hostname, the goes_to_gw function never works (it gets skipped).
>>>>> But if I change that hostname to an IP address, the function works
>>>>> properly. Is this how its supposed to function or is it a bug?
>>>>>
>>>>> do_routing()
>>>>> if (goes_to_gw("2")) {
>>>>> xlog ("the GW type is 2");
>>>>> setflag(10);
>>>>> route(4);
>>>>> exit;
>>>>> }
>>>>>
>>>>> For example, the above code only works if the gateway is defined as
>>>>> ³10.1.1.5² not ³test.something.com². The gw type field is always set
>>>>> to ³2².
>>>>>
>>>>>
>>>>> Sven Schulz
>>>>> Penn State University
>>>>> Telecommunications and Network Services
>>>>> 814.865.6116
>>>>> sip:sven at psu.edu
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>   
>>>>>       
>>>>>           
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>   
>>>       
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro




More information about the Users mailing list