[asterisk-dev] chan_ooh323 incoming channel names

Tony Mountifield tony at softins.clara.co.uk
Fri May 23 11:18:54 CDT 2008


I've just started looking at chan_ooh323 in asterisk-addons, and although
I have got it working, there is an oddity that puzzles me, and I am
wondering whether it is deliberate or a mistake in the code design.

The oddity is the naming of channels for incoming calls. They are named
after the CIDName of the incoming call, which could be anything completely
unrelated to the host from which the call came, e.g.

-- Executing Answer("OOH323/Tony Mountifield-3f83", "1") in new stack

This seems bizarre, especialy since te CIDname could contain any chars,
even a '-' sign! It means for example that to show the channel, I needed
to include the channel name in quotes:

*CLI> show channel "OOH323/Tony Mountifield-3f83"

The code in question is in ooh323_onReceivedSetup():

 1195    if(call->remoteDisplayName){
 1196       p->callerid_name = strdup(call->remoteDisplayName);
 1197    }
 1198 
....
 1263    if(!p->callerid_name)
 1264    {
 1265       p->callerid_name = strdup(call->remoteIP);
 1266    }
 1267 
 1268    if(p->callerid_name)
 1269    {
 1270       p->username = strdup(p->callerid_name);

Then elsewhere, p->username is passed to ooh323_new() as its host argument.

For outgoing calls, p->username contains the name of the [peer] to which
the call is routed. I would have thought for incoming calls, it should
contain the name of the [user] section that was matched (or failing that,
the source IP).

I can work out a patch for this, but I wanted some feedback first whether
there was a good reason for the current behaviour.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list