chan_sip: Fix From header truncation for extremely long CALLERID(name).
authorWalter Doekes <walter+asterisk@wjd.nu>
Thu, 17 Sep 2015 09:52:09 +0000 (11:52 +0200)
committerWalter Doekes <walter+asterisk@wjd.nu>
Fri, 18 Sep 2015 08:05:03 +0000 (03:05 -0500)
commite4df271a3e40d23cd6b4dd054b73f95ab385a765
treed6bef989610cf96231bfa2eeff4428b4e0b373ff
parente47396721f9c73b16ac7c7632dcd530f4e5b06c7
chan_sip: Fix From header truncation for extremely long CALLERID(name).

The CALLERID(num) and CALLERID(name) and other info are placed into the
`char from[256]` in initreqprep. If the name was too long, the addr-spec
and params wouldn't fit.

Code is moved around so the addr-spec with params is placed there first,
and then fitting in as much of the display-name as possible.

ASTERISK-25396 #close

Change-Id: I33632baf024f01b6a00f8c7f35c91e5f68c40260
channels/chan_sip.c