<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_OSPLookup">Asterisk 11 Application_OSPLookup</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~wikibot">Wiki Bot</a>
</h4>
<br/>
<div class="notificationGreySide">
<h1><a name="Asterisk11Application_OSPLookup-OSPLookup%28%29"></a>OSPLookup()</h1>
<h3><a name="Asterisk11Application_OSPLookup-Synopsis"></a>Synopsis</h3>
<p>Lookup destination by OSP.</p>
<h3><a name="Asterisk11Application_OSPLookup-Description"></a>Description</h3>
<p>Looks up destination via OSP.</p>
<p>Input variables:</p>
<ul>
        <li>OSPINACTUALSRC - The actual source device IP address in indirect mode.</li>
        <li>OSPINPEERIP - The last hop IP address.</li>
        <li>OSPINTECH - The inbound channel technology for the call.</li>
        <li>OSPINHANDLE - The inbound call OSP transaction handle.</li>
        <li>OSPINTIMELIMIT - The inbound call duration limit in seconds.</li>
        <li>OSPINNETWORKID - The inbound source network ID.</li>
        <li>OSPINNPRN - The inbound routing number.</li>
        <li>OSPINNPCIC - The inbound carrier identification code.</li>
        <li>OSPINNPDI - The inbound number portability database dip indicator.</li>
        <li>OSPINSPID - The inbound service provider identity.</li>
        <li>OSPINOCN - The inbound operator company number.</li>
        <li>OSPINSPN - The inbound service provider name.</li>
        <li>OSPINALTSPN - The inbound alternate service provider name.</li>
        <li>OSPINMCC - The inbound mobile country code.</li>
        <li>OSPINMNC - The inbound mobile network code.</li>
        <li>OSPINTOHOST - The inbound To header host part.</li>
        <li>OSPINRPIDUSER - The inbound Remote-Party-ID header user part.</li>
        <li>OSPINPAIUSER - The inbound P-Asserted-Identify header user part.</li>
        <li>OSPINDIVUSER - The inbound Diversion header user part.</li>
        <li>OSPINDIVHOST - The inbound Diversion header host part.</li>
        <li>OSPINPCIUSER - The inbound P-Charge-Info header user part.</li>
        <li>OSPINCUSTOMINFON - The inbound custom information, where <tt>n</tt> is the index beginning with <tt>1</tt> upto <tt>8</tt>.</li>
</ul>
<p>Output variables:</p>
<ul>
        <li>OSPOUTHANDLE - The outbound call OSP transaction handle.</li>
        <li>OSPOUTTECH - The outbound channel technology for the call.</li>
        <li>OSPDESTINATION - The outbound destination IP address.</li>
        <li>OSPOUTCALLING - The outbound calling number.</li>
        <li>OSPOUTCALLED - The outbound called number.</li>
        <li>OSPOUTNETWORKID - The outbound destination network ID.</li>
        <li>OSPOUTNPRN - The outbound routing number.</li>
        <li>OSPOUTNPCIC - The outbound carrier identification code.</li>
        <li>OSPOUTNPDI - The outbound number portability database dip indicator.</li>
        <li>OSPOUTSPID - The outbound service provider identity.</li>
        <li>OSPOUTOCN - The outbound operator company number.</li>
        <li>OSPOUTSPN - The outbound service provider name.</li>
        <li>OSPOUTALTSPN - The outbound alternate service provider name.</li>
        <li>OSPOUTMCC - The outbound mobile country code.</li>
        <li>OSPOUTMNC - The outbound mobile network code.</li>
        <li>OSPOUTTOKEN - The outbound OSP token.</li>
        <li>OSPDESTREMAILS - The number of remained destinations.</li>
        <li>OSPOUTTIMELIMIT - The outbound call duration limit in seconds.</li>
        <li>OSPOUTCALLIDTYPES - The outbound Call-ID types.</li>
        <li>OSPOUTCALLID - The outbound Call-ID. Only for H.323.</li>
        <li>OSPDIALSTR - The outbound Dial command string.</li>
</ul>
<p>This application sets the following channel variable upon completion:</p>
<ul>
        <li>OSPLOOKUPSTATUS - The status of OSPLookup attempt as a text string, one of
        <ul>
                <li>SUCCESS</li>
                <li>FAILED</li>
                <li>ERROR</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk11Application_OSPLookup-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>OSPLookup(exten,provider,options)</pre>
</div></div>
<h5><a name="Asterisk11Application_OSPLookup-Arguments"></a>Arguments</h5>
<ul>
        <li>exten - The exten of the call.</li>
        <li>provider - The name of the provider that is used to route the call.</li>
        <li>options
        <ul>
                <li>h - generate H323 call id for the outbound call</li>
                <li>s - generate SIP call id for the outbound call. Have not been implemented</li>
                <li>i - generate IAX call id for the outbound call. Have not been implemented</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk11Application_OSPLookup-SeeAlso"></a>See Also</h3>
<ul>
        <li><a href="/wiki/display/AST/Asterisk+11+Application_OSPAuth" title="Asterisk 11 Application_OSPAuth">Asterisk 11 Application_OSPAuth</a></li>
        <li><a href="/wiki/pages/createpage.action?spaceKey=AST&title=Asterisk+11+Application_OSPNext&linkCreation=true&fromPageId=20187049" class="createlink">Asterisk 11 Application_OSPNext</a></li>
        <li><a href="/wiki/pages/createpage.action?spaceKey=AST&title=Asterisk+11+Application_OSPFinish&linkCreation=true&fromPageId=20187049" class="createlink">Asterisk 11 Application_OSPFinish</a></li>
</ul>
<h3><a name="Asterisk11Application_OSPLookup-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk Version SVN-trunk-r370322</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_OSPLookup">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_OSPLookup?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>