[SR-Users] no Contact in REFER generated with dlg_bridge
Anton Roman
antonroman at gmail.com
Thu Jul 8 10:41:42 CEST 2010
Hi,
sorry for my late reply.
I hardcoded the Contact header in dialog/dlg_transfer.c file. It is not a
very elegant way, but I had a short time to fix it :-)
Attached you can find a diff output with the changes I made. Besides the
Contact, I had to add more headers for compatibility reasons both to INVITE
and REFER message.
I think a solution would be to add two params: "bridge_invite_hdrs" and
"bridge_refer_hdrs", to manually include all the headers needed in initial
INVITE and REFER (e.g.: modparam("dialog", "bridge_invite_hdrs", "Contact:
<sip:click2dial at 172.22.5.17:5060>\r\nSupported: 100rel\r\nContent-Type:
application/sdp\r\n")). Perhaps these params could be a bit confusing and
error-prone for new users, however they would be quite useful.
Comments are welcome.
Regards,
Anton
2010/7/1 Daniel-Constantin Mierla <miconda at gmail.com>
> Hello,
>
>
> On 5/27/10 3:32 PM, Anton Roman wrote:
>
> Hi,
>
> regarding the missing Contact header in the REFER message, it can be solved
> by including some lines in /modules_k/dialog/dlg_ transfer.c. In this file,
> the Contact of the initial INVITE generated with dlg_bridge command can be
> easily changed as well.
>
> do you have a patch that you can send for adding the contact header?
>
> Cheers,
> Daniel
>
>
> The problem now is only in the processing of the ACK generated by the TM
> module. When this ACK leaves the Kamailio server the branch value of the
> topmost Via header is '0'.
>
> Below you can find the debug output where the ACK is generated and routed
> by Kamailio. Any idea about where the error can be?
>
> thanks in advance,
> regards
>
> Anton
>
>
> 11(5056) DEBUG: tm [t_msgbuilder.c:791]: building ACK for out-of-dialog
> INVITE (using RS in RR set).
> 11(5056) DEBUG: tm [t_msgbuilder.c:967]: ACK RURI: `sip:235 at 10.1.3.15:5061',
> NH: `sip:10.1.2.122;lr=on'.
> 11(5056) DEBUG: tm [t_reply.c:1059]: ->>>>>>>>> T_code=180, new_code=200
> 11(5056) DEBUG: tm [t_reply.c:1794]: DEBUG: local_reply: branch=0, save=0,
> winner=0
> 11(5056) DEBUG: tm [t_reply.c:356]: DEBUG: update_totag_set: new totag
> 11(5056) DEBUG: tm [t_reply.c:1831]: DEBUG: local transaction completed
> 11(5056) DEBUG: tm [t_hooks.c:288]: DBG: trans=0x7f9767eb1268, callback
> type 256, id 0 entered
> 11(5056) DEBUG: dialog [dlg_transfer.c:207]: completed with status 200
> 11(5056) DEBUG: <core> [parser/parse_to.c:179]: DEBUG: add_param:
> tag=533cb9e91f4b999cf76861cbb9ed54ed-3bcd
> 9(5052) DEBUG: <core> [parser/msg_parser.c:612]: SIP Request:
> 9(5052) DEBUG: <core> [parser/msg_parser.c:614]: method: <ACK>
> 9(5052) DEBUG: <core> [parser/msg_parser.c:616]: uri: <
> sip:235 at 10.1.3.15:5061>
> 9(5052) DEBUG: <core> [parser/msg_parser.c:618]: version: <SIP/2.0>
> 9(5052) DEBUG: <core> [parser/parse_via.c:1283]: Found param type 232,
> <branch> = <z9hG4bKf7bc.00856364.0>; state=16
> 9(5052) DEBUG: <core> [parser/parse_via.c:2296]: end of header reached,
> state=5
> 9(5052) DEBUG: <core> [parser/msg_parser.c:500]: parse_headers: Via found,
> flags=2
> 9(5052) DEBUG: <core> [parser/msg_parser.c:502]: parse_headers: this is
> the first via
> 9(5052) DEBUG: <core> [receive.c:137]: After parse_msg...
> 9(5052) DEBUG: <core> [receive.c:177]: preparing to run routing scripts...
> 9(5052) DEBUG: sl [sl_funcs.c:335]: to late to be a local ACK!
> 9(5052) DEBUG: <core> [parser/parse_to.c:179]: DEBUG: add_param:
> tag=94cf927f9c6eed24i1
> 9(5052) DEBUG: <core> [parser/parse_to.c:808]: end of header reached,
> state=29
> 9(5052) DEBUG: <core> [parser/msg_parser.c:174]: DEBUG: get_hdr_field:
> <To> [43]; uri=[sip:235 at 10.1.2.122 <sip%3A235 at 10.1.2.122>]
> 9(5052) DEBUG: <core> [parser/msg_parser.c:176]: DEBUG: to body [
> sip:235 at 10.1.2.122 <sip%3A235 at 10.1.2.122>]
> 9(5052) DEBUG: <core> [parser/msg_parser.c:154]: get_hdr_field: cseq
> <CSeq>: <10> <ACK>
> 9(5052) DEBUG: <core> [parser/msg_parser.c:188]: DEBUG: get_hdr_body :
> content_length=0
> 9(5052) DEBUG: <core> [parser/msg_parser.c:90]: found end of header
> 9(5052) DEBUG: maxfwd [mf_funcs.c:66]: max_forwards header not found!
> 9(5052) DEBUG: <core> [parser/parse_to.c:179]: DEBUG: add_param:
> tag=533cb9e91f4b999cf76861cbb9ed54ed-3bcd
> 9(5052) DEBUG: <core> [parser/parse_to.c:808]: end of header reached,
> state=29
> 9(5052) DEBUG: sanity [mod_sanity.c:220]: all sanity checks passed
> 9(5052) ERROR: <script>: kamailio!!!: ACK 9(5052) DEBUG: siputils
> [checks.c:68]: totag found
> 9(5052) DEBUG: rr [loose.c:85]: is_preloaded: No
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==9 && [10.1.3.15] == [127.0.0.1]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==9 && [10.1.3.15] == [127.0.0.2]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==10 && [10.1.3.15] == [10.1.2.122]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==9 && [10.1.3.15] == [127.0.0.1]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==9 && [10.1.3.15] == [127.0.0.2]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 9==10 && [10.1.3.15] == [10.1.2.122]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5061
> 9(5052) DEBUG: <core> [forward.c:356]: check_self: host != me
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 10==9 && [10.1.2.122] == [127.0.0.1]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5060
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 10==9 && [10.1.2.122] == [127.0.0.2]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5060
> 9(5052) DEBUG: <core> [socket_info.c:485]: grep_sock_info - checking if
> host==us: 10==10 && [10.1.2.122] == [10.1.2.122]
> 9(5052) DEBUG: <core> [socket_info.c:488]: grep_sock_info - checking if
> port 5060 matches port 5060
> 9(5052) DEBUG: rr [loose.c:781]: Topmost route URI: 'sip:10.1.2.122;lr=on'
> is me
> 9(5052) DEBUG: <core> [parser/msg_parser.c:90]: found end of header
> 9(5052) DEBUG: rr [loose.c:257]: No next Route HF found
> 9(5052) DEBUG: rr [loose.c:800]: No next URI found
> 9(5052) DEBUG: rr [rr_cb.c:97]: callback id 0 entered with <lr=on>
> 9(5052) DEBUG: dialog [dlg_handlers.c:797]: Route param 'did' not found
> 9(5052) DEBUG: tm [t_lookup.c:1387]: DEBUG: t_newtran: msg id=10 , global
> msg id=9 , T on entrance=0xffffffffffffffff
> 9(5052) DEBUG: tm [t_lookup.c:528]: t_lookup_request: start searching:
> hash=52095, isACK=1
> 9(5052) DEBUG: tm [t_lookup.c:720]: DEBUG: t_lookup_request: e2e proxy ACK
> found
> 9(5052) DEBUG: tm [t_reply.c:276]: DEBUG: totag for e2e ACK found: 0
> 9(5052) DEBUG: tm [t_funcs.c:315]: SER: forwarding ACK statelessly
> 9(5052) DEBUG: <core> [msg_translator.c:200]:
> check_via_address(10.1.2.122, 10.1.2.122, 0)
> 9(5052) DEBUG: <core> [forward.c:509]: Sending:
> ACK sip:235 at 10.1.3.15:5061 SIP/2.0
> Max-Forwards: 10
> Via: SIP/2.0/UDP 10.1.2.122;branch=0
> Via: SIP/2.0/UDP 10.1.2.122;branch=z9hG4bKf7bc.00856364.0
> From: sip:click2dial at 172.22.5.17 <sip%3Aclick2dial at 172.22.5.17>
> ;tag=533cb9e91f4b999cf76861cbb9ed54ed-3bcd
> Call-ID: 2bef8d5474ff8cd4
> To: sip:235 at 10.1.2.122 <sip%3A235 at 10.1.2.122>;tag=94cf927f9c6eed24i1
> CSeq: 10 ACK
> User-Agent: kamailio (3.0.1 (x86_64/linux))
> Content-Length: 0
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100708/fb2f15af/attachment-0001.htm>
-------------- next part --------------
40c40
< #define DLG_HOLD_SDP "v=0\r\no=kamailio-bridge 0 0 IN IP4 0.0.0.0\r\ns=kamailio\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=audio 9 RTP/AVP 8 0\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\n"
---
> #define DLG_HOLD_SDP "v=0\r\no=kamailio-bridge 0 0 IN IP4 0.0.0.0\r\ns=kamailio\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=audio 16 RTP/AVP 8 0\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\n"
43c43
< #define DLG_HOLD_CT_HDR "Contact: <sip:kamailio.org:5060>\r\nContent-Type: application/sdp\r\n"
---
> #define DLG_HOLD_CT_HDR "Contact: <sip:click2dial at 172.22.5.17:5060>\r\nSupported: 100rel\r\nContent-Type: application/sdp\r\n"
147,148c147,150
< hdrs.len = 23 + 2*CRLF_LEN + dlg_bridge_controller.len
< + dtc->to.len;
---
> /*hdrs.len = 23 + 2*CRLF_LEN + dlg_bridge_controller.len
> + dtc->to.len;*/
> hdrs.len = 65 + 3*CRLF_LEN + dlg_bridge_controller.len
> + dtc->to.len;
156,157c158,164
< memcpy(hdrs.s+13+dlg_bridge_controller.len+CRLF_LEN, "Refer-To: ", 10);
< memcpy(hdrs.s+23+dlg_bridge_controller.len+CRLF_LEN, dtc->to.s,
---
> memcpy(hdrs.s+13+dlg_bridge_controller.len+CRLF_LEN, "Contact: <sip:click2dial at 172.22.5.17:5060>", 42);
> memcpy(hdrs.s+55+dlg_bridge_controller.len+CRLF_LEN, CRLF, CRLF_LEN);
> /*memcpy(hdrs.s+54+dlg_bridge_controller.len+CRLF_LEN+CRLF_LEN, "Supported: 100rel", 17);
> memcpy(hdrs.s+71+dlg_bridge_controller.len+CRLF_LEN+CRLF_LEN,CRLF, CRLF_LEN);
> */
> memcpy(hdrs.s+55+dlg_bridge_controller.len+CRLF_LEN+CRLF_LEN, "Refer-To: ", 10);
> memcpy(hdrs.s+65+dlg_bridge_controller.len+CRLF_LEN+CRLF_LEN, dtc->to.s,
159c166
< memcpy(hdrs.s+23+dlg_bridge_controller.len+CRLF_LEN+dtc->to.len,
---
> memcpy(hdrs.s+65+dlg_bridge_controller.len+CRLF_LEN+CRLF_LEN+dtc->to.len,
More information about the sr-users
mailing list