Hi Klaus, Sorry for the bad format. I took a debug:
DEBUG: <core> [parser/msg_parser.c:623]: parse_msg(): SIP Request: DEBUG: <core> [parser/msg_parser.c:625]: parse_msg(): method: <ACK> DEBUG: <core> [parser/msg_parser.c:627]: parse_msg(): uri: <sip:7000ABCDEFGHI@<IP_KAMAILIO_ASTERISK>:4060> DEBUG: <core> [parser/msg_parser.c:629]: parse_msg(): version: <SIP/2.0> DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-9982f067>; state=6 DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=17 DEBUG: <core> [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 DEBUG: <core> [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 DEBUG: <core> [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via DEBUG: <core> [receive.c:152]: receive_msg(): After parse_msg... DEBUG: <core> [receive.c:193]: receive_msg(): preparing to run routing scripts... DEBUG : sl_filter_ACK: to late to be a local ACK! ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=12 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=137 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=131 a=25 n=mf_process_maxfwd_header DEBUG: add_param: tag=as2da80cc9 DEBUG: <core> [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 DEBUG: get_hdr_field: <To> [40]; uri=[sip:123@<sip.domain.tld>] DEBUG: to body [<sip:123@<sip.domain.tld>>] DEBUG: <core> [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <102> <ACK> DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 70 ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=144 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=137 a=26 n=sanity_check DEBUG: get_hdr_body : content_length=0 DEBUG: <core> [parser/msg_parser.c:106]: get_hdr_field(): found end of header DEBUG: add_param: tag=3f76daa87288aa1co0 DEBUG: <core> [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1 ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=156 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=144 a=24 n=has_totag DEBUG: siputils [checks.c:106]: has_totag(): totag found ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=158 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=158 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=159 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=159 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=159 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=159 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=160 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=160 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=160 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=160 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=161 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=161 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=161 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=161 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=161 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=162 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=162 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=162 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=162 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=162 a=26 n=replace ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=15 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=381 a=55 n=force_rport ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=391 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=382 a=25 n=nat_uac_test DEBUG: <core> [msg_translator.c:204]: check_via_address(): check_via_address(10.141.0.5, 10.141.0.5, 0) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=391 a=2 n=return ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=29 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=18 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=29 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=210 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=168 a=24 n=has_totag DEBUG: siputils [checks.c:106]: has_totag(): totag found ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=207 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=171 a=24 n=loose_route DEBUG: rr [loose.c:90]: is_preloaded(): is_preloaded: No 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 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 DEBUG: rr [loose.c:674]: after_strict(): Next hop: 'sip:<IP_KAMAILIO_ASTERISK>;lr=on' is loose router DEBUG: rr [loose.c:724]: after_strict(): The last route URI: 'sip:<IP_KAMAILIO_ASTERISK>;lr=on' ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=172 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=434 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=430 a=24 n=isdsturiset ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=434 a=2 n=return ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=185 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=173 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=185 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=177 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=179 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=405 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=398 a=24 n=is_request ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=404 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=399 a=24 n=has_totag DEBUG: siputils [checks.c:106]: has_totag(): totag found ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=403 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=400 a=25 n=check_route_param ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=408 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=405 a=41 n=isflagset ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=405 a=25 n=isbflagset ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=406 a=2 n=return ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=185 a=5 n=route ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=94 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=91 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=97 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=94 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=101 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=97 a=25 n=is_method ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=104 a=16 n=if ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=101 a=24 n=t_relay DEBUG: t_newtran: msg id=2 , global msg id=1 , T on entrance=(nil) DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start searching: hash=20645, isACK=1 DEBUG: t_lookup_request: e2e proxy ACK found DEBUG: totag for e2e ACK found: 0 DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0x7fd048cb11c8, callback type 4, id 0 entered DEBUG: acc [acc_logic.c:571]: tmcb_func(): acc callback called for t(0x7fd048cb11c8) event type 4, reply code -4 DEBUG: pv [pv_core.c:977]: pv_get_pai(): no P-Asserted-Identity header DEBUG: tm [t_funcs.c:311]: t_relay_to(): SER: forwarding ACK statelessly DEBUG: <core> [resolve.c:1243]: srv_sip_resolvehost(): srv_sip_resolvehost: <IP_KAMAILIO_ASTERISK>:0 proto=0 DEBUG: <core> [resolve.c:1365]: srv_sip_resolvehost(): srv_sip_resolvehost: returning 0x899660 (<IP_KAMAILIO_ASTERISK>:5060 proto=1) DEBUG: MD5 calculated: a94f044fe5475bf0527047c599436de3 DEBUG: <core> [msg_translator.c:204]: check_via_address(): check_via_address(10.141.0.5, 10.141.0.5, 0) I guess that there are something useful here but if you can help to "decrypt". Regards, Igor. -----Message d'origine----- De : sr-users-boun...@lists.sip-router.org [mailto:sr-users-boun...@lists.sip-router.org] De la part de Klaus Darilion Envoyé : mercredi 24 septembre 2014 10:21 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Relaying ACK to Asterisk Hi! 1. Please post SIP messages in a more readable format. Your dump seems like Wireshark. Best way to get nice SIP messages is ngrep: ngrep -t -q -P "" -Wbyline port 5060 Another good method is in Wireshark to activate "display RAW SIP message" in the SIP protocol dissector options. Then you can right-click and copy printable characters to the clipboard 2. It seems that Kamailio does not change the port in the RURI. Instead it copies the whole Route header into the RURI. This is usually only done when converting from loose-routing to strict routing, or when doing strict routing. Thus, for some reason it seems that Kamailio has problems with losse-routing this message. You have to set the log level to "debug" and then watch the log message when routing the ACK. You should see some message be lr module how it routes the message. (there are a plenty of " == myself" messages when Kamailio tries to find out if a message is addressed to itself, eg if the URI in the Route header is itself - this may indicate errors in the alias= config). regards Klaus On 23.09.2014 17:34, Igor Potjevlesch wrote: > Hello Klaus, > > Initial ACK sent by the UAC looks like this: > > Request-Line: ACK sip:700ABCDEFGHIJ@<IP_ASTERISK/KAMAILIO>:4060 SIP/2.0 > Method: ACK > Request-URI: sip:700ABCDEFGHIJ@<IP_ASTERISK/KAMAILIO>:4060 > > Message Header > Via: SIP/2.0/UDP <IP_UAC>:5060;branch=z9hG4bK-8b319388;rport > Transport: UDP > Sent-by Address: <IP_UAC> > Sent-by port: 5060 > Branch: z9hG4bK-8b319388 > RPort: rport > From: 22 <sip:abcdefg...@sip.fqdn.tld>;tag=189f3d3bf3f9656o0 > SIP Display info: 22 > SIP from address: sip:abcdefg...@sip.fqdn.tld > SIP from address User Part: ABCDEFGHIJ > SIP from address Host Part: sip.fqdn.tld > SIP from tag: 189f3d3bf3f9656o0 > To: <sip:1...@sip.fqdn.tld>;tag=as091754f8 > SIP to address: sip:1...@sip.fqdn.tld > SIP to address User Part: 123 > SIP to address Host Part: sip.fqdn.tld > SIP to tag: as091754f8 > Call-ID: 39fe9b57-95f574a2@<IP_UAC> > CSeq: 102 ACK > Sequence Number: 102 > Method: ACK > Max-Forwards: 70 > Route: <sip:<IP_ASTERISK/KAMAILIO>;lr=on> > Route URI: sip:<IP_ASTERISK/KAMAILIO>;lr=on > Route Host Part: <IP_ASTERISK/KAMAILIO> > Route URI parameter: lr=on > Proxy-Authorization: Digest > username="ABCDEFGHIJ",realm="sip.fqdn.tld",nonce="VCGIx1Qhh5sqtS7GwGWBKTLvJX > 7H3Oqe",uri="sip:1...@sip.fqdn.tld",algorithm=MD5,response="103a027b58eb628ea > 003dd827ea1d669" > Authentication Scheme: Digest > Username: "ABCDEFGHIJ" > Realm: "sip.fqdn.tld" > Nonce Value: "VCGIx1Qhh5sqtS7GwGWBKTLvJX7H3Oqe" > Authentication URI: "sip:1...@sip.fqdn.tld" > Algorithm: MD5 > Digest Authentication Response: > "103a027b58eb628ea003dd827ea1d669" > Contact: 22 <sip:ABCDEFGHIJ@<IP_UAC>:5060> > SIP Display info: 22 > Contact URI: sip:ABCDEFGHIJ@<IP_UAC>:5060 > Contact URI User Part: ABCDEFGHIJ > Contact URI Host Part: <IP_UAC> > Contact URI Host Port: 5060 > User-Agent: Linksys/WRP400-2.00.32 > Content-Length: 0 > > Next, the ACK on lo interface who loops: > User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060) <-- > here the Dst Port has already been modified by Kamailio. > > Session Initiation Protocol (ACK) > Request-Line: ACK sip:<IP_ASTERISK/KAMAILIO>;lr=on SIP/2.0 > Method: ACK > Request-URI: sip:<IP_ASTERISK/KAMAILIO>;lr=on > Request-URI Host Part: <IP_ASTERISK/KAMAILIO> > Message Header > Via: SIP/2.0/UDP > <IP_ASTERISK/KAMAILIO>;branch=z9hG4bKe717.d7d6c57a10035735c483450629da8b62.0 > Transport: UDP > Sent-by Address: <IP_ASTERISK/KAMAILIO> > Branch: z9hG4bKe717.d7d6c57a10035735c483450629da8b62.0 > Via: SIP/2.0/UDP <IP_UAC>:5060;branch=z9hG4bK-2182fea0;rport=5060 > Transport: UDP > Sent-by Address: <IP_UAC> > Sent-by port: 5060 > Branch: z9hG4bK-2182fea0 > RPort: 5060 > From: 22 <sip:abcdefg...@sip.fqdn.tld>;tag=8ab714d39e8cfdefo0 > SIP Display info: 22 > SIP from address: sip:abcdefg...@sip.fqdn.tld > SIP from address User Part: ABCDEFGHIJ > SIP from address Host Part: sip.fqdn.tld > SIP from tag: 8ab714d39e8cfdefo0 > To: <sip:1...@sip.fqdn.tld>;tag=as116ed4ed > SIP to address: sip:1...@sip.fqdn.tld > SIP to address User Part: 123 > SIP to address Host Part: sip.fqdn.tld > SIP to tag: as116ed4ed > Call-ID: 66c39a3-eb259f5f@<IP_UAC> > CSeq: 102 ACK > Sequence Number: 102 > Method: ACK > Max-Forwards: 69 > Proxy-Authorization: Digest > username="ABCDEFGHIJ",realm="sip.fqdn.tld",nonce="VCGI/FQhh9AbPlF1XLMvEaetTC > aGX9CM",uri="sip:1...@sip.fqdn.tld",algorithm=MD5,response="55ca32ecf5ab7b328 > 95fd2e545d7033c" > Authentication Scheme: Digest > Username: "ABCDEFGHIJ" > Realm: "sip.fqdn.tld" > Nonce Value: "VCGI/FQhh9AbPlF1XLMvEaetTCaGX9CM" > Authentication URI: "sip:1...@sip.fqdn.tld" > Algorithm: MD5 > Digest Authentication Response: > "55ca32ecf5ab7b32895fd2e545d7033c" > Contact: 22 <sip:ABCDEFGHIJ@<IP_UAC>:5060> > SIP Display info: 22 > Contact URI: sip:ABCDEFGHIJ@<IP_UAC>:5060 > Contact URI User Part: ABCDEFGHIJ > Contact URI Host Part: <IP_UAC> > Contact URI Host Port: 5060 > User-Agent: Linksys/WRP400-2.00.32 > Content-Length: 0 > > Regards, > > Igor. > > -----Message d'origine----- > De : sr-users-boun...@lists.sip-router.org > [mailto:sr-users-boun...@lists.sip-router.org] De la part de Klaus Darilion > Envoyé : mardi 23 septembre 2014 16:04 > À : Kamailio (SER) - Users Mailing List > Objet : Re: [SR-Users] Relaying ACK to Asterisk > > dump the whole ACK packet received by Kamailio, and the packet looped by > Kamailio > > regards > Klaus > > On 20.08.2014 18:38, Igor Potjevlesch wrote: >> Hello, >> >> >> >> Im having trouble with this scenario (Kamailio and Asterisk are >> working on the same server, Asterisk listens on 4060 instead of 5060): >> the UAC sends an ACK request with the following R-URI: >> sip:955*95%23@<IP_ASTERISK/KAMAILIO>:4060 >> <sip:955*95%23@%3cIP_ASTERISK/KAMAILIO%3e:4060>. >> >> When Im doing a capture on loopback interface, I just see an ACK >> request from IP <IP_ASTERISK/KAMAILIO>:5060 to IP >> <IP_ASTERISK/KAMAILIO>:5060. >> >> So the ACK seems to loop inside Kamailio. >> >> >> >> What could explain that the good port defined by the UAC is deleted? >> >> >> >> Regards, >> >> >> >> Igor. >> >> >> >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >> list sr-users@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@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@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@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users