[SR-Users] Confused with forwarding REGISTER
David Villasmil
david.villasmil.work at gmail.com
Sat Apr 4 23:28:10 CEST 2020
Also, as per Daniel’s advice, don’t use
If( is_method(“CANCEL”)==true )
Just use
If( is_method(“CANCEL”) )
Or negating it:
If( !is_method(“CANCEL”) )
Regards,
David
On Sat, 4 Apr 2020 at 16:59, Sergiu Pojoga <pojogas at gmail.com> wrote:
> > I will be really happy if somebody point me what exactly i have to do
> to route 404 answer from Registar to UA
>
> Do exactly this: *nothing*. They'll be route back based on VIA, may be
> set contact alias for certain status codes, if need be.
>
> Good luck.
>
> On Sat, Apr 4, 2020 at 2:37 AM fuxfwgc4a2i1gr <fuxfwgc4a2i1gr at gmail.com>
> wrote:
>
>> Hi. Well issue already described there :
>>
>> https://github.com/kamailio/kamailio/issues/2271
>>
>> I will be really happy if somebody point me what exactly i have to do to
>> route 404 answer from Registar to UA.
>>
>> If i understand right, in moment when registrar generate 404 i have to
>> see in log message which generated inside onreply_route[REPLYROUTE]
>>
>> but in current moment i not see it and 404 not transmitted to UA. And it
>> just silently ignored by Kamailio.
>>
>> In case if i am right and this is a bug in Kamailio please point me what
>> words i have to use to prove that this is really bug.
>>
>> In current moment routing config looks like :
>>
>> request_route
>> {
>>
>> # per request initial checks
>> route(REQINIT);
>>
>> route(CATCH_CANCEL);
>>
>> route(RR_PARSE);
>>
>> route(REGISTRATION);
>>
>> xlog("L_INFO", "Initial relay packet\n");
>> $du = "sip:10.34.64.2:5060";
>>
>> route(FORWARD);
>>
>> # update $du to set the destination address for proxying
>> exit;
>> }
>>
>> route[CATCH_CANCEL]
>> {
>> if (is_method("CANCEL") == true)
>> {
>> if (t_check_trans() == true)
>> {
>> route(FORWARD);
>> }
>> sl_reply("500", "Internal Server Error");
>> drop;
>> }
>> }
>>
>> route[RR_PARSE]
>> {
>> if(loose_route() == true )
>> {
>> xlog("L_INFO", "RR-enforced\n");
>> append_hf("P-hint: rr-enforced\r\n");
>> route(FORWARD);
>>
>> } else
>> {
>> xlog("L_INFO", "RR simple\n");
>> record_route();
>> }
>> }
>>
>> route[REGISTRATION]
>> {
>> if(is_method("REGISTER") == true)
>> {
>> add_path_received();
>> append_hf("Supported: path\r\n");
>> xlog("L_INFO", "GOT REGISTER\n");
>> }
>> }
>>
>> # Per SIP request initial checks
>> route[REQINIT]
>> {
>> if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") {
>> # silent drop for scanners - uncomment next line if
>> want to reply
>> # sl_send_reply("200", "OK");
>> exit;
>> }
>>
>> if (!mf_process_maxfwd_header("10")) {
>> sl_send_reply("483","Too Many Hops");
>> exit;
>> }
>>
>> if(is_method("OPTIONS") && uri==myself && $rU==$null) {
>> sl_send_reply("200","Keepalive");
>> exit;
>> }
>>
>> if(!sanity_check("1511", "7")) {
>> xlog("Malformed SIP message from $si:$sp\n");
>> exit;
>> }
>> }
>>
>>
>>
>>
>> route[FORWARD]
>> {
>> t_on_failure("FAILROUTE");
>> t_on_reply("REPLYROUTE");
>> if(t_relay() <= 0)
>> {
>> sl_reply_error();
>> }
>>
>> drop;
>> }
>>
>>
>> onreply_route[REPLYROUTE]
>> {
>> xlog("Reply SIP message from $si:$sp\n");
>> if (t_check_trans() == false)
>> {
>> drop;
>> }
>> }
>>
>>
>> failure_route[FAILROUTE]
>> {
>> xlog("Reply Fail SIP message from $si:$sp\n");
>>
>> }
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
--
Regards,
David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200404/b497a3f6/attachment.html>
More information about the sr-users
mailing list