[asterisk-dev] Help:ast_channel_get_by_exten returns NULL

Mark Michelson mmichelson at digium.com
Thu Jul 7 09:15:00 CDT 2011


On 07/07/2011 07:08 AM, warrior back wrote:
>
>
>     Hello,
>
> I tried to get asterisk channel by calling ast_channel_get_by_exten 
> function but It is returning NULL.
>
> Based upon my extensions.conf (as shown below) I am calling 
> ast_channel_get_by_exten  function as
>
> ast_channel_get_by_exten("1000","default");    but is returns NULL
>
> *extensions.conf is*
> [default]
> exten => 1000,1,Dial(SIP/1000)
> exten => 2000,1,Dial(SIP/2000)
>
> Is it any way to get channel  through number(number may be SIP number 
> or phone number)
>
> Please help me how can i get channel by exten.
>
>
>
>
> Thanks and Regards,
> Vikash
Silly question, but is there actually a channel currently in that 
extension when you are calling ast_channel_get_by_exten()?

Mark Michelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110707/57789ceb/attachment-0001.htm>


More information about the asterisk-dev mailing list