[asterisk-dev] Help:ast_channel_get_by_exten returns NULL

warrior back indianrocking at gmail.com
Thu Jul 7 11:37:54 CDT 2011


Silly question, but is there actually a channel currently in that
extension when you are calling ast_channel_get_by_exten()?

Mark Michelson

Hi Mark Michelson

Yes I am able to make a SIP call between 1000 to 2000 hence a SIP channel is
there for 1000 and 2000.

My purpose is to get a ast_channel  based upon number
Please help me how can i get a channel based upon phone/SIP number.


Thanks and Regards,
Vikash


On Thu, Jul 7, 2011 at 5:38 PM, warrior back <indianrocking at gmail.com>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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110707/e880cc80/attachment.htm>


More information about the asterisk-dev mailing list