<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span></span></div><div><span style="font-family: times, serif; font-size: 12pt; ">thanks Peter,</span><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 id="yiv1739620667"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: times, serif; "><span style="font-size:12pt;">yes , i have followed the page : </span><span style="color:rgb(31, 73, 125);font-size:13px;"> </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-size: 12pt; font-family:
times, serif; ">my configurations as follow:</div><div style="font-size: 12pt; font-family: times, serif; "><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);line-height:1.1em;"><configuration name="lua.conf" description="LUA Configuration">
<settings>
<param name="xml-handler-script" value="register.lua"/>
<param name="xml-handler-bindings" value="directory"/>
</settings>
</configuration></pre></div><div style="font-size: 12pt; font-family: times, serif; ">in register.lua script , i have authenticared and registered users usig lua script instead of using in-memory method, so the sip header initiatiate in lua script as follow: (i don't now why CSeq/contact/, etc left empty)...</div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div><div>recv 551 bytes from udp/[192.168.18.120]:57916 at 11:02:40.742843:</div><div> ------------------------------------------------------------------------</div><div> REGISTER sip:192.168.10.89 SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-7d027150e23ed159-1---d8754z-;rport</div><div> Max-Forwards: 70</div><div> Contact:
<sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b></div><div> To: <sip:1000@192.168.10.89></div><div> From: <sip:1000@192.168.10.89>;tag=0e70ba56</div><div> Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div> CSeq: 1 REGISTER</div><div> Expires: 5454</div><div> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</div><div> Supported: timer</div><div> User-Agent: eyeBeam release 1102q stamp 51814</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 695 bytes to udp/[192.168.18.120]:57916 at 11:02:40.743818:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 401 Unauthorized</div><div> Via:
SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-7d027150e23ed159-1---d8754z-;rport=57916</div><div> From: <sip:1000@192.168.10.89>;tag=0e70ba56</div><div> To: <sip:1000@192.168.10.89>;tag=KQcaD6Ba9e2te</div><div> Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div> CSeq: 1 REGISTER</div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported: timer, precondition, path, replaces</div><div> WWW-Authenticate: Digest realm="192.168.10.89", nonce="9b803030-c4fe-11e1-ad8a-099620eb6996", algorithm=MD5, qop="auth"</div><div> Content-Length: 0</div><div><br></div><div>
------------------------------------------------------------------------</div><div>recv 802 bytes from udp/[192.168.18.120]:57916 at 11:02:40.947421:</div><div> ------------------------------------------------------------------------</div><div> REGISTER sip:192.168.10.89 SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-8717e047bb6d4d76-1---d8754z-;rport</div><div> Max-Forwards: 70</div><div> Contact: <sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b></div><div> To: <sip:1000@192.168.10.89></div><div> From: <sip:1000@192.168.10.89>;tag=0e70ba56</div><div> Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div> CSeq: 2 REGISTER</div><div> Expires: 5454</div><div> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
INFO</div><div> Supported: timer</div><div> User-Agent: eyeBeam release 1102q stamp 51814</div><div> 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> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</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 internal</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 useragent eyeBeam release 1102q stamp 51814</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 username 1000</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 req_auth_realm 192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 contact_user 1000</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 contact_host 192.168.18.120</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 _to_host
192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 from_host 192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 request_host 192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 req_domain 192.168.10.89</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 req_ip 192.168.18.120</div><div>2012-07-03 15:32:40.940760 [INFO] switch_cpp.cpp:1227 <document type="freeswitch/xml"></div><div> <section name="directory"></div><div> <domain name="192.168.10.89"></div><div> <user id="1000"></div><div> <params></div><div> <param name="password" value="1000"/></div><div> <param name="vm-password" value="1000"/></div><div>
</params></div><div><br></div><div><br></div><div> <variables></div><div> <variable name="user_context" value="default"/></div><div> <variable name="accountcode" value="1000"/></div><div> <variable name="user_context" value="default"/></div><div> <variable name="effective_caller_id_name" value="1000"/></div><div> <variable name="effective_caller_id_number" value="1000"/></div><div> </variables></div><div> </user></div><div> </domain></div><div> </section></div><div></document></div><div>send 683 bytes to udp/[192.168.18.120]:57916 at 11:02:40.955909:</div><div>
------------------------------------------------------------------------</div><div> SIP/2.0 200 OK</div><div> Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-8717e047bb6d4d76-1---d8754z-;rport=57916</div><div> From: <sip:1000@192.168.10.89>;tag=0e70ba56</div><div> To: <sip:1000@192.168.10.89>;tag=m052e1vD6QrDa</div><div> Call-ID: NjU3NzZhZjYwNGUxNWZmOTZmN2VjYWI0NTM5NDEyYjE.</div><div> CSeq: 2 REGISTER</div><div> Contact: <sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b>;expires=5454</div><div> Date: Tue, 03 Jul 2012 11:02:40 GMT</div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported:
timer, precondition, path, replaces</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>recv 554 bytes from udp/[192.168.18.120]:57916 at 11:02:41.060557:</div><div> ------------------------------------------------------------------------</div><div> SUBSCRIBE sip:1000@192.168.10.89 SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-ac23c509701fe314-1---d8754z-;rport</div><div> Max-Forwards: 70</div><div> Contact: <sip:1000@192.168.18.120:57916></div><div> To: <sip:1000@192.168.10.89></div><div> From: <sip:1000@192.168.10.89>;tag=96753574</div><div> Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div> CSeq: 1 SUBSCRIBE</div><div> Expires: 300</div><div> Allow:
INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</div><div> Supported: timer</div><div> User-Agent: eyeBeam release 1102q stamp 51814</div><div> Event: message-summary</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 805 bytes to udp/[192.168.18.120]:57916 at 11:02:41.061900:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 202 Accepted</div><div> Via: SIP/2.0/UDP 192.168.18.120:57916;branch=z9hG4bK-d8754z-ac23c509701fe314-1---d8754z-;rport=57916</div><div> From: <sip:1000@192.168.10.89>;tag=96753574</div><div> To: <sip:1000@192.168.10.89>;tag=PbULiimW0TlP</div><div> Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div>
CSeq: 1 SUBSCRIBE</div><div> Contact: <sip:1000@192.168.10.89:5060></div><div> Expires: 300</div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported: timer, precondition, path, replaces</div><div> Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div> Subscription-State: active;expires=300</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 1030 bytes to udp/[192.168.18.120]:57916 at 11:02:41.064419:</div><div>
------------------------------------------------------------------------</div><div> NOTIFY sip:1000@192.168.18.120:57916;rinstance=12e37149747f3c4b SIP/2.0</div><div> Via: SIP/2.0/UDP 192.168.10.89;rport;branch=z9hG4bK494QZ0eB01Z4D</div><div> Route: <sip:1000@192.168.18.120:57916>;rinstance=12e37149747f3c4b</div><div> Max-Forwards: 70</div><div> From: <sip:1000@192.168.10.89>;tag=pjrmjQym094jH</div><div> To: <sip:1000@192.168.10.89></div><div> Call-ID: 730f6d3e-3fa1-1230-cbb5-005056945e65</div><div> CSeq: 30320616 NOTIFY</div><div> Contact: <sip:mod_sofia@192.168.10.89:5060></div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH,
SUBSCRIBE</div><div> Supported: timer, precondition, path, replaces</div><div> Event: message-summary</div><div> Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div> Subscription-State: terminated;reason=noresource</div><div> Content-Type: application/simple-message-summary</div><div> Content-Length: 65</div><div><br></div><div> Messages-Waiting: no</div><div> Message-Account: sip:1000@192.168.10.89</div><div><br></div><div> ------------------------------------------------------------------------</div><div>send 1005 bytes to udp/[192.168.18.120]:57916 at 11:02:41.164620:</div><div> ------------------------------------------------------------------------</div><div> NOTIFY sip:1000@192.168.18.120:57916 SIP/2.0</div><div>
Via: SIP/2.0/UDP 192.168.10.89;rport;branch=z9hG4bK5jyg1UZeXapQS</div><div> Route: <sip:192.168.18.120:57916>;transport=udp</div><div> Max-Forwards: 70</div><div> From: <sip:1000@192.168.10.89>;tag=PbULiimW0TlP</div><div> To: <sip:1000@192.168.10.89>;tag=96753574</div><div> Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div> CSeq: 286150130 NOTIFY</div><div> Contact: <sip:1000@192.168.10.89:5060;transport=udp></div><div> User-Agent: FreeSWITCH-mod_sofia/1.2.0-rc2+git~20120622T231506Z~76fae0cec0+unclean~20120625T042938Z</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported: timer, precondition, path, replaces</div><div> Event: message-summary</div><div> Allow-Events: talk, hold,
presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div> Subscription-State: active;expires=300</div><div> Content-Type: application/simple-message-summary</div><div> Content-Length: 65</div><div><br></div><div> Messages-Waiting: no</div><div> Message-Account: sip:1000@192.168.10.89</div><div><br></div><div> ------------------------------------------------------------------------</div><div>recv 355 bytes from udp/[192.168.18.120]:57916 at 11:02:41.166525:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 200 OK</div><div> Via: SIP/2.0/UDP 192.168.10.89;rport=5060;branch=z9hG4bK494QZ0eB01Z4D</div><div> Contact: <sip:192.168.18.120:57916></div><div> To:
<sip:1000@192.168.10.89>;tag=2e2a6254</div><div> From: <sip:1000@192.168.10.89>;tag=pjrmjQym094jH</div><div> Call-ID: 730f6d3e-3fa1-1230-cbb5-005056945e65</div><div> CSeq: 30320616 NOTIFY</div><div> User-Agent: eyeBeam release 1102q stamp 51814</div><div> Content-Length: 0</div><div><br></div><div> ------------------------------------------------------------------------</div><div>recv 368 bytes from udp/[192.168.18.120]:57916 at 11:02:41.267410:</div><div> ------------------------------------------------------------------------</div><div> SIP/2.0 200 OK</div><div> Via: SIP/2.0/UDP 192.168.10.89;rport=5060;branch=z9hG4bK5jyg1UZeXapQS</div><div> Contact: <sip:1000@192.168.18.120:57916></div><div> To: <sip:1000@192.168.10.89>;tag=96753574</div><div> From:
<sip:1000@192.168.10.89>;tag=PbULiimW0TlP</div><div> Call-ID: Yzg3Y2M4OGNmNDQ3ODhhMjU4OGVhZjE5NDYyOGI4OWE.</div><div> CSeq: 286150130 NOTIFY</div><div> User-Agent: eyeBeam release 1102q stamp 51814</div><div> Content-Length: 0</div><div style="font-size: 12pt; font-family: times, serif; "><br></div></div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; "><br></div> <div style="font-size: 12pt; font-family: times, serif; "> <div style="font-size: 12pt; font-family: times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Peter Olsson <peter.olsson@visionutveckling.se><br> <b><span style="font-weight:bold;">To:</span></b> 'FreeSWITCH Users Help'
<freeswitch-users@lists.freeswitch.org> <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="yiv1739620667">
<style><!--
#yiv1739620667
filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv1739620667 filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv1739620667
p.yiv1739620667MsoNormal, #yiv1739620667 li.yiv1739620667MsoNormal, #yiv1739620667 div.yiv1739620667MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv1739620667 a:link, #yiv1739620667 span.yiv1739620667MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv1739620667 a:visited, #yiv1739620667 span.yiv1739620667MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv1739620667 p.yiv1739620667MsoAcetate, #yiv1739620667 li.yiv1739620667MsoAcetate, #yiv1739620667 div.yiv1739620667MsoAcetate
        {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;font-family:"sans-serif";}
#yiv1739620667 span.yiv1739620667BallongtextChar
        {font-family:"sans-serif";}
#yiv1739620667 span.yiv1739620667E-postmall19
        {font-family:"sans-serif";color:#1F497D;font-weight:normal;font-style:normal;}
#yiv1739620667 .yiv1739620667MsoChpDefault
        {font-size:10.0pt;}
#yiv1739620667 filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
#yiv1739620667 div.yiv1739620667WordSection1
        {}
--></style>
<div>
<div class="yiv1739620667WordSection1">
<div class="yiv1739620667MsoNormal"><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="yiv1739620667MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;"> </span></div>
<div class="yiv1739620667MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;">/Peter</span></div>
<div class="yiv1739620667MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D;"> </span></div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<div class="yiv1739620667MsoNormal"><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="yiv1739620667MsoNormal"> </div>
<div>
<div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;">for example i want to read the value of sip-header ' CSeq' 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="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;">local var = session:getVariable("sip_CSeq")</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;">but the error occure:</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> attempt to index global 'session' (a nil value)</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
<div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> REGISTER
<a rel="nofollow" href="">sip:192.168.10.89</a> SIP/2.0</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Via: SIP/2.0/UDP 192.168.18.120:33648;branch=z9hG4bK-d8754z-7e634b5c7a239f6b-1---d8754z-;rport</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Max-Forwards: 70</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Contact: <<a rel="nofollow" href="">sip:1000@192.168.18.120:33648;rinstance=313a890c6a269acd</a>></span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> To: <<a rel="nofollow" href="">sip:1000@192.168.10.89</a>></span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> From: <<a rel="nofollow" href="">sip:1000@192.168.10.89</a>>;tag=695adb0d</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Call-ID: MGUzNTFkZWVlOTcwODBmOWViNGY4MjM3MzE2NTQzMTM.</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> CSeq: 1 REGISTER</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Expires: 5454</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Supported: timer</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> User-Agent: eyeBeam release 1102q stamp 51814</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> Content-Length: 0</span></div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
</div>
<div>
<div class="yiv1739620667MsoNormal" style="background:white;"><span style="color:black;"> </span></div>
</div>
<div>
<div>
<div>
<div class="yiv1739620667MsoNormal" 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="yiv1739620667MsoNormal" 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 <<a rel="nofollow" ymailto="mailto:peter.olsson@visionutveckling.se" target="_blank" href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>><br>
<b>To:</b> FreeSWITCH Users Help <<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>
<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="yiv1739620667MsoNormal" 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" <<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a><mailto:<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>>>:<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 <<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a><mailto:<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>>><br>
To: FreeSWITCH Users Help <<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><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>>><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 <<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a><mailto:<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>>> wrote:<br>
hi,<br>
how to get the content of sip header 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><mailto:<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><<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><<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><<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><<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><<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><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>><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><<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a>><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><mailto:<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><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>><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="yiv1739620667MsoNormal">!DSPAM:4ff2c56532769990114684! </div>
</div>
</div>
</div><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><br> </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>