<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>hi,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>In mod_sofia, it handle REGISTER message, and I want to route this message to kamailio server, then kamailio will return 401, then, we can use sofia-sip (in UA) to authenticate with kamailio, if 200OK return from kamailio, i will return 200ok back to sip client.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div
style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>In this case, I think i need to change code in handle register in mod_sofia. But this is in mind, and code in mod_sofia is very complex, I can find where to send REGISTER message to kamailio but message is not correct, kamailio cant understand this message.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Do you have any ideal in my case ?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent;
font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>any code suggestion ?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Thank you in advance .</span></div><div></div><div> </div><div>ThanhTruong<br></div> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span
style="font-weight:bold;">From:</span></b> Brian West <brian@freeswitch.org><br> <b><span style="font-weight: bold;">To:</span></b> freeswitch-dev@lists.freeswitch.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, June 13, 2013 12:25 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-dev] help to correct sip stack to send to kamailio
        in mod_sofia<br> </font> </div> <div class="y_msg_container"><br>Can you explain why you think you need to modify mod_sofia to make this work?<br><br>/b<br><br>On Jun 12, 2013, at 10:22 PM, ThanhTruong <<a ymailto="mailto:ngoc217thanh@yahoo.com" href="mailto:ngoc217thanh@yahoo.com">ngoc217thanh@yahoo.com</a>> wrote:<br><br>> hi all,<br>> <br>> I am very new in sofia sip, and I am develop one register module for FS using sofia sip stack.<br>> <br>> in FS, when i receive REGISTER message, i am trying to send it to another registrar server (kamailio).<br>> <br>> I have implement my code in incoming REGISTER message like:<br>> <br>> nua_set_params(profile->nua,<br>> SIPTAG_FROM_STR("sip:<a ymailto="mailto:101@192.168.1.112" href="mailto:101@192.168.1.112">101@192.168.1.112</a>:5062"),<br>>
NUTAG_ENABLEMESSAGE(1),<br>> NUTAG_ENABLEINVITE(1),<br>> NUTAG_AUTOALERT(1),<br>> NUTAG_SESSION_TIMER(0),<br>> NUTAG_AUTOANSWER(0),<br>> TAG_NULL());<br>> <br>> nua_register(nh,<br>> NUTAG_PROXY("sip:192.168.1.112:5062"),<br>> NUTAG_REGISTRAR("sip:192.168.1.112:5062"), //registra uri<br>>
SIPTAG_FROM_STR("sip:192.168.1.112:5062"),<br>> NUTAG_INSTANCE (0),<br>> NUTAG_M_USERNAME("101"),<br>> TAG_NULL());<br>> <br>> I have one account 101/xxxx in kamailio, i want to register from softphone to FS, FS send register and process authentication with kamailio, then return 200OK back to softphone.<br>> <br>> With this code bellow, i send REGISTER message and get response in kamailio as:<br>> <br>> send 613 bytes to udp/[192.168.1.112]:5062 at 03:10:42.833439:<br>> ------------------------------------------------------------------------<br>> REGISTER sip:<a ymailto="mailto:101@192.168.3.122" href="mailto:101@192.168.3.122">101@192.168.3.122</a>:42806;rinstance=7742cc70900998e8 SIP/2.0<br>>
Via: SIP/2.0/UDP 192.168.1.112;rport;branch=z9hG4bKBB44UFQ9ySjQK<br>> Max-Forwards: 70<br>> From: <sip:192.168.1.112:5062>;tag=DXeN4j2DFt27j<br>> To: "101" <sip:<a ymailto="mailto:101@192.168.1.112" href="mailto:101@192.168.1.112">101@192.168.1.112</a>>;tag=cd424d7d<br>> Call-ID: ac980e34-4e79-1231-71ba-3e508d3991e2<br>> CSeq: 45210457 REGISTER<br>> Contact: <sip:<a ymailto="mailto:101@192.168.1.112" href="mailto:101@192.168.1.112">101@192.168.1.112</a>><br>> User-Agent: FreeSWITCH-mod_sofia/1.5.2b+git~20130527T075833Z~f3541e00f4<br>> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE<br>> Supported: timer, precondition, path, replaces<br>> Content-Length: 0<br>> <br>> <br>> recv 325 bytes from
udp/[192.168.1.112]:5062 at 03:10:42.834220:<br>> ------------------------------------------------------------------------<br>> SIP/2.0 404 Not here<br>> Via: SIP/2.0/UDP 192.168.1.112;rport=5060;branch=z9hG4bKBB44UFQ9ySjQK<br>> From: <sip:192.168.1.112:5062>;tag=DXeN4j2DFt27j<br>> To: "101" <sip:<a ymailto="mailto:101@192.168.1.112" href="mailto:101@192.168.1.112">101@192.168.1.112</a>>;tag=cd424d7d<br>> Call-ID: ac980e34-4e79-1231-71ba-3e508d3991e2<br>> CSeq: 45210457 REGISTER<br>> Server: kamailio (4.0.1 (x86_64/linux))<br>> Content-Length: 0<br>> <br>> <br>> Then, I see that structure of SIP REGISTER message is not correct.<br>> <br>> Can some one help me to construct this message to send to kamailio ?<br>> May we dont care about nua_create ? just using
nua_set_params or nua_register or nua_options ?<br>> <br>> Thank all in advance.<br>> <br>> ThanhTruong<br>> <br>> _________________________________________________________________________<br>> Professional FreeSWITCH Consulting Services:<br>> <a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>> <a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>> <br>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>> <a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>> <br>> Official FreeSWITCH Sites<br>> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>> <a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>> <a href="http://www.cluecon.com/"
target="_blank">http://www.cluecon.com</a><br>> <br>> FreeSWITCH-dev mailing list<br>> <a ymailto="mailto:FreeSWITCH-dev@lists.freeswitch.org" href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/"
target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-dev mailing list<br><a ymailto="mailto:FreeSWITCH-dev@lists.freeswitch.org" href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br></div> </div> </div> </div></body></html>