[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-users
Subject: [SR-Users] Re: Knowing about the uac module with primary and secondary proxy setting
From: MUSLIH K <muslihk00 () gmail ! com>
Date: 2023-05-31 6:22:42
Message-ID: CAEPUy3GC5b+33X_AqdF+OFWViZG+3YMPuaoAiF=M8d2KsZa6UA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
*uac_block*
#!KAMAILIO
loadmodule "uac.so"
loadmodule "db_sqlite.so"
modparam("uac", "reg_contact_addr", UAC_CONTACT_ADD)
modparam("uac", "reg_db_url", "sqlite:///etc/kamailio/dbs/uac_reg.db")
modparam("uac", "reg_retry_interval", 10)
*dispatcher_block*
#!KAMAILIO
loadmodule "dispatcher.so"
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "xavp_dst", "dsdst")
modparam("dispatcher", "xavp_dst_mode", 0)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_interval", 15)
#modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;class=4")
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
*route_block*
event_route[dispatcher:dst-down] {
xlog("L_ERR", "Destination down: $rm $ru ($du)\n");
$var(status) = uac_reg_status("+91XXX6");
xlog("L_NOTICE", "+91XXX_state : $var(status)\n\r");
if(uac_reg_request_to("+91XXX", 0))
{
xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]");
t_on_failure("REMOTE_AUTH");
$du="sip:10.*.32.1:5060";
t_relay();
}
}
failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth();
}
}
*i am getting following error
*
17(26) ERROR: <script>: Destination down: OPTIONS sip:10.*.32.1:5060 (<null>)
17(26) NOTICE: <script>: 91XXX_state : 1
17(26) CRITICAL: <core> [core/mem/q_malloc.c:501]: qm_free(): BUG: bad
pointer 0x7fa7ec666479 (out of memory block!) called from core:
core/action.c: do_action(757) - ignoring
17(26) NOTICE: <script>: Found remote user [91XXX] on
[sip.siptrunk.in] via [sip:10.*.33.1:5060]
17(26) INFO: tm [t_lookup.c:1333]: t_newtran(): attempt to create
transaction for a faked request - try to avoid it
17(26) NOTICE: tm [t_reply.c:2159]: relay_reply(): dst no longer set -
skipped sending the reply out
On Fri, May 26, 2023 at 5:03 PM Ihor Olkhovskyi <igorolhovskiy@gmail.com>
wrote:
> Hello!
>
> Yes, you can 'loop' outbound registration via self and than - use
> dispatcher module to send REGISTER accordingly.
> For the detection part, you can play with dispatcher event routes -
> https://kamailio.org/docs/modules/devel/modules/dispatcher.html#idm1090
>
> Le ven. 26 mai 2023 à 12:16, MUSLIH K <muslihk00@gmail.com> a écrit :
>
>> Hi,
>>
>> *sip_provider_proxy1[* uac module-register] ---> *kamailio* [dispatcher
>> Module] ----> *Asterisk1*
>>
>> ----> *Asterisk 2*
>>
>> in my configuration kamailio register to the sip provider using *uac
>> module*, sip information are stored in database (uacreg).
>>
>> when a incoming call(INVITE) come to kamailio it will dispatch call to
>> Asterisk using* "dispatcher module".*
>>
>> Here i have couple of questions
>>
>> 1. If my SIP provider has a secondary proxy as a failover server
>> (sip_provider_proxy2), can I configure Kamailio with the uac module to use
>> the secondary proxy if the primary proxy fails?
>> 2. Since my application is inbound-only, registration failure is only
>> identified when the registration expires (3600 seconds = 1 hour). Can I use
>> the dispatcher module to select the SIP proxy and switch the registration
>> to the secondary proxy if the primary proxy is not reachable (using
>> OPTIONS)?
>>
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-leave@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
>
>
> --
> Best regards,
> Ihor (Igor)
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-leave@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
[Attachment #5 (text/html)]
<div dir="ltr"><p dir="auto" \
style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(31,35,40);font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI Emoji";font-size:14px"><b>uac_block</b></p><div \
class="gmail-snippet-clipboard-content gmail-notranslate gmail-position-relative \
gmail-overflow-auto" \
style="box-sizing:border-box;color:rgb(31,35,40);font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI Emoji";font-size:14px;overflow:auto"><pre \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;padding:0px;margin:0px;background:transparent;bo \
rder-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">#!KAMAILIO
loadmodule "uac.so"
loadmodule "db_sqlite.so"
modparam("uac", "reg_contact_addr", UAC_CONTACT_ADD)
modparam("uac", "reg_db_url", \
"sqlite:///etc/kamailio/dbs/uac_reg.db") modparam("uac", \
"reg_retry_interval", 10)
</code></pre></div><p dir="auto" \
style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(31,35,40);font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI \
Emoji";font-size:14px"><b>dispatcher_block</b></p><div \
class="gmail-snippet-clipboard-content gmail-notranslate gmail-position-relative \
gmail-overflow-auto" \
style="box-sizing:border-box;color:rgb(31,35,40);font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI Emoji";font-size:14px;overflow:auto"><pre \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;padding:0px;margin:0px;background:transparent;bo \
rder-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">#!KAMAILIO
loadmodule "dispatcher.so"
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "xavp_dst", "dsdst")
modparam("dispatcher", "xavp_dst_mode", 0)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_interval", 15)
#modparam("dispatcher", "ds_ping_reply_codes", \
"class=2;class=3;class=4")
modparam("dispatcher", "list_file", \
"/etc/kamailio/dispatcher.list") </code></pre></div><p dir="auto" \
style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(31,35,40);font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI Emoji";font-size:14px"><b>route_block</b></p><div \
class="gmail-snippet-clipboard-content gmail-notranslate gmail-position-relative \
gmail-overflow-auto" \
style="box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe \
UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color \
Emoji","Segoe UI Emoji";font-size:14px;overflow:auto"><pre \
class="gmail-notranslate" \
style="color:rgb(31,35,40);box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;padding:0px;margin:0px;background:transparent;bo \
rder-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">
event_route[dispatcher:dst-down] {
xlog("L_ERR", "Destination down: $rm $ru ($du)\n");
$var(status) = uac_reg_status("+91XXX6");
xlog("L_NOTICE", "+91XXX_state : $var(status)\n\r");
if(uac_reg_request_to("+91XXX", 0))
{
xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via \
[$du]"); t_on_failure("REMOTE_AUTH");
$du="sip:10.*.32.1:5060";
t_relay();
}
}
failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth();
}
}
</code></pre><pre class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;padding:0px;margin:0px;background-image:initial; \
background-position:initial;background-size:initial;background-repeat:initial;backgrou \
nd-origin:initial;background-clip:initial;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit"><b \
style=""><span style="background-color:rgb(255,255,255)"><font color="#ff0000">i am \
getting following error</font></span><font color="#1f2328"> </font></b><font \
color="#1f2328">
</font><pre class="gmail-notranslate" \
style="color:rgb(31,35,40);background-color:transparent;box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-radius:6px"><code \
class="gmail-notranslate" \
style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF \
Mono",Menlo,Consolas,"Liberation \
Mono",monospace;font-size:11.9px;padding:0px;margin:0px;background:transparent;bo \
rder-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit">17(26) \
ERROR: <script>: Destination down: OPTIONS sip:10.*.32.1:5060 (<null>) \
17(26) NOTICE: <script>: 91XXX_state : 1 17(26) CRITICAL: <core> \
[core/mem/q_malloc.c:501]: qm_free(): BUG: bad pointer 0x7fa7ec666479 (out of memory \
block!) called from core: core/action.c: do_action(757) - ignoring 17(26) NOTICE: \
<script>: Found remote user [91XXX] on [<a \
href="http://sip.siptrunk.in">sip.siptrunk.in</a>] via [sip:10.*.33.1:5060] 17(26) \
INFO: tm [t_lookup.c:1333]: t_newtran(): attempt to create transaction for a faked \
request - try to avoid it 17(26) NOTICE: tm [t_reply.c:2159]: relay_reply(): dst no \
longer set - skipped sending the reply out</code></pre><font color="#1f2328">
</font></code></pre></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, May 26, 2023 at 5:03 PM Ihor Olkhovskyi <<a \
href="mailto:igorolhovskiy@gmail.com">igorolhovskiy@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div>Hello!<br><br></div><div>Yes, you can 'loop' outbound \
registration via self and than - use dispatcher module to send REGISTER accordingly. \
<br></div><div>For the detection part, you can play with dispatcher event routes - <a \
href="https://kamailio.org/docs/modules/devel/modules/dispatcher.html#idm1090" \
target="_blank">https://kamailio.org/docs/modules/devel/modules/dispatcher.html#idm1090</a></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 26 mai 2023 Ã 12:16, \
MUSLIH K <<a href="mailto:muslihk00@gmail.com" \
target="_blank">muslihk00@gmail.com</a>> a écrit :<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Hi,<div><br></div><div><b>sip_provider_proxy1[</b> uac module-register] \
---> <b>kamailio</b> [dispatcher Module] ----> <b>Asterisk1</b></div><div> \
----> <b>Asterisk 2</b></div><div><br></div><div>in my configuration kamailio \
register to the sip provider using <b>uac module</b>, sip information are stored in \
database (uacreg).</div><div><br></div><div>when a incoming call(INVITE) come to \
kamailio it will dispatch call to Asterisk using<b> "dispatcher \
module".</b></div><div><b><br></b></div><div>Here i have couple of questions \
</div><div><br></div><div>1. If my SIP provider has a secondary proxy as a failover \
server (sip_provider_proxy2), can I configure Kamailio with the uac module to use the \
secondary proxy if the primary proxy fails?<br></div><div>2. Since my application is \
inbound-only, registration failure is only identified when the registration expires \
(3600 seconds = 1 hour). Can I use the dispatcher module to select the SIP proxy and \
switch the registration to the secondary proxy if the primary proxy is not reachable \
(using OPTIONS)?</div><div><div style="border-width:0px 0px \
1px;border-style:solid;border-color:rgba(0,0,0,0.1);box-sizing:border-box;width:1098px;font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe \
UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica \
Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe \
UI Symbol","Noto Color Emoji";font-size:14px"><div style="border:0px \
solid rgb(217,217,227);box-sizing:border-box;margin:auto;display:flex;padding:1.5rem \
0px;font-size:1rem;line-height:1.5rem;max-width:48rem"><div style="border:0px solid \
rgb(217,217,227);box-sizing:border-box;display:flex"><div style="border:0px solid \
rgb(217,217,227);box-sizing:border-box"><div style="border:0px solid \
rgb(217,217,227);box-sizing:border-box;margin-top:0px;display:flex;padding-left:0.5rem"><button \
style="border-width:0px;border-style:solid;border-color:rgb(217,217,227);font-family:inherit;font-size:16px;font-weight:inherit;line-height:inherit;margin:0px \
0px 0px auto;padding:0.25rem;background-image:none;display:flex;border-radius:0.375rem"></button><div \
style="border:0px solid rgb(217,217,227);box-sizing:border-box;display:flex"><button \
style="border-width:0px;border-style:solid;border-color:rgb(217,217,227);font-family:i \
nherit;font-size:16px;font-weight:inherit;line-height:inherit;margin:0px;padding:0.25rem;background-image:none;border-radius:0.375rem"></button><button \
style="border-width:0px;border-style:solid;border-color:rgb(217,217,227);font-family:i \
nherit;font-size:16px;font-weight:inherit;line-height:inherit;margin:0px;padding:0.25r \
em;background-image:none;border-radius:0.375rem"></button></div></div></div></div></div></div><br></div><div></div></div>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
To unsubscribe send an email to <a href="mailto:sr-users-leave@lists.kamailio.org" \
target="_blank">sr-users-leave@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the \
sender!<br> Edit mailing list options or unsubscribe:<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- \
</span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Best \
regards,<div>Ihor (Igor)<br></div></div></div> \
__________________________________________________________<br> Kamailio - Users \
Mailing List - Non Commercial Discussions<br> To unsubscribe send an email to <a \
href="mailto:sr-users-leave@lists.kamailio.org" \
target="_blank">sr-users-leave@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the \
sender!<br> Edit mailing list options or unsubscribe:<br>
</blockquote></div>
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic