[SR-Users] Relaying ACK to Asterisk

Andres andres at telesip.net
Thu Sep 25 15:54:24 CEST 2014


On 9/25/14, 9:17 AM, Igor Potjevlesch wrote:
> I just identified that if "IP_KAMAILIO/ASTERISK" is set into domain table,
As I said before, what you need to use is IP_KAMAILIO/ASTERISK:5060.   
If you use it without the port, it will match also when directed to your 
Asterisk server residing on the same IP and loop inside Kamalio without 
being routed properly.
> the issue occured.
> If I delete this entry, the ACK is properly relayed.
>
> The thing is that I use domain table for this check in REQ_INIT:
> if (!has_totag()) {
>                  if (!is_uri_host_local()) {
>                          if (is_from_local() || allow_trusted()) {
>                                  xlog("L_WARN","time=[$Tf] call id=[$ci] call
> seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's
> method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message
> id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf],  From the trusted
> source\n");
>                                  return;
>                          }
>                          else{
>                                  xlog("L_WARN","time=[$Tf] call id=[$ci] call
> seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's
> method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message
> id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf],  Relay Forbidden\n");
>                                  sl_send_reply("403", "Relay Forbidden");
>                          };
>                          exit;
>                  };
>          };
>
> Regards,
>
> Igor.
>
> -----Message d'origine-----
> De : Igor Potjevlesch [mailto:igor.potjevlesch at gmail.com]
> Envoyé : jeudi 25 septembre 2014 14:45
> À : 'Kamailio (SER) - Users Mailing List'
> Objet : RE: [SR-Users] Relaying ACK to Asterisk
>
> Hello Klaus,
>
> Thank you for the translation ;)
> Here is the config:
>
> /* add local domain aliases */
> alias=sip.domain.tld
>
> /* uncomment and configure the following line if you want Kamailio to
>     bind on a specific interface/port/proto (default bind on all available)
> */
> listen=udp:IP_KAMAILIO/ASTERISK:5060
> listen=udp:IP_KAMAILIO_LAN:5060
>
> The 'domain' table is populated as follow:
> id | domain
> 1	<IP_KAMAILIO/ASTERISK>
> 2	sip.domain.tld
> 3	<hostname_server>
> 4	sip.domain.tld
>
> Regards,
>
> Igor.
>
>
> -----Message d'origine-----
> De : sr-users-bounces at lists.sip-router.org
> [mailto:sr-users-bounces at lists.sip-router.org] De la part de Klaus Darilion
> Envoyé : jeudi 25 septembre 2014 13:16 À : Kamailio (SER) - Users Mailing
> List Objet : Re: [SR-Users] Relaying ACK to Asterisk
>
> Something is going wrong here:
>
> On 24.09.2014 18:41, Igor Potjevlesch wrote:
>> DEBUG: rr [loose.c:90]: is_preloaded(): is_preloaded: No
> That's correct. The ACK is not pre-loaded (with a route set).
>
> Checking first local URI (either alias= or listen= statement)
>> DEBUG: <core> [socket_info.c:583]: grep_sock_info(): grep_sock_info -
>> checking if host==us: 14==14 && [<IP_KAMAILIO_ASTERISK>] ==
>> [<IP_KAMAILIO_ASTERISK>]
>> DEBUG: <core> [socket_info.c:587]: grep_sock_info(): grep_sock_info -
>> checking if port 5060 (advertise 0) matches port 4060
> Checking seconf local URI (either alias= or listen= statement)
>> DEBUG: <core> [socket_info.c:583]: grep_sock_info(): grep_sock_info -
>> checking if host==us: 14==12 && [<IP_KAMAILIO_ASTERISK>] ==
>> [192.168.0.19]
>> DEBUG: <core> [socket_info.c:587]: grep_sock_info(): grep_sock_info -
>> checking if port 5060 (advertise 0) matches port 4060
>> DEBUG: <core> [forward.c:448]: check_self(): check_self: host != me
> Correctly detects that the RURI does not address Kamailio, but
>
>> DEBUG: rr [loose.c:674]: after_strict(): Next hop:
>> 'sip:<IP_KAMAILIO_ASTERISK>;lr=on' is loose router
> This means, that check_self returned 1 (match) although it didn't matched.
> This means that the _check_self_func_list (forward.c) is populated and
> matches the RURI.
>
> Thus, the RURI does not match one of the "standard" aliases (the ones
> learned by the listen=... statements) but some other module registered a
> callback which returns MATCH, and thus Kamailio thinks the previous hop is a
> strict router:
>
>> DEBUG: rr [loose.c:724]: after_strict(): The last route URI:
>> 'sip:<IP_KAMAILIO_ASTERISK>;lr=on'
> please post your complete alias=.... and listen=... config.
>
> Further, I suspect that you register additional aliases via "domain" or
> "corex" module and these additional aliases match the RURI. So review your
> domain and corex configuration.
>
> regards
> Klaus
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Technical Support
http://www.cellroute.net




More information about the sr-users mailing list