Summary:ASTERISK-13798: [patch] when userid is set in the user profile, the userid used by the remote device is lost
Reporter:Joao Carvalho (foxfire)Labels:
Date Opened:2009-03-22 05:37:04Date Closed:2011-06-07 14:03:17
Versions:Frequency of
Environment:Attachments:( 0) patch
Description:I normaly force userid by setting the userid field in the iax.cfg or sip.cfg. By doing so i loose the old userid defined by the client.
Let us take an example:
User jon sets up an softphone saying that his number is 333. But in the server cfg file states that jon is 444. So 444 wins which is correct, but neverless i would like to have an variable like for example callerid(orignum) or something that would contain 333.


I fixed that temporary for me  by changing some code in chan_iax2.c and using callerid(ani)

>>> Patch removed <<<

but that is only an hack.
Comments:By: Joshua C. Colp (jcolp) 2009-03-31 08:45:42

Please attach your patch as an attachment after accepting the license agreement. As well since this would be a new feature we would only apply it to trunk, and I think this would need some discussion as we may want to expand it to all channel drivers.

By: Joao Carvalho (foxfire) 2009-03-31 09:34:33

I did not supply a patch before because it is only one line , and it is certainly not the correct way of doing so.
The var "ani" should not be used i was in a hurry so i reused it.
Anyway here is the patch.

By: David Vossel (dvossel) 2009-06-18 16:58:20

This can already be done in the dialplan using channel variables... Something like Set(ORIG_CID=${CALLERID(num)}) and Set(${CALLERID(num)=NEW_CALLER_ID}) would work.  This requires letting the dialplan take care of the callerid rather than setting it in sip.conf though.

Since this is a feature request without a committable patch, and the feature is possible by other means, I'm going to close the issue.  Feel free to reopen this if you can provide a patch for trunk.