<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><div style="font-size: 12pt;"><span>hi all,</span></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><span>I am very new in sofia sip, and I am develop one register module for FS using sofia sip stack.</span></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><span>in FS, when i receive REGISTER message, i am trying to send it to another registrar server (kamailio).</span></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><span>I have implement my code in incoming REGISTER message like:</span></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><span><div style="background-color: transparent;">
nua_set_params(profile->nua,</div><div style="background-color: transparent;"> SIPTAG_FROM_STR("sip:101@192.168.1.112:5062"),</div><div style="background-color: transparent;"> NUTAG_ENABLEMESSAGE(1),</div><div style="background-color: transparent;"> NUTAG_ENABLEINVITE(1),</div><div style="background-color: transparent;"> NUTAG_AUTOALERT(1),</div><div style="background-color: transparent;"> NUTAG_SESSION_TIMER(0),</div><div style="background-color: transparent;"> NUTAG_AUTOANSWER(0),</div><div style="background-color: transparent;">
TAG_NULL());</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"> nua_register(nh,</div><div style="background-color: transparent;"> NUTAG_PROXY("sip:192.168.1.112:5062"),</div><div style="background-color: transparent;"> NUTAG_REGISTRAR("sip:192.168.1.112:5062"), //registra uri</div><div style="background-color: transparent;"> SIPTAG_FROM_STR("sip:192.168.1.112:5062"),</div><div style="background-color: transparent;"> NUTAG_INSTANCE (0),</div><div style="background-color: transparent;">
NUTAG_M_USERNAME("101"),</div><div style="background-color: transparent;"> TAG_NULL());</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">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.</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">With this code bellow, i send REGISTER message and get response in kamailio as:</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><div style="background-color: transparent;">send 613 bytes to udp/[192.168.1.112]:5062 at 03:10:42.833439:</div><div style="background-color: transparent;">
------------------------------------------------------------------------</div><div style="background-color: transparent;"> REGISTER sip:101@192.168.3.122:42806;rinstance=7742cc70900998e8 SIP/2.0</div><div style="background-color: transparent;"> Via: SIP/2.0/UDP 192.168.1.112;rport;branch=z9hG4bKBB44UFQ9ySjQK</div><div style="background-color: transparent;"> Max-Forwards: 70</div><div style="background-color: transparent;"> From: <sip:192.168.1.112:5062>;tag=DXeN4j2DFt27j</div><div style="background-color: transparent;"> To: "101" <sip:101@192.168.1.112>;tag=cd424d7d</div><div style="background-color: transparent;"> Call-ID: ac980e34-4e79-1231-71ba-3e508d3991e2</div><div style="background-color: transparent;"> CSeq: 45210457 REGISTER</div><div style="background-color: transparent;"> Contact: <sip:101@192.168.1.112></div><div
style="background-color: transparent;"> User-Agent: FreeSWITCH-mod_sofia/1.5.2b+git~20130527T075833Z~f3541e00f4</div><div style="background-color: transparent;"> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div style="background-color: transparent;"> Supported: timer, precondition, path, replaces</div><div style="background-color: transparent;"> Content-Length: 0</div><div style="background-color: transparent;"> </div><div><br></div><div><div>recv 325 bytes from udp/[192.168.1.112]:5062 at 03:10:42.834220:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 404 Not here</div><div> Via: SIP/2.0/UDP 192.168.1.112;rport=5060;branch=z9hG4bKBB44UFQ9ySjQK</div><div> From:
<sip:192.168.1.112:5062>;tag=DXeN4j2DFt27j</div><div> To: "101" <sip:101@192.168.1.112>;tag=cd424d7d</div><div> Call-ID: ac980e34-4e79-1231-71ba-3e508d3991e2</div><div> CSeq: 45210457 REGISTER</div><div> Server: kamailio (4.0.1 (x86_64/linux))</div><div> Content-Length: 0</div><div> </div><div><br></div><div>Then, I see that structure of SIP REGISTER message is not correct.</div><div><br></div><div>Can some one help me to construct this message to send to kamailio ?</div><div>May we dont care about nua_create ? just using nua_set_params or nua_register or nua_options ?</div><div><br></div><div>Thank all in advance.</div></div></div></span></div><div style="font-size: 12pt;"></div><div style="font-size: 12pt;"> </div><div style="font-size: 12pt;">ThanhTruong</div></span></div><div></div><div><br></div></div></body></html>