<html><body><div style="color:#000; background-color:#fff; 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; "><span>thanks Peter,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="font-size: 12pt; ">yes , i have followed the page :&nbsp;</span><span style="color: rgb(31, 73, 125); font-size: 13px; ">&nbsp;</span><span style="color: rgb(31, 73, 125); font-size: 13px; ">http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration</span><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">my configurations as follow:</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px;
 border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); border-image: initial; line-height: 1.1em; ">&lt;configuration name="lua.conf" description="LUA Configuration"&gt;
  &lt;settings&gt;
    &lt;param name="xml-handler-script" value="register.lua"/&gt;
    &lt;param name="xml-handler-bindings" value="dialplan"/&gt;
  &lt;/settings&gt;
&lt;/configuration&gt;</pre></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">in register.lua script , i have authenticared and registered users usig lua script instead of using in-memory method, &nbsp;so the sip header &nbsp;initiatiate in lua script &nbsp;as follow: (i don't now why &nbsp;CSeq/contact/, etc left empty)...</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><div>recv 551 bytes from udp/[192.168.18.120]:57916 at 11:02:40.742843:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;REGISTER sip:192.168.10.89 SIP/2.0</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-7d027150e23ed159-1---d8754z-;rport</div><div>&nbsp; &nbsp;Max-Forwards: 70</div><div>&nbsp; &nbsp;Contact:
 &lt;sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b&gt;</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=0e70ba56</div><div>&nbsp; &nbsp;Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div>&nbsp; &nbsp;CSeq: 1 REGISTER</div><div>&nbsp; &nbsp;Expires: 5454</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</div><div>&nbsp; &nbsp;Supported: timer</div><div>&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>send 695 bytes to udp/[192.168.18.120]:57916 at 11:02:40.743818:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SIP/2.0 401 Unauthorized</div><div>&nbsp; &nbsp;Via:
 SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-7d027150e23ed159-1---d8754z-;rport=57916</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=0e70ba56</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;;tag=KQcaD6Ba9e2te</div><div>&nbsp; &nbsp;Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div>&nbsp; &nbsp;CSeq: 1 REGISTER</div><div>&nbsp; &nbsp;User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>&nbsp; &nbsp;Supported: timer, precondition, path, replaces</div><div>&nbsp; &nbsp;WWW-Authenticate: Digest realm="192.168.10.89", nonce="9b803030-c4fe-11e1-ad8a-099620eb6996", algorithm=MD5, qop="auth"</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp;
 &nbsp;------------------------------------------------------------------------</div><div>recv 802 bytes from udp/[192.168.18.120]:57916 at 11:02:40.947421:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;REGISTER sip:192.168.10.89 SIP/2.0</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-8717e047bb6d4d76-1---d8754z-;rport</div><div>&nbsp; &nbsp;Max-Forwards: 70</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b&gt;</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=0e70ba56</div><div>&nbsp; &nbsp;Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div>&nbsp; &nbsp;CSeq: 2 REGISTER</div><div>&nbsp; &nbsp;Expires: 5454</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
 INFO</div><div>&nbsp; &nbsp;Supported: timer</div><div>&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</div><div>&nbsp; &nbsp;Authorization: Digest username="1000",realm="192.168.10.89",nonce="9b803030-c4fe-11e1-ad8a-099620eb6996",uri="sip:192.168.10.89",response="2044cb3f7f932d83402d6a38b26cd5e6",cnonce="2290ee958a69ed51c8bb638ab4341cef",nc=00000001,qop=auth,algorithm=MD5</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>2012-07-03 15:32:40.940760 [NOTICE] switch_cpp.cpp:1227 Debug from gen_dir_user_xml.lua, provided params:</div><div>'Event-Name: REQUEST_PARAMS</div><div>Core-UUID: 83d1034e-c4f2-11e1-ad58-099620eb6996</div><div>FreeSWITCH-Hostname: PBX</div><div>FreeSWITCH-Switchname: PBX</div><div>FreeSWITCH-IPv4: 192.168.10.89</div><div>FreeSWITCH-IPv6: %3A%3A1</div><div>Event-Date-Local:
 2012-07-03%2015%3A32%3A40</div><div>Event-Date-GMT: Tue,%2003%20Jul%202012%2011%3A02%3A40%20GMT</div><div>Event-Date-Timestamp: 1341313360940760</div><div>Event-Calling-File: sofia_reg.c</div><div>Event-Calling-Function: sofia_reg_parse_auth</div><div>Event-Calling-Line-Number: 2364</div><div>Event-Sequence: 3304</div><div>action: sip_auth</div><div>sip_profile: internal</div><div>sip_user_agent: eyeBeam%20release%201102q%20stamp%2051814</div><div>sip_auth_username: 1000</div><div>sip_auth_realm: 192.168.10.89</div><div>sip_auth_nonce: 9b803030-c4fe-11e1-ad8a-099620eb6996</div><div>sip_auth_uri: sip%3A192.168.10.89</div><div>sip_contact_user: 1000</div><div>sip_contact_host: 192.168.18.120</div><div>sip_to_user: 1000</div><div>sip_to_host: 192.168.10.89</div><div>sip_from_user: 1000</div><div>sip_from_host: 192.168.10.89</div><div>sip_request_host: 192.168.10.89</div><div>sip_auth_qop: auth</div><div>sip_auth_cnonce:
 2290ee958a69ed51c8bb638ab4341cef</div><div>sip_auth_nc: 00000001</div><div>sip_auth_response: 2044cb3f7f932d83402d6a38b26cd5e6</div><div>sip_auth_method: REGISTER</div><div>key: id</div><div>user: 1000</div><div>domain: 192.168.10.89</div><div>ip: 192.168.18.120</div><div><br></div><div>'</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 profile &nbsp;internal</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 useragent &nbsp;eyeBeam release 1102q stamp 51814</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 username &nbsp;1000</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 &nbsp;req_auth_realm 192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 contact_user &nbsp;1000</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 contact_host &nbsp;192.168.18.120</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 _to_host
 &nbsp;192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 from_host &nbsp;192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 request_host &nbsp;192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 req_domain &nbsp;192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 req_ip &nbsp; 192.168.18.120</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 &lt;document type="freeswitch/xml"&gt;</div><div>&nbsp; &lt;section name="directory"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;domain name="192.168.10.89"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;user id="1000"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;params&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="password" value="1000"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param name="vm-password" value="1000"/&gt;</div><div>&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp;&lt;/params&gt;</div><div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &lt;variables&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;variable name="user_context" value="default"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;variable name="accountcode" value="1000"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;variable name="user_context" value="default"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;variable name="effective_caller_id_name" value="1000"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;variable name="effective_caller_id_number" value="1000"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/variables&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;/user&gt;</div><div>&nbsp; &nbsp; &lt;/domain&gt;</div><div>&nbsp; &lt;/section&gt;</div><div>&lt;/document&gt;</div><div>send 683 bytes to udp/[192.168.18.120]:57916 at 11:02:40.955909:</div><div>&nbsp;
 &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SIP/2.0 200 OK</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-8717e047bb6d4d76-1---d8754z-;rport=57916</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=0e70ba56</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;;tag=m052e1vD6QrDa</div><div>&nbsp; &nbsp;Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div>&nbsp; &nbsp;CSeq: 2 REGISTER</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b&gt;;expires=5454</div><div>&nbsp; &nbsp;Date: Tue, 03 Jul 2012 11:02:40 GMT</div><div>&nbsp; &nbsp;User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>&nbsp; &nbsp;Supported:
 timer, precondition, path, replaces</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>recv 554 bytes from udp/[192.168.18.120]:57916 at 11:02:41.060557:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SUBSCRIBE sip:1000@192.168.10.89 SIP/2.0</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-ac23c509701fe314-1---d8754z-;rport</div><div>&nbsp; &nbsp;Max-Forwards: 70</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.18.120:57916&gt;</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=96753574</div><div>&nbsp; &nbsp;Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div>&nbsp; &nbsp;CSeq: 1 SUBSCRIBE</div><div>&nbsp; &nbsp;Expires: 300</div><div>&nbsp; &nbsp;Allow:
 INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</div><div>&nbsp; &nbsp;Supported: timer</div><div>&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</div><div>&nbsp; &nbsp;Event: message-summary</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>send 805 bytes to udp/[192.168.18.120]:57916 at 11:02:41.061900:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SIP/2.0 202 Accepted</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-ac23c509701fe314-1---d8754z-;rport=57916</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=96753574</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;;tag=PbULiimW0TlP</div><div>&nbsp; &nbsp;Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div>&nbsp;
 &nbsp;CSeq: 1 SUBSCRIBE</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.10.89:5060&gt;</div><div>&nbsp; &nbsp;Expires: 300</div><div>&nbsp; &nbsp;User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>&nbsp; &nbsp;Supported: timer, precondition, path, replaces</div><div>&nbsp; &nbsp;Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>&nbsp; &nbsp;Subscription-State: active;expires=300</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>send 1030 bytes to udp/[192.168.18.120]:57916 at 11:02:41.064419:</div><div>&nbsp;
 &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;NOTIFY sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b SIP/2.0</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.10.89;rport;branch=z9hG4bK494QZ0eB01Z4D</div><div>&nbsp; &nbsp;Route: &lt;sip:1000@192.168.18.120:57916&gt;;rinstance=12e37149747f3c4b</div><div>&nbsp; &nbsp;Max-Forwards: 70</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=pjrmjQym094jH</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;</div><div>&nbsp; &nbsp;Call-ID: 730f6d3e-3fa1-1230-cbb5-005056945e65</div><div>&nbsp; &nbsp;CSeq: 30320616 NOTIFY</div><div>&nbsp; &nbsp;Contact: &lt;sip:mod_sofia@192.168.10.89:5060&gt;</div><div>&nbsp; &nbsp;User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH,
 SUBSCRIBE</div><div>&nbsp; &nbsp;Supported: timer, precondition, path, replaces</div><div>&nbsp; &nbsp;Event: message-summary</div><div>&nbsp; &nbsp;Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>&nbsp; &nbsp;Subscription-State: terminated;reason=noresource</div><div>&nbsp; &nbsp;Content-Type: application/simple-message-summary</div><div>&nbsp; &nbsp;Content-Length: 65</div><div><br></div><div>&nbsp; &nbsp;Messages-Waiting: no</div><div>&nbsp; &nbsp;Message-Account: sip:1000@192.168.10.89</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>send 1005 bytes to udp/[192.168.18.120]:57916 at 11:02:41.164620:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;NOTIFY sip:1000@192.168.18.120:57916 SIP/2.0</div><div>&nbsp;
 &nbsp;Via: SIP/2.0/UDP 192.168.10.89;rport;branch=z9hG4bK5jyg1UZeXapQS</div><div>&nbsp; &nbsp;Route: &lt;sip:192.168.18.120:57916&gt;;transport=udp</div><div>&nbsp; &nbsp;Max-Forwards: 70</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=PbULiimW0TlP</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;;tag=96753574</div><div>&nbsp; &nbsp;Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div>&nbsp; &nbsp;CSeq: 286150130 NOTIFY</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.10.89:5060;transport=udp&gt;</div><div>&nbsp; &nbsp;User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div>&nbsp; &nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>&nbsp; &nbsp;Supported: timer, precondition, path, replaces</div><div>&nbsp; &nbsp;Event: message-summary</div><div>&nbsp; &nbsp;Allow-Events: talk, hold,
 presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>&nbsp; &nbsp;Subscription-State: active;expires=300</div><div>&nbsp; &nbsp;Content-Type: application/simple-message-summary</div><div>&nbsp; &nbsp;Content-Length: 65</div><div><br></div><div>&nbsp; &nbsp;Messages-Waiting: no</div><div>&nbsp; &nbsp;Message-Account: sip:1000@192.168.10.89</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>recv 355 bytes from udp/[192.168.18.120]:57916 at 11:02:41.166525:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SIP/2.0 200 OK</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.10.89;rport=5060;branch=z9hG4bK494QZ0eB01Z4D</div><div>&nbsp; &nbsp;Contact: &lt;sip:192.168.18.120:57916&gt;</div><div>&nbsp; &nbsp;To:
 &lt;sip:1000@192.168.10.89&gt;;tag=2e2a6254</div><div>&nbsp; &nbsp;From: &lt;sip:1000@192.168.10.89&gt;;tag=pjrmjQym094jH</div><div>&nbsp; &nbsp;Call-ID: 730f6d3e-3fa1-1230-cbb5-005056945e65</div><div>&nbsp; &nbsp;CSeq: 30320616 NOTIFY</div><div>&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</div><div>&nbsp; &nbsp;Content-Length: 0</div><div><br></div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>recv 368 bytes from udp/[192.168.18.120]:57916 at 11:02:41.267410:</div><div>&nbsp; &nbsp;------------------------------------------------------------------------</div><div>&nbsp; &nbsp;SIP/2.0 200 OK</div><div>&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.10.89;rport=5060;branch=z9hG4bK5jyg1UZeXapQS</div><div>&nbsp; &nbsp;Contact: &lt;sip:1000@192.168.18.120:57916&gt;</div><div>&nbsp; &nbsp;To: &lt;sip:1000@192.168.10.89&gt;;tag=96753574</div><div>&nbsp; &nbsp;From:
 &lt;sip:1000@192.168.10.89&gt;;tag=PbULiimW0TlP</div><div>&nbsp; &nbsp;Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div>&nbsp; &nbsp;CSeq: 286150130 NOTIFY</div><div>&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</div><div>&nbsp; &nbsp;Content-Length: 0</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div>  <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span
 style="font-weight:bold;">From:</span></b> Peter Olsson &lt;peter.olsson@visionutveckling.se&gt;<br> <b><span style="font-weight: bold;">To:</span></b> 'FreeSWITCH Users Help' &lt;freeswitch-users@lists.freeswitch.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, July 3, 2012 3:14 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] how to get the content of sip header ?<br> </font> </div> <br>
<div id="yiv840197556">

 
 
<style><!--
#yiv840197556  
 _filtered #yiv840197556 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv840197556 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv840197556  
#yiv840197556 p.yiv840197556MsoNormal, #yiv840197556 li.yiv840197556MsoNormal, #yiv840197556 div.yiv840197556MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv840197556 a:link, #yiv840197556 span.yiv840197556MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv840197556 a:visited, #yiv840197556 span.yiv840197556MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv840197556 p.yiv840197556MsoAcetate, #yiv840197556 li.yiv840197556MsoAcetate, #yiv840197556 div.yiv840197556MsoAcetate
        {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;font-family:"sans-serif";}
#yiv840197556 span.yiv840197556BallongtextChar
        {font-family:"sans-serif";}
#yiv840197556 span.yiv840197556E-postmall19
        {font-family:"sans-serif";color:#1F497D;font-weight:normal;font-style:normal;}
#yiv840197556 .yiv840197556MsoChpDefault
        {font-size:10.0pt;}
 _filtered #yiv840197556 {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
#yiv840197556 div.yiv840197556WordSection1
        {}
--></style>

<div>
<div class="yiv840197556WordSection1">
<div class="yiv840197556MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;">Is this some kind of xml-generating script for register bindings (as in here: http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration)? If
 that’s the case, you have no session object, and you will have to follow the information on that wiki page instead.</span></div> 
<div class="yiv840197556MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;"> &nbsp;</span></div> 
<div class="yiv840197556MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;">/Peter</span></div> 
<div class="yiv840197556MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;"> &nbsp;</span></div> 
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<div class="yiv840197556MsoNormal"><b><span style="font-size:10.0pt;">Från:</span></b><span style="font-size:10.0pt;"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>För </b>Samira Mh<br>
<b>Skickat:</b> den 3 juli 2012 12:16<br>
<b>Till:</b> FreeSWITCH Users Help<br>
<b>Ämne:</b> Re: [Freeswitch-users] how to get the content of sip header ?</span></div> 
</div>
</div>
<div class="yiv840197556MsoNormal"> &nbsp;</div> 
<div>
<div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">for example i want to read the &nbsp;value of &nbsp;sip-header '&nbsp;CSeq' &nbsp; in lua(that is configure for mod_xml in /usr/loca/freeswitch/conf/autoload/lia.xml.conf), must to issue as follow:</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">local var = session:getVariable("sip_CSeq")</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">but the error occure:</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp;attempt to index global 'session' (a nil value)</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
<div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp;REGISTER
<a rel="nofollow" href="">sip:192.168.10.89</a> SIP/2.0</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Via: SIP/2.0/UDP 192.168.18.120:33648;branch=z9hG4bK-d8754z-7e634b5c7a239f6b-1---d8754z-;rport</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Max-Forwards: 70</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Contact: &lt;<a rel="nofollow" href="">sip:1000@192.168.18.120:33648;rinstance=313a890c6a269acd</a>&gt;</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;To: &lt;<a rel="nofollow" href="">sip:1000@192.168.10.89</a>&gt;</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;From: &lt;<a rel="nofollow" href="">sip:1000@192.168.10.89</a>&gt;;tag=695adb0d</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Call-ID: MGUzNTFkZWVlOTcwODBmOWViNGY4MjM3MzE2NTQzMTM.</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;CSeq: 1 REGISTER</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Expires: 5454</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Supported: timer</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;User-Agent: eyeBeam release 1102q stamp 51814</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;">&nbsp; &nbsp;Content-Length: 0</span></div> 
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
</div>
<div>
<div class="yiv840197556MsoNormal" style="background:white;"><span style="color:black;"> &nbsp;</span></div> 
</div>
<div>
<div>
<div>
<div class="yiv840197556MsoNormal" align="center" style="text-align:center;background:white;">
<span style="font-size:10.0pt;color:black;">
<hr size="1" width="100%" align="center">
</span></div>
<div class="yiv840197556MsoNormal" style="background:white;"><b><span style="font-size:10.0pt;color:black;">From:</span></b><span style="font-size:10.0pt;color:black;"> Peter Olsson &lt;<a rel="nofollow" ymailto="mailto:peter.olsson@visionutveckling.se" target="_blank" href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>&gt;<br>
<b>To:</b> FreeSWITCH Users Help &lt;<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;
<br>
<b>Sent:</b> Sunday, July 1, 2012 11:33 AM<br>
<b>Subject:</b> Re: [Freeswitch-users] how to get the content of sip header ?</span><span style="color:black;"></span></div> 
</div>
<div class="yiv840197556MsoNormal" style="margin-bottom:12.0pt;background:white;"><span style="color:black;"><br>
Use session:getVariable("var") to read whatever channel variable you need. As Michael said, the SIP headers are stored like sip_header_name. For instance, to read the header Diversion:, use the variable sip_diversion.<br>
<br>
Michael also mentions the info app, which is a good way to dump all channel variables for a channel, so you know exactly what you have available. To use this, just execute the app info in the dialplan.<br>
<br>
/Peter<br>
<br>
1 jul 2012 kl. 05:47 skrev "Samira Mh" &lt;<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>&gt;&gt;:<br>
<br>
is it possible to explain in details? ,i have review the wiki on subject but don't understand clearly, i am new on freeswitch, thanks ...<br>
<br>
________________________________<br>
From: Michael Collins &lt;<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;&gt;<br>
To: FreeSWITCH Users Help &lt;<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;&gt;<br>
Sent: Sunday, July 1, 2012 1:33 AM<br>
Subject: Re: [Freeswitch-users] how to get the content of sip header ?<br>
<br>
See if you have a bunch of sip_xxx channel variables. Send the call to the info app and see what you've got.<br>
-MC<br>
<br>
On Sat, Jun 30, 2012 at 5:57 AM, Samira Mh &lt;<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>&gt;&gt; wrote:<br>
hi,<br>
how to get the content of sip header&nbsp; in lua?<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&gt;<br>
<a rel="nofollow" target="_blank" href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a>&lt;<a rel="nofollow" target="_blank" href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com/</a>&gt;<br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a rel="nofollow" target="_blank" href="http://www.cudatel.com/">http://www.cudatel.com</a>&lt;<a rel="nofollow" target="_blank" href="http://www.cudatel.com/">http://www.cudatel.com/</a>&gt;<br>
<br>
Official FreeSWITCH Sites<br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a>&lt;<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a>&gt;<br>
<a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</a>&lt;<a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org/</a>&gt;<br>
<a rel="nofollow" target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com</a>&lt;<a rel="nofollow" target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a>&gt;<br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&gt;<br>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a>&lt;<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a>&gt;<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&gt;<br>
<a rel="nofollow" target="_blank" href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a rel="nofollow" target="_blank" href="http://www.cudatel.com/">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&lt;mailto:<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&gt;<br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a><br>
<br>
<br>
!DSPAM:4fefc4ee32761372387519!<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a rel="nofollow" target="_blank" href="http://www.cudatel.com/">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a><br>
<br>
</span></div> 
</div>
</div>
</div>
<div class="yiv840197556MsoNormal">!DSPAM:4ff2c56532769990114684! </div> 
</div>
</div>

</div><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>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br> </div> </div>  </div></body></html>