[SR-Users] (no subject)

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 4 16:43:15 CEST 2016


Hello,

it is really confusing how you provide details for troubleshooting -- if
you want us to help you, then you have to be coherent in providing
config snippets, logs and traces as used at that moment that exposed the
issue. If you give something that not match, we work on invalid input,
then lose time and interest in providing help.

To reset and restart with proper input:

  - provide the relevant snippets that you use at the moment the issues
are exposed
  - load debugger module and set its cfgtrace parameter to 1
  - set debug=3 in kamailio cfg and then rerun the tests, take the log
messages from syslog and provide them here

I checked the source code and t_load_contacts() should not trigger any
code in pv module, so the next log message that you pasted in your first
email is not related to t_load_contacts(), you have something else in
the configuration file:

>>> ERROR: pv [pv_branch.c:58]: pv_get_branchx(): error accessing branch [0]

So some other parts were not provided in the config snippets.

If you set a failure route, then you don't need to drop failure response
codes such 3xx, it will be overwritten if you forward the request again.
But if you don't forward the request in failure_route, then last winning
response is sent in this case.

Cheers,
Daniel


On 04/07/16 16:14, jpetrini at coredial.com wrote:
>
> Hi Daniel,
>
>  
>
> I have it commented out currently because neither seem to be working.
> The packet capture however was taken with drop uncommented and without
> the t_cancel_branches if statement. t_load_contacts was also commented
> out to avoid hitting the unable to load contact error.
>
>  
>
> Regards,
>
>  
>
> John Petrini
>
>  
>
>  
>
> *From: *Daniel-Constantin Mierla <mailto:miconda at gmail.com>
> *Sent: *Monday, July 4, 2016 9:38 AM
> *To: *John Petrini <mailto:jpetrini at coredial.com>
> *Cc: *Kamailio (SER) - Users Mailing List
> <mailto:sr-users at lists.sip-router.org>
> *Subject: *Re: [SR-Users] (no subject)
>
>  
>
> Hello,
>
> in the new email, the t_load_contacts() and drop are commented.
>
> Is it how you have them in the config or again some formatting issue?
>
> Cheers,
> Daniel
>
> On 04/07/16 15:13, John Petrini wrote:
>
>     Hi Daniel,
>
>      
>
>     I made a mistake with my formatting when I pasted here. I am
>     calling append_branch() before t_load_contacts. I've attached a
>     view of the entire route including where I was using drop; below.
>     Also a packet capture that shows Kamailio forwarding the reply
>     from the cnam provider back to the phone. I've discovered
>     t_cancel_branches("this") and that seems to be doing the job of
>     killing the second branch as well as the reply to the phone.
>
>      
>
>     My main issue right now is serializing the branches, append_branch
>     creates an additional branch but t_load_contacts fails. I've tried
>     appending multiple branches and also using seturi to replicate the
>     documentation as closely as possible with no luck.
>
>      
>
>     route[CNAM_DIPS] {
>
>       if ($avp(direction) == "in") {
>
>         t_on_branch("CNAM_DIPS");
>
>         t_on_reply("CNAM_DIPS");
>
>         t_on_failure("CNAM_DIPS");
>
>         $var(reply_count) = 0;
>
>         append_branch("sip:8888888888
>     <tel:2152974400>@222.22.222.22:5060;trans-type=5", "0.5");
>
>         #t_load_contacts();
>
>         t_next_contacts();
>
>         t_relay();
>
>         break;
>
>       }
>
>     }
>
>      
>
>     branch_route[CNAM_DIPS] {
>
>       $var(modified_from) = "sip:" + $fU + "@sip.core.com
>     <http://sip.core.com/>";
>
>       uac_replace_from("$var(modified_from)");
>
>     }
>
>      
>
>     onreply_route[CNAM_DIPS] {
>
>       $var(reply_count) = $var(reply_count) + 1;
>
>       if (t_check_status("380")) {
>
>         $avp(cnam) = $(hdr(P-Asserted-Identity){nameaddr.name
>     <http://nameaddr.name/>});
>
>       } else {
>
>           xlog("L_ERROR", "INFO: Received bad reply
>     (on_reply_route[CNAM_DIPS]):"); 
>
>       };
>
>       if ($var(reply_count) = 1) {
>
>         t_cancel_branches("this");
>
>       }
>
>       #drop;
>
>     }
>
>      
>
>     failure_route[CNAM_DIPS] {
>
>       if (!t_next_contacts()) {
>
>         xlog("L_ERR", "ERROR: Gateway failure
>     (failure_route[CNAM_DIPS]): Failed to ship call");
>
>         exit;
>
>       } else {
>
>           t_next_contacts();
>
>           t_relay();
>
>       };
>
>     }
>
>      
>
>      
>
>     Packet capture using drop in the on_reply route rather than
>     t_cancel_branches("this"):
>
>      
>
>     U 2016/07/04 08:46:41.223295 44.444.4.444:5060 -> 333.33.33.3:5060
>
>     INVITE sip:+12222222222 at core.com:5060
>     <http://sip:+12222222222@core.com:5060> SIP/2.0.
>
>     Via: SIP/2.0/UDP 44.444.4.444:5060;branch=z9hG4bK04Bef9112d99372eace.
>
>     From: "UNKNOWN" <sip:+13333333333 at 44.444.4.444;isup-oli=62>
>     <sip:+13333333333 at 44.444.4.444;isup-oli=62>;tag=gK046fcff6.
>
>     To: <sip:2222222222 at core.com <mailto:sip%3A2222222222 at core.com>>.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 INVITE.
>
>     Max-Forwards: 70.
>
>     Allow: INVITE,ACK,CANCEL,BYE,OPTIONS.
>
>     Accept: application/sdp.
>
>     Contact: "UNKNOWN" <sip:+13333333333 at 44.444.4.444:5060>
>     <sip:+13333333333 at 44.444.4.444:5060>.
>
>     P-Asserted-Identity: "UNKNOWN"
>     <sip:+13333333333 at 44.444.4.444:5060>
>     <sip:+13333333333 at 44.444.4.444:5060>.
>
>     Supported: replaces.
>
>     Content-Length:   281.
>
>     Content-Disposition: session; handling=required.
>
>     Content-Type: application/sdp.
>
>     .
>
>     v=0.
>
>     o=Sonus_UAC 807784 731434 IN IP4 44.444.4.444.
>
>     s=SIP Media Capabilities.
>
>     c=IN IP4 55.555.5.55.
>
>     t=0 0.
>
>     m=audio 54018 RTP/AVP 0 18 101.
>
>     a=rtpmap:0 PCMU/8000.
>
>     a=rtpmap:18 G729/8000.
>
>     a=fmtp:18 annexb=no.
>
>     a=rtpmap:101 telephone-event/8000.
>
>     a=fmtp:101 0-15.
>
>     a=sendrecv.
>
>     a=ptime:20.
>
>      
>
>      
>
>     U 2016/07/04 08:46:41.230033 333.33.33.3:5060 -> 44.444.4.444:5060
>
>     SIP/2.0 100 trying -- your call is important to us.
>
>     Via: SIP/2.0/UDP 44.444.4.444:5060;branch=z9hG4bK04Bef9112d99372eace.
>
>     From: "UNKNOWN" <sip:+13333333333 at 44.444.4.444;isup-oli=62>
>     <sip:+13333333333 at 44.444.4.444;isup-oli=62>;tag=gK046fcff6.
>
>     To: <sip:2222222222 at core.com <mailto:sip%3A2222222222 at core.com>>.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 INVITE.
>
>     Server: kamailio (4.2.7 (x86_64/linux)).
>
>     Content-Length: 0.
>
>     .
>
>      
>
>      
>
>     U 2016/07/04 08:46:41.234143 333.33.33.3:5060 ->
>     222.22.222.22:5060 <http://222.22.222.22:5060>
>
>     INVITE sip:8888888888 at 222.22.222.22:5060;trans-type=5 SIP/2.0.
>
>     Record-Route:
>     <sip:333.33.33.3;lr;ftag=gK046fcff6;vsf=AAAAAAAAAAAAAAAAAAAAAABFXl4cUF5cXABSXl87aXN1cC1vbGk9NjI->
>     <sip:333.33.33.3;lr;ftag=gK046fcff6;vsf=AAAAAAAAAAAAAAAAAAAAAABFXl4cUF5cXABSXl87aXN1cC1vbGk9NjI->.
>
>     Via: SIP/2.0/UDP
>     333.33.33.3;branch=z9hG4bK8ac3.daa229dcb24f16332fa5a21927e9a72f.0.
>
>     Via: SIP/2.0/UDP 44.444.4.444:5060;branch=z9hG4bK04Bef9112d99372eace.
>
>     From: "UNKNOWN" <sip:+13333333333 at sip.core.com
>     <mailto:sip%3A%2B13333333333 at sip.core.com>>;tag=gK046fcff6.
>
>     To: <sip:2222222222 at core.com <mailto:sip%3A2222222222 at core.com>>.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 INVITE.
>
>     Max-Forwards: 69.
>
>     Allow: INVITE,ACK,CANCEL,BYE,OPTIONS.
>
>     Accept: application/sdp.
>
>     Contact: "UNKNOWN" <sip:+13333333333 at 44.444.4.444:5060>
>     <sip:+13333333333 at 44.444.4.444:5060>.
>
>     P-Asserted-Identity: "UNKNOWN"
>     <sip:+13333333333 at 44.444.4.444:5060>
>     <sip:+13333333333 at 44.444.4.444:5060>.
>
>     Supported: replaces.
>
>     Content-Length:   281.
>
>     Content-Disposition: session; handling=required.
>
>     Content-Type: application/sdp.
>
>     P-hint: branch_route CNAM_DIPS.
>
>     .
>
>     v=0.
>
>     o=Sonus_UAC 807784 731434 IN IP4 44.444.4.444.
>
>     s=SIP Media Capabilities.
>
>     c=IN IP4 55.555.5.55.
>
>     t=0 0.
>
>     m=audio 54018 RTP/AVP 0 18 101.
>
>     a=rtpmap:0 PCMU/8000.
>
>     a=rtpmap:18 G729/8000.
>
>     a=fmtp:18 annexb=no.
>
>     a=rtpmap:101 telephone-event/8000.
>
>     a=fmtp:101 0-15.
>
>     a=sendrecv.
>
>     a=ptime:20.
>
>      
>
>      
>
>     U 2016/07/04 08:46:41.367868 222.22.222.22:5060
>     <http://222.22.222.22:5060> -> 333.33.33.3:5060
>
>     SIP/2.0 380 cnam lookup.
>
>     Via: SIP/2.0/UDP
>     333.33.33.3;branch=z9hG4bK8ac3.daa229dcb24f16332fa5a21927e9a72f.0.
>
>     Via: SIP/2.0/UDP 44.444.4.444:5060;branch=z9hG4bK04Bef9112d99372eace.
>
>     From: "UNKNOWN" <sip:+13333333333 at sip.core.com
>     <mailto:sip%3A%2B13333333333 at sip.core.com>>;tag=gK046fcff6.
>
>     To:  <sip:2222222222 at core.com
>     <mailto:sip%3A2222222222 at core.com>>;tag=CNAM-16688-1467636671937.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 INVITE.
>
>     Contact: "CNAM" <sip:cnam_gw at 10.212.16.30
>     <mailto:sip%3Acnam_gw at 10.212.16.30>>; transport=udp.
>
>     Max-Forwards: 10.
>
>     P-Asserted-Identity: "Unavailable" <sip:+13333333333 at sip.core.com>.
>
>     Content-Length: 0.
>
>     .
>
>      
>
>      
>
>     U 2016/07/04 08:46:41.368421 333.33.33.3:5060 ->
>     222.22.222.22:5060 <http://222.22.222.22:5060>
>
>     ACK sip:8888888888 at 222.22.222.22:5060;trans-type=5 SIP/2.0.
>
>     Via: SIP/2.0/UDP
>     333.33.33.3;branch=z9hG4bK8ac3.daa229dcb24f16332fa5a21927e9a72f.0.
>
>     From: "UNKNOWN" <sip:+13333333333 at sip.core.com
>     <mailto:sip%3A%2B13333333333 at sip.core.com>>;tag=gK046fcff6.
>
>     To:  <sip:2222222222 at core.com
>     <mailto:sip%3A2222222222 at core.com>>;tag=CNAM-16688-1467636671937.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 ACK.
>
>     Max-Forwards: 69.
>
>     Content-Length: 0.
>
>     .
>
>      
>
>      
>
>     U 2016/07/04 08:46:44.227076 333.33.33.3:5060 -> 44.444.4.444:5060
>
>     SIP/2.0 380 cnam lookup.
>
>     Via: SIP/2.0/UDP 44.444.4.444:5060;branch=z9hG4bK04Bef9112d99372eace.
>
>     From: "UNKNOWN" <sip:+13333333333 at 44.444.4.444;isup-oli=62>
>     <sip:+13333333333 at 44.444.4.444;isup-oli=62>;tag=gK046fcff6.
>
>     To:  <sip:2222222222 at core.com
>     <mailto:sip%3A2222222222 at core.com>>;tag=CNAM-16688-1467636671937.
>
>     Call-ID: 1698991986_66771899 at 44.444.4.444
>     <mailto:1698991986_66771899 at 44.444.4.444>.
>
>     CSeq: 468700 INVITE.
>
>     Contact: "CNAM" <sip:cnam_gw at 10.212.16.30
>     <mailto:sip%3Acnam_gw at 10.212.16.30>>; transport=udp.
>
>     Max-Forwards: 10.
>
>     P-Asserted-Identity: "Unavailable" <sip:+13333333333 at sip.core.com>.
>
>     Content-Length: 0.
>
>     P-hint: onreply CNAM_DIPS.
>
>     .
>
>      
>
>      
>
>      
>
>      
>
>
>     ___
>
>     John Petrini
>
>     NOC Systems Administrator   //   *CoreDial,
>     LLC*   //   coredial.com <http://coredial.com/>   //   Twitter
>     <https://twitter.com/coredial>   LinkedIn
>     <http://www.linkedin.com/company/99631>   Google Plus
>     <https://plus.google.com/104062177220750809525/posts>   Blog
>     <http://success.coredial.com/blog> 
>     Hillcrest I, 751 Arbor Way, Suite 150, Blue Bell PA, 19422 
>     *P: *215.297.4400 x232  
>     //   *F: *215.297.4401   //   *E: *jpetrini at coredial.com
>     <mailto:jpetrini at coredial.com>
>
>     Exceptional people. Proven Processes. Innovative Technology.
>     Discover CoreDial - watch our video
>     <http://cta-redirect.hubspot.com/cta/redirect/210539/4c492538-6e4b-445e-9480-bef676787085>
>
>     The information transmitted is intended only for the person or
>     entity to which it is addressed and may contain confidential
>     and/or privileged material. Any review, retransmission,
>      dissemination or other use of, or taking of any action in
>     reliance upon, this information by persons or entities other than
>     the intended recipient is prohibited. If you received this in
>     error, please contact the sender and delete the material from any
>     computer.
>
>      
>
>
>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
>
>  
>

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160704/15af7fa3/attachment.html>


More information about the sr-users mailing list