ARI - Can't use same channel id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tl;dr:  Make sure you always use a unique channel id if you are specifying what the channel id is when you create the channel.

I just ran into a problem that took me all day to solve.  It may be in the docs somewhere but I haven't seen it explicitly.  However, once it dawned on me why it was failing it was obvious.  Since Asterisk does the exact same thing.

I was attempting to make a call out from a program I've written using ARI.  The endpoint phone rang just fine.  However, other than knowing I made the call, I had no way of knowing it started.  I do get the ChannelDestroyed stasis message if the no one answers the phone.  This was specifically what I was looking for.

However, when I tried to test the second time it didn't work.  The phone would ring, but I wouldn't get the stasis message saying it didn't answer.

I looked everywhere.  I couldn't find anyone else with the same problem.  It didn't make any sense since Asterisk was telling me from the console program that the channel was being destroyed.

Since I can't get the auto channel id I have to specify one.  And, I do that by combining the caller id and a table row number.  If I attempt to make multiple calls without creating a new row (which I do for the same customer) then I end up using the same channel id.  If I exit the customer call I was on and start over again (thereby creating a new row in the table) the channel destroy message would show up in the stasis message.  But, again, only once.

Eight hours later, it finally dawned on me that this is why Asterisk creates a new channel id each time a channel is created automatically.  I thought it had to do with logging or billing, etc.

So, create a new channel id each time, just to be sure.  Just like Asterisk, all you have to do is add a number to the end.  Anything that makes it unique will work.

In closing, I would like to say how much fun I'm having (other than today) working with your new ARI.  It is FANTASTIC!!  Thank you so much for creating it.  I look forward to all the things I can do with it.

Regards,
Phil Mickelson
CBA Software, LLC
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux