Re: [OpenSIPS-Users] Call issue with mid-registrar - Can't figure out issue

2022-01-11 Thread Sugar
Can someone assist me?
 Original message From: "s.lancret"  
Date: 1/8/22  12:46 PM  (GMT-06:00) To: users@lists.opensips.org Subject: 
[OpenSIPS-Users] Call issue with mid-registrar - Can't figure outissue 
I seem to have an issue getting mid- registrar to work.



I have opensips with internal iP and fqdn say proxy.sip.domain.com



The asterisk/freepbx with pjsip extension at sip.domain.com



The two internal networks and dns resolution works fine.



The extensions can call each other directly through asterisk when linphone 
domain is sip.domain.com.

pjsip settings rewrite contact yes, direct media yes, from_domain 
sip.domain.com.



When linphone points to sip.domain.com with outbound proxy proxy.sip.domain.com 
I can call external numbers like cellphones and landlines but cannot reach 
internal extensions that
 need to go through opensips (ie mobile phones - for push notifications).



If from_domain is an ip calls reach (the uac debug shows the Bye received but 
no ringing occurs) but no ringing occurs so extension eventually goes to voice 
mail and can leave a
 voice mail.



One extension can call the other but not vice versa. The extension that can 
call the other two way audio is fine.



We have pn enabled = false for now until we can fix call issues period



calls do not seem to work at all without using the call dialog module but with 
the call module the issues above occur.



Here is what we find:



if we have opensips

socket=udp:10.x.x.x.x:5068 as proxy.sip.domain.com



pjsip info above with from_domain=sip.domain.com



internal extensions go to voicemail hear ringing from the calling extension but 
called extension does not ring.



Here is a copy of config with all removed ip and sensitive info - If a function 
is missing, it is not in the original as opensips does not complain on start.



Can you help me discern the issue. we used dialog only to get from uri for push 
notifications only when we enable push notifications (which we have disabled 
for now until we can
 get mid registrar to work)?



Other info to note: proxy.sip.domain.com, 172.31.11.60 and sip.domain.com is in 
the domain table. Tried posting config but list complains to big and moderator 
has yet to approve.
 Here is snippet:  Register works fine.



#handle loose routing

if (has_totag()) {

route(handle_loose_routing);

exit;

} 
...




if (is_method("INVITE")) {

if($avp(usedialog))

route(create_dialog);

do_accounting("log");

}





...



if (is_method("INVITE|MESSAGE|NOTIFY")) {

route(trace);

xlog("source ip is ($si)\n");

xlog("source port is ($sp)\n");

xlog("request uri is ($ru)\n");

xlog("request uri is ($rp)\n");

xlog("realm is ($ar)\n");

xlog("User Agent is ($ua)\n");



if(route(is_from_main)){

xlog("looking up $ru!\n");

route(fix_domain);

mid_registrar_lookup("location", "m");

$var(rc) = $retcode;




xlog("request uri is now ($ru) after lookup\n");

xlog("Lookup return code $var(rc)\n");

switch ($var(rc)) {

case 1:

    # we found at least 1 non-PN contact!

    $var(do_relay) = true;

    break;

case 2:

    # success, but all contacts are PN-enabled, so we're

    # sending PNs / awaiting re-registrations from them

    $var(do_relay) = false;

$dlg_val(contact_id) = $(tu{uri.param,ctid});

    break;

default:

    xlog("L_INFO", "DBG: no contacts found ($var(rc))\n");

    t_reply(404, "Not Found");

    exit;

}









if ($var(do_relay) && !t_relay())

    send_reply(500, "Internal Server Error");




        exit;

} else {



#fix linphone missing port issue that causes request time outs if proxy and 
main registrar port isn't the same



if(($(ua{s.substr,0,8}) == "Linphone") || ($(ua{s.substr,0,6}) == "EZ Sip")) {

xlog("fix linphone missing port issue that causes request time outs if proxy 
and main registrar port isn't the same");

route(fix_uac);

}

}

}

...






route[handle_loose_routing]{




# handle hop-by-hop ACK (no routing required)

if ( is_method("ACK") && t_check_trans() ) {

route(trace);

t_relay();

exit;

}



xlog("totag before loose_route ru is $ru");

# sequential request within a dialog should

# take the path determined by record-routing

if ( !loose_route() ) {

# we do record-routing for all our traffic, so we should not

# receive any sequential requests without Route hdr.

send_reply(404,"Not here");

exit;

} 



xlog("totag before route relay ruri is $ru and du is $du");



# Uncomment to enable pn_purr full RFC 8599 support

if (!is_method("ACK")){

xlog("PN_PROCESS_PURR will be called\n");

       async (pn_process_purr("location"), resume_route);

#if(check_route_param("pn-wake=true"))

# xlog("L_INFO", "[LOG] Manual Push Request arm\n");

}

​












___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Call issue with mid-registrar - Can't figure out issue

2022-01-08 Thread s . lancret
I seem to have an issue getting mid- registrar to work.


I have opensips with internal iP and fqdn say proxy.sip.domain.com


The asterisk/freepbx with pjsip extension at sip.domain.com


The two internal networks and dns resolution works fine.


The extensions can call each other directly through asterisk when linphone 
domain is sip.domain.com.

pjsip settings rewrite contact yes, direct media yes, from_domain 
sip.domain.com.


When linphone points to sip.domain.com with outbound proxy proxy.sip.domain.com 
I can call external numbers like cellphones and landlines but cannot reach 
internal extensions that need to go through opensips (ie mobile phones - for 
push notifications).


If from_domain is an ip calls reach (the uac debug shows the Bye received but 
no ringing occurs) but no ringing occurs so extension eventually goes to voice 
mail and can leave a voice mail.


One extension can call the other but not vice versa. The extension that can 
call the other two way audio is fine.


We have pn enabled = false for now until we can fix call issues period


calls do not seem to work at all without using the call dialog module but with 
the call module the issues above occur.


Here is what we find:


if we have opensips

socket=udp:10.x.x.x.x:5068 as proxy.sip.domain.com


pjsip info above with from_domain=sip.domain.com


internal extensions go to voicemail hear ringing from the calling extension but 
called extension does not ring.


Here is a copy of config with all removed ip and sensitive info - If a function 
is missing, it is not in the original as opensips does not complain on start.


Can you help me discern the issue. we used dialog only to get from uri for push 
notifications only when we enable push notifications (which we have disabled 
for now until we can get mid registrar to work)?


Other info to note: proxy.sip.domain.com, 172.31.11.60 and sip.domain.com is in 
the domain table. Tried posting config but list complains to big and moderator 
has yet to approve. Here is snippet:  Register works fine.

#handle loose routing
if (has_totag()) {
route(handle_loose_routing);
exit;
}

...


if (is_method("INVITE")) {
if($avp(usedialog))
route(create_dialog);
do_accounting("log");
}

...
if (is_method("INVITE|MESSAGE|NOTIFY")) {
route(trace);
xlog("source ip is ($si)\n");
xlog("source port is ($sp)\n");
xlog("request uri is ($ru)\n");
xlog("request uri is ($rp)\n");
xlog("realm is ($ar)\n");
xlog("User Agent is ($ua)\n");
if(route(is_from_main)){
xlog("looking up $ru!\n");
route(fix_domain);
mid_registrar_lookup("location", "m");
$var(rc) = $retcode;

xlog("request uri is now ($ru) after lookup\n");
xlog("Lookup return code $var(rc)\n");
switch ($var(rc)) {
case 1:
# we found at least 1 non-PN contact!
$var(do_relay) = true;
break;
case 2:
# success, but all contacts are PN-enabled, so we're
# sending PNs / awaiting re-registrations from them
$var(do_relay) = false;
$dlg_val(contact_id) = $(tu{uri.param,ctid});
break;
default:
xlog("L_INFO", "DBG: no contacts found ($var(rc))\n");
t_reply(404, "Not Found");
exit;
}


if ($var(do_relay) && !t_relay())
send_reply(500, "Internal Server Error");

exit;
} else {
#fix linphone missing port issue that causes request time outs if proxy and 
main registrar port isn't the same
if(($(ua{s.substr,0,8}) == "Linphone") || ($(ua{s.substr,0,6}) == "EZ Sip")) {
xlog("fix linphone missing port issue that causes request time outs if proxy 
and main registrar port isn't the same");
route(fix_uac);
}
}
}
...

route[handle_loose_routing]{

# handle hop-by-hop ACK (no routing required)
if ( is_method("ACK") && t_check_trans() ) {
route(trace);
t_relay();
exit;
}
xlog("totag before loose_route ru is $ru");
# sequential request within a dialog should
# take the path determined by record-routing
if ( !loose_route() ) {
# we do record-routing for all our traffic, so we should not
# receive any sequential requests without Route hdr.
send_reply(404,"Not here");
exit;
}
xlog("totag before route relay ruri is $ru and du is $du");
# Uncomment to enable pn_purr full RFC 8599 support
if (!is_method("ACK")){
xlog("PN_PROCESS_PURR will be called\n");
   async (pn_process_purr("location"), resume_route);
#if(check_route_param("pn-wake=true"))
# xlog("L_INFO", "[LOG] Manual Push Request arm\n");
}

?





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users